-- cgit v1.2.3 -- cgit v1.2.3 From 1c10dd569addb74663a14a590abb3658c39847e5 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 16 Sep 2009 15:26:40 +0000 Subject: #i1601# Sentence case, Title case, and Toggle case transliteration added --- .../sun/star/i18n/TransliterationModulesExtra.idl | 76 ++++++++++++++++++++++ offapi/com/sun/star/i18n/makefile.mk | 1 + 2 files changed, 77 insertions(+) create mode 100644 offapi/com/sun/star/i18n/TransliterationModulesExtra.idl diff --git a/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl b/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl new file mode 100644 index 000000000000..17cd0d6a7ba6 --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: TransliterationModulesExtra.idl,v $ + * $Revision: 1.0 $ + * + * 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_i18n_TransliterationModulesExtra_idl__ +#define __com_sun_star_i18n_TransliterationModulesExtra_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Extra transliteration module enumeration to use with + XTransliteration::loadModule() + + The values used in this group need to be different from the ones in + TransliterationModules and TransliterationModulesNew! + */ + + +// using a constant group instead of enum leaves room for additional values later on... +constants TransliterationModulesExtra +{ + /** The first character of the sentence is put in upper case + */ + const short SENTENCE_CASE = 200; + + //------------------------------------------------------------------------- + + /** The first character of the word is put in upper case. + * This one is part + */ + const short TITLE_CASE = 201; + + //------------------------------------------------------------------------- + + /** All characters of the word are to change their case from small letters + * to capital letters and vice versa. + */ + const short TOGGLE_CASE = 202; + + //------------------------------------------------------------------------- + + const long END_OF_MODULE = 0; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/makefile.mk b/offapi/com/sun/star/i18n/makefile.mk index f9d8b80c29fb..24157932fc26 100644 --- a/offapi/com/sun/star/i18n/makefile.mk +++ b/offapi/com/sun/star/i18n/makefile.mk @@ -98,6 +98,7 @@ IDLFILES=\ Transliteration.idl \ TransliterationModules.idl \ TransliterationModulesNew.idl \ + TransliterationModulesExtra.idl \ TransliterationType.idl \ UnicodeScript.idl \ UnicodeType.idl \ -- cgit v1.2.3 From 76e3c562b28d023eca6e9d70b9df02fdc1715f1b Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 17 Sep 2009 07:10:23 +0000 Subject: #i1601# Sentence case, Title case, and Toggle case transliteration added --- sc/sdi/cellsh.sdi | 3 +++ sc/sdi/drtxtob.sdi | 3 +++ sc/sdi/editsh.sdi | 3 +++ sc/source/ui/view/viewutil.cxx | 11 +++++++++++ sc/uiconfig/scalc/menubar/menubar.xml | 5 ++++- 5 files changed, 24 insertions(+), 1 deletion(-) diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi index 7f97a8a0161e..b3e0f19a7fa4 100644 --- a/sc/sdi/cellsh.sdi +++ b/sc/sdi/cellsh.sdi @@ -192,6 +192,9 @@ interface CellSelection SID_HANGUL_HANJA_CONVERSION [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] SID_CHINESE_CONVERSION [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] + SID_TRANSLITERATE_SENTENCE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ] + SID_TRANSLITERATE_TITLE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ] + SID_TRANSLITERATE_TOGGLE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ] SID_TRANSLITERATE_UPPER [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ] SID_TRANSLITERATE_LOWER [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ] SID_TRANSLITERATE_HALFWIDTH [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ] diff --git a/sc/sdi/drtxtob.sdi b/sc/sdi/drtxtob.sdi index 0d226895af4a..fdbd3fe483c1 100644 --- a/sc/sdi/drtxtob.sdi +++ b/sc/sdi/drtxtob.sdi @@ -129,6 +129,9 @@ interface TableDrawText SID_VERTICALTEXT_STATE [ StateMethod = GetAttrState ; Export = FALSE; ] SID_CTLFONT_STATE [ StateMethod = GetAttrState ; Export = FALSE; ] + SID_TRANSLITERATE_SENTENCE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] + SID_TRANSLITERATE_TITLE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] + SID_TRANSLITERATE_TOGGLE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] SID_TRANSLITERATE_UPPER [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] SID_TRANSLITERATE_LOWER [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] SID_TRANSLITERATE_HALFWIDTH [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] diff --git a/sc/sdi/editsh.sdi b/sc/sdi/editsh.sdi index c8ad37208744..a0110b296ea7 100644 --- a/sc/sdi/editsh.sdi +++ b/sc/sdi/editsh.sdi @@ -83,6 +83,9 @@ interface TableText SID_HYPERLINK_GETLINK [ StateMethod = GetState; Export = FALSE; ] SID_OPEN_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] + SID_TRANSLITERATE_SENTENCE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] + SID_TRANSLITERATE_TITLE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] + SID_TRANSLITERATE_TOGGLE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] SID_TRANSLITERATE_UPPER [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] SID_TRANSLITERATE_LOWER [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] SID_TRANSLITERATE_HALFWIDTH [ ExecMethod = ExecuteTrans; StateMethod = GetState; Export = FALSE; ] diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 83dd05c9d33c..e0526a857d60 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -56,6 +56,8 @@ #include #include +#include + #include "viewutil.hxx" #include "global.hxx" @@ -124,6 +126,15 @@ sal_Int32 ScViewUtil::GetTransliterationType( USHORT nSlotID ) sal_Int32 nType = 0; switch ( nSlotID ) { + case SID_TRANSLITERATE_SENTENCE_CASE: + nType = com::sun::star::i18n::TransliterationModulesExtra::SENTENCE_CASE; + break; + case SID_TRANSLITERATE_TITLE_CASE: + nType = com::sun::star::i18n::TransliterationModulesExtra::TITLE_CASE; + break; + case SID_TRANSLITERATE_TOGGLE_CASE: + nType = com::sun::star::i18n::TransliterationModulesExtra::TOGGLE_CASE; + break; case SID_TRANSLITERATE_UPPER: nType = com::sun::star::i18n::TransliterationModules_LOWERCASE_UPPERCASE; break; diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml index ab3f121809fa..b97c37979983 100644 --- a/sc/uiconfig/scalc/menubar/menubar.xml +++ b/sc/uiconfig/scalc/menubar/menubar.xml @@ -233,8 +233,11 @@ - + + + + -- cgit v1.2.3 From f351e9aa30010fec27deb0ad705fd35744675c5b Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 17 Sep 2009 07:30:11 +0000 Subject: #i1601# Sentence case, Title case, and Toggle case transliteration added --- sd/sdi/_drvwsh.sdi | 15 +++++++++++++++ sd/sdi/outlnvsh.sdi | 15 +++++++++++++++ sd/source/ui/view/drviewse.cxx | 15 ++++++++++++++- sd/source/ui/view/drviewsf.cxx | 3 +++ sd/source/ui/view/outlnvsh.cxx | 18 +++++++++++++++++- sd/uiconfig/sdraw/menubar/menubar.xml | 5 ++++- sd/uiconfig/simpress/menubar/menubar.xml | 5 ++++- 7 files changed, 72 insertions(+), 4 deletions(-) diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index 8f758dda5858..4284594241fc 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -2176,6 +2176,21 @@ interface DrawView ExecMethod = FuSupport ; StateMethod = GetCtrlState ; ] + SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] + SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] + SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] SID_TRANSLITERATE_LOWER // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi index 3b0c49af6901..2b865562ed75 100644 --- a/sd/sdi/outlnvsh.sdi +++ b/sd/sdi/outlnvsh.sdi @@ -436,6 +436,21 @@ interface OutlineView ExecMethod = FuSupport ; StateMethod = GetMenuState ; ] + SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] + SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] + SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] SID_TRANSLITERATE_UPPER // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 0b3ecf1af6e7..3693b114a862 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -34,7 +34,8 @@ #include #include #include -#include +#include +#include #include @@ -1386,6 +1387,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) } break; + case SID_TRANSLITERATE_SENTENCE_CASE: + case SID_TRANSLITERATE_TITLE_CASE: + case SID_TRANSLITERATE_TOGGLE_CASE: case SID_TRANSLITERATE_UPPER: case SID_TRANSLITERATE_LOWER: case SID_TRANSLITERATE_HALFWIDTH: @@ -1401,6 +1405,15 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) switch( nSId ) { + case SID_TRANSLITERATE_SENTENCE_CASE: + nType = TransliterationModulesExtra::SENTENCE_CASE; + break; + case SID_TRANSLITERATE_TITLE_CASE: + nType = TransliterationModulesExtra::TITLE_CASE; + break; + case SID_TRANSLITERATE_TOGGLE_CASE: + nType = TransliterationModulesExtra::TOGGLE_CASE; + break; case SID_TRANSLITERATE_UPPER: nType = TransliterationModules_LOWERCASE_UPPERCASE; break; diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 2b1b7518666c..09e0a3692f5d 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -254,6 +254,9 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_KATAGANA, sal_True ); } + rSet.DisableItem( SID_TRANSLITERATE_SENTENCE_CASE ); + rSet.DisableItem( SID_TRANSLITERATE_TITLE_CASE ); + rSet.DisableItem( SID_TRANSLITERATE_TOGGLE_CASE ); rSet.DisableItem( SID_TRANSLITERATE_UPPER ); rSet.DisableItem( SID_TRANSLITERATE_LOWER ); rSet.DisableItem( SID_TRANSLITERATE_HALFWIDTH ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index e4eb22af0552..9c0a42534cf1 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -63,7 +63,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -532,6 +533,9 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) std::auto_ptr< OutlineViewModelChangeGuard > aGuard; if( pOlView && ( + (nSlot == SID_TRANSLITERATE_SENTENCE_CASE) || + (nSlot == SID_TRANSLITERATE_TITLE_CASE) || + (nSlot == SID_TRANSLITERATE_TOGGLE_CASE) || (nSlot == SID_TRANSLITERATE_UPPER) || (nSlot == SID_TRANSLITERATE_LOWER) || (nSlot == SID_TRANSLITERATE_HALFWIDTH) || @@ -665,6 +669,9 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) } break; + case SID_TRANSLITERATE_SENTENCE_CASE: + case SID_TRANSLITERATE_TITLE_CASE: + case SID_TRANSLITERATE_TOGGLE_CASE: case SID_TRANSLITERATE_UPPER: case SID_TRANSLITERATE_LOWER: case SID_TRANSLITERATE_HALFWIDTH: @@ -680,6 +687,15 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) switch( nSlot ) { + case SID_TRANSLITERATE_SENTENCE_CASE: + nType = TransliterationModulesExtra::SENTENCE_CASE; + break; + case SID_TRANSLITERATE_TITLE_CASE: + nType = TransliterationModulesExtra::TITLE_CASE; + break; + case SID_TRANSLITERATE_TOGGLE_CASE: + nType = TransliterationModulesExtra::TOGGLE_CASE; + break; case SID_TRANSLITERATE_UPPER: nType = TransliterationModules_LOWERCASE_UPPERCASE; break; diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml index e34baec0f29c..560714b115b4 100644 --- a/sd/uiconfig/sdraw/menubar/menubar.xml +++ b/sd/uiconfig/sdraw/menubar/menubar.xml @@ -183,8 +183,11 @@ - + + + + diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index ece53ad4c918..8fdb862a081c 100644 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -201,8 +201,11 @@ - + + + + -- cgit v1.2.3 From 6485417ddb43981ebc67ed22c0b585a8841ae1ab Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 17 Sep 2009 07:31:47 +0000 Subject: #i1601# Sentence case, Title case, and Toggle case transliteration added --- i18npool/inc/transliteration_body.hxx | 13 ++ i18npool/inc/transliteration_sentencecase.hxx | 69 ++++++++ i18npool/source/localedata/data/ak_GH.xml | 3 + i18npool/source/localedata/data/bs_BA.xml | 9 +- i18npool/source/localedata/data/ee_GH.xml | 3 + i18npool/source/localedata/data/en_GH.xml | 6 +- i18npool/source/localedata/data/en_US.xml | 3 + i18npool/source/localedata/data/eo.xml | 3 + i18npool/source/localedata/data/eu.xml | 5 +- i18npool/source/localedata/data/fur_IT.xml | 3 + i18npool/source/localedata/data/fy_NL.xml | 3 + i18npool/source/localedata/data/gsc_FR.xml | 11 +- i18npool/source/localedata/data/gug_PY.xml | 3 + i18npool/source/localedata/data/ha_GH.xml | 3 + i18npool/source/localedata/data/hil_PH.xml | 3 + i18npool/source/localedata/data/hr_HR.xml | 9 +- i18npool/source/localedata/data/hy_AM.xml | 3 + i18npool/source/localedata/data/is_IS.xml | 5 +- i18npool/source/localedata/data/ka_GE.xml | 3 + i18npool/source/localedata/data/kk_KZ.xml | 3 + i18npool/source/localedata/data/km_KH.xml | 3 + i18npool/source/localedata/data/ko_KR.xml | 5 +- i18npool/source/localedata/data/ku_TR.xml | 3 + i18npool/source/localedata/data/lg_UG.xml | 7 +- i18npool/source/localedata/data/ln_CD.xml | 3 + i18npool/source/localedata/data/lt_LT.xml | 5 +- i18npool/source/localedata/data/lv_LV.xml | 9 +- i18npool/source/localedata/data/mk_MK.xml | 3 + i18npool/source/localedata/data/mt_MT.xml | 3 + i18npool/source/localedata/data/my_MM.xml | 3 + i18npool/source/localedata/data/ne_NP.xml | 3 + i18npool/source/localedata/data/oc_FR.xml | 3 + i18npool/source/localedata/data/or_IN.xml | 3 + i18npool/source/localedata/data/sg_CF.xml | 3 + i18npool/source/localedata/data/sh_RS.xml | 3 + i18npool/source/localedata/data/shs_CA.xml | 3 + i18npool/source/localedata/data/sk_SK.xml | 5 +- i18npool/source/localedata/data/sl_SI.xml | 3 + i18npool/source/localedata/data/so_SO.xml | 3 + i18npool/source/localedata/data/sr_RS.xml | 3 + i18npool/source/localedata/data/sw_TZ.xml | 3 + i18npool/source/localedata/data/tk_TM.xml | 3 + i18npool/source/localedata/data/tpi_PG.xml | 3 + i18npool/source/localedata/data/uk_UA.xml | 9 +- i18npool/source/localedata/data/vi_VN.xml | 3 + i18npool/source/localedata/data/zh_CN.xml | 23 +-- i18npool/source/localedata/data/zh_TW.xml | 25 +-- .../source/registerservices/registerservices.cxx | 13 ++ i18npool/source/transliteration/makefile.mk | 1 + .../transliteration/transliteration_body.cxx | 15 ++ .../transliteration_sentencecase.cxx | 190 +++++++++++++++++++++ 51 files changed, 478 insertions(+), 49 deletions(-) create mode 100644 i18npool/inc/transliteration_sentencecase.hxx create mode 100644 i18npool/source/transliteration/transliteration_sentencecase.cxx diff --git a/i18npool/inc/transliteration_body.hxx b/i18npool/inc/transliteration_body.hxx index 518f4efd0d2f..6e5ef5c32776 100644 --- a/i18npool/inc/transliteration_body.hxx +++ b/i18npool/inc/transliteration_body.hxx @@ -93,6 +93,19 @@ public: }; #endif + +class Transliteration_titlecase : public Transliteration_body +{ +public: + Transliteration_titlecase(); +}; + +class Transliteration_togglecase : public Transliteration_body +{ +public: + Transliteration_togglecase(); +}; + } } } } #endif diff --git a/i18npool/inc/transliteration_sentencecase.hxx b/i18npool/inc/transliteration_sentencecase.hxx new file mode 100644 index 000000000000..11318f5cc963 --- /dev/null +++ b/i18npool/inc/transliteration_sentencecase.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: transliteration_Numeric.hxx,v $ + * $Revision: 1.6 $ + * + * 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 _I18NPPOL_TRANSLITERATION_SENTENCECASE_HXX_ +#define _I18NPPOL_TRANSLITERATION_SENTENCECASE_HXX_ + +#include + +namespace com { namespace sun { namespace star { namespace i18n { + +class Transliteration_sentencecase : public transliteration_commonclass { +public: + Transliteration_sentencecase( ); + + ::rtl::OUString SAL_CALL + transliterate( const ::rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, ::com::sun::star::uno::Sequence< sal_Int32 >& offset ) + throw(::com::sun::star::uno::RuntimeException); + + sal_Unicode SAL_CALL + transliterateChar2Char( sal_Unicode inChar) + throw(com::sun::star::i18n::MultipleCharsOutputException, + com::sun::star::uno::RuntimeException); + + // Methods which are shared. + sal_Int16 SAL_CALL getType( ) throw(::com::sun::star::uno::RuntimeException); + + ::rtl::OUString SAL_CALL + folding( const ::rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, ::com::sun::star::uno::Sequence< sal_Int32 >& offset ) + throw(::com::sun::star::uno::RuntimeException); + + sal_Bool SAL_CALL + equals( const ::rtl::OUString& str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32& nMatch1, const ::rtl::OUString& str2, sal_Int32 pos2, sal_Int32 nCount2, sal_Int32& nMatch2 ) + throw(::com::sun::star::uno::RuntimeException); + + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + transliterateRange( const ::rtl::OUString& str1, const ::rtl::OUString& str2 ) + throw(::com::sun::star::uno::RuntimeException); +}; + +} } } } + +#endif // _I18NPPOL_TRANSLITERATION_SENTENCECASE_HXX_ + diff --git a/i18npool/source/localedata/data/ak_GH.xml b/i18npool/source/localedata/data/ak_GH.xml index 95ac2069db31..afdbf1c2b227 100644 --- a/i18npool/source/localedata/data/ak_GH.xml +++ b/i18npool/source/localedata/data/ak_GH.xml @@ -337,8 +337,11 @@ + + + diff --git a/i18npool/source/localedata/data/bs_BA.xml b/i18npool/source/localedata/data/bs_BA.xml index 1a6eeb82ff44..0dea5e435ec5 100644 --- a/i18npool/source/localedata/data/bs_BA.xml +++ b/i18npool/source/localedata/data/bs_BA.xml @@ -366,9 +366,12 @@ - - - + + + + + + diff --git a/i18npool/source/localedata/data/ee_GH.xml b/i18npool/source/localedata/data/ee_GH.xml index eb19dec770da..2d4807774a8b 100644 --- a/i18npool/source/localedata/data/ee_GH.xml +++ b/i18npool/source/localedata/data/ee_GH.xml @@ -331,8 +331,11 @@ + + + diff --git a/i18npool/source/localedata/data/en_GH.xml b/i18npool/source/localedata/data/en_GH.xml index 660cd759944b..37437468a651 100644 --- a/i18npool/source/localedata/data/en_GH.xml +++ b/i18npool/source/localedata/data/en_GH.xml @@ -329,11 +329,7 @@ 2 - - - - - + True diff --git a/i18npool/source/localedata/data/en_US.xml b/i18npool/source/localedata/data/en_US.xml index 2a99dcd0fb14..7029b7cc5b30 100644 --- a/i18npool/source/localedata/data/en_US.xml +++ b/i18npool/source/localedata/data/en_US.xml @@ -475,8 +475,11 @@ + + + diff --git a/i18npool/source/localedata/data/eo.xml b/i18npool/source/localedata/data/eo.xml index 62098fdf75ef..33a42a8fd675 100644 --- a/i18npool/source/localedata/data/eo.xml +++ b/i18npool/source/localedata/data/eo.xml @@ -321,8 +321,11 @@ + + + diff --git a/i18npool/source/localedata/data/eu.xml b/i18npool/source/localedata/data/eu.xml index 5f0119b1285d..64184d0125f0 100644 --- a/i18npool/source/localedata/data/eu.xml +++ b/i18npool/source/localedata/data/eu.xml @@ -328,9 +328,12 @@ + + + + - diff --git a/i18npool/source/localedata/data/fur_IT.xml b/i18npool/source/localedata/data/fur_IT.xml index cfec124d68b6..5aee7cbfdf15 100644 --- a/i18npool/source/localedata/data/fur_IT.xml +++ b/i18npool/source/localedata/data/fur_IT.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/fy_NL.xml b/i18npool/source/localedata/data/fy_NL.xml index 651d13417842..a4a7cc48f2da 100644 --- a/i18npool/source/localedata/data/fy_NL.xml +++ b/i18npool/source/localedata/data/fy_NL.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/gsc_FR.xml b/i18npool/source/localedata/data/gsc_FR.xml index 0a13281f9d7b..01242e586e7a 100644 --- a/i18npool/source/localedata/data/gsc_FR.xml +++ b/i18npool/source/localedata/data/gsc_FR.xml @@ -323,9 +323,12 @@ - - - + + + + + + @@ -355,4 +358,4 @@ - \ No newline at end of file + diff --git a/i18npool/source/localedata/data/gug_PY.xml b/i18npool/source/localedata/data/gug_PY.xml index c21104c3d13e..60230ae64dac 100644 --- a/i18npool/source/localedata/data/gug_PY.xml +++ b/i18npool/source/localedata/data/gug_PY.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/ha_GH.xml b/i18npool/source/localedata/data/ha_GH.xml index 1794447c0e4d..6d56b80cc580 100644 --- a/i18npool/source/localedata/data/ha_GH.xml +++ b/i18npool/source/localedata/data/ha_GH.xml @@ -334,8 +334,11 @@ + + + diff --git a/i18npool/source/localedata/data/hil_PH.xml b/i18npool/source/localedata/data/hil_PH.xml index 6396ff261c90..1bd10219d366 100644 --- a/i18npool/source/localedata/data/hil_PH.xml +++ b/i18npool/source/localedata/data/hil_PH.xml @@ -324,8 +324,11 @@ + + + diff --git a/i18npool/source/localedata/data/hr_HR.xml b/i18npool/source/localedata/data/hr_HR.xml index 4c3786539b38..484efdcb9ba0 100644 --- a/i18npool/source/localedata/data/hr_HR.xml +++ b/i18npool/source/localedata/data/hr_HR.xml @@ -318,9 +318,12 @@ - - - + + + + + + diff --git a/i18npool/source/localedata/data/hy_AM.xml b/i18npool/source/localedata/data/hy_AM.xml index 92913732a090..47c2e35d6e7b 100644 --- a/i18npool/source/localedata/data/hy_AM.xml +++ b/i18npool/source/localedata/data/hy_AM.xml @@ -320,8 +320,11 @@ + + + diff --git a/i18npool/source/localedata/data/is_IS.xml b/i18npool/source/localedata/data/is_IS.xml index 7e77c1d2cdad..3b16c6e4bca5 100644 --- a/i18npool/source/localedata/data/is_IS.xml +++ b/i18npool/source/localedata/data/is_IS.xml @@ -314,9 +314,12 @@ + + + + - diff --git a/i18npool/source/localedata/data/ka_GE.xml b/i18npool/source/localedata/data/ka_GE.xml index d0a9a20369e1..ada35b465543 100644 --- a/i18npool/source/localedata/data/ka_GE.xml +++ b/i18npool/source/localedata/data/ka_GE.xml @@ -320,8 +320,11 @@ + + + diff --git a/i18npool/source/localedata/data/kk_KZ.xml b/i18npool/source/localedata/data/kk_KZ.xml index e5c8cc95d2fe..a9147655cdec 100644 --- a/i18npool/source/localedata/data/kk_KZ.xml +++ b/i18npool/source/localedata/data/kk_KZ.xml @@ -322,8 +322,11 @@ + + + diff --git a/i18npool/source/localedata/data/km_KH.xml b/i18npool/source/localedata/data/km_KH.xml index dff43def273b..bddd0e91791e 100644 --- a/i18npool/source/localedata/data/km_KH.xml +++ b/i18npool/source/localedata/data/km_KH.xml @@ -346,8 +346,11 @@ + + + diff --git a/i18npool/source/localedata/data/ko_KR.xml b/i18npool/source/localedata/data/ko_KR.xml index bbd5b0ded2be..3a3fbb0fb9a9 100644 --- a/i18npool/source/localedata/data/ko_KR.xml +++ b/i18npool/source/localedata/data/ko_KR.xml @@ -564,8 +564,11 @@ - + + + + diff --git a/i18npool/source/localedata/data/ku_TR.xml b/i18npool/source/localedata/data/ku_TR.xml index 4af9e2cd28d2..0413353b8486 100644 --- a/i18npool/source/localedata/data/ku_TR.xml +++ b/i18npool/source/localedata/data/ku_TR.xml @@ -330,8 +330,11 @@ + + + diff --git a/i18npool/source/localedata/data/lg_UG.xml b/i18npool/source/localedata/data/lg_UG.xml index c6b3b740b10d..5fc78c71cec2 100644 --- a/i18npool/source/localedata/data/lg_UG.xml +++ b/i18npool/source/localedata/data/lg_UG.xml @@ -323,8 +323,11 @@ - - + + + + + diff --git a/i18npool/source/localedata/data/ln_CD.xml b/i18npool/source/localedata/data/ln_CD.xml index 602b19fb8fd8..daf7376c9df5 100644 --- a/i18npool/source/localedata/data/ln_CD.xml +++ b/i18npool/source/localedata/data/ln_CD.xml @@ -327,8 +327,11 @@ + + + diff --git a/i18npool/source/localedata/data/lt_LT.xml b/i18npool/source/localedata/data/lt_LT.xml index c23f542d6b5d..cd4cb0aca929 100644 --- a/i18npool/source/localedata/data/lt_LT.xml +++ b/i18npool/source/localedata/data/lt_LT.xml @@ -346,9 +346,12 @@ + + + + - diff --git a/i18npool/source/localedata/data/lv_LV.xml b/i18npool/source/localedata/data/lv_LV.xml index e29a06eaf274..884980762a0e 100644 --- a/i18npool/source/localedata/data/lv_LV.xml +++ b/i18npool/source/localedata/data/lv_LV.xml @@ -371,9 +371,12 @@ - - - + + + + + + diff --git a/i18npool/source/localedata/data/mk_MK.xml b/i18npool/source/localedata/data/mk_MK.xml index b9862478513e..10e488e3cac1 100644 --- a/i18npool/source/localedata/data/mk_MK.xml +++ b/i18npool/source/localedata/data/mk_MK.xml @@ -322,8 +322,11 @@ + + + diff --git a/i18npool/source/localedata/data/mt_MT.xml b/i18npool/source/localedata/data/mt_MT.xml index 790bd97303e0..bcc5869932b4 100644 --- a/i18npool/source/localedata/data/mt_MT.xml +++ b/i18npool/source/localedata/data/mt_MT.xml @@ -324,8 +324,11 @@ + + + diff --git a/i18npool/source/localedata/data/my_MM.xml b/i18npool/source/localedata/data/my_MM.xml index dada8a5402d9..6c12c8986c8f 100644 --- a/i18npool/source/localedata/data/my_MM.xml +++ b/i18npool/source/localedata/data/my_MM.xml @@ -395,8 +395,11 @@ + + + diff --git a/i18npool/source/localedata/data/ne_NP.xml b/i18npool/source/localedata/data/ne_NP.xml index cca8be996a70..558027ac0e1c 100644 --- a/i18npool/source/localedata/data/ne_NP.xml +++ b/i18npool/source/localedata/data/ne_NP.xml @@ -322,8 +322,11 @@ + + + diff --git a/i18npool/source/localedata/data/oc_FR.xml b/i18npool/source/localedata/data/oc_FR.xml index 236f1c8dbb09..bb7e7ef02da1 100644 --- a/i18npool/source/localedata/data/oc_FR.xml +++ b/i18npool/source/localedata/data/oc_FR.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/or_IN.xml b/i18npool/source/localedata/data/or_IN.xml index 168b542f1894..22333451f6ea 100644 --- a/i18npool/source/localedata/data/or_IN.xml +++ b/i18npool/source/localedata/data/or_IN.xml @@ -322,8 +322,11 @@ + + + diff --git a/i18npool/source/localedata/data/sg_CF.xml b/i18npool/source/localedata/data/sg_CF.xml index 075b1a43ae18..61ee40b8081e 100644 --- a/i18npool/source/localedata/data/sg_CF.xml +++ b/i18npool/source/localedata/data/sg_CF.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/sh_RS.xml b/i18npool/source/localedata/data/sh_RS.xml index 4b744bdd5913..01faa188c9e2 100644 --- a/i18npool/source/localedata/data/sh_RS.xml +++ b/i18npool/source/localedata/data/sh_RS.xml @@ -211,8 +211,11 @@ + + + diff --git a/i18npool/source/localedata/data/shs_CA.xml b/i18npool/source/localedata/data/shs_CA.xml index 4060d002bbe2..505771c81eda 100644 --- a/i18npool/source/localedata/data/shs_CA.xml +++ b/i18npool/source/localedata/data/shs_CA.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/sk_SK.xml b/i18npool/source/localedata/data/sk_SK.xml index 7820ef290a46..b233f3981284 100644 --- a/i18npool/source/localedata/data/sk_SK.xml +++ b/i18npool/source/localedata/data/sk_SK.xml @@ -369,9 +369,12 @@ + + + + - diff --git a/i18npool/source/localedata/data/sl_SI.xml b/i18npool/source/localedata/data/sl_SI.xml index b4de5c4a184b..19139d5e0cc0 100644 --- a/i18npool/source/localedata/data/sl_SI.xml +++ b/i18npool/source/localedata/data/sl_SI.xml @@ -331,8 +331,11 @@ + + + diff --git a/i18npool/source/localedata/data/so_SO.xml b/i18npool/source/localedata/data/so_SO.xml index f5d666ec7e5a..4b8fb2e266ff 100644 --- a/i18npool/source/localedata/data/so_SO.xml +++ b/i18npool/source/localedata/data/so_SO.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/sr_RS.xml b/i18npool/source/localedata/data/sr_RS.xml index 4023c2d4afeb..13133333f37e 100644 --- a/i18npool/source/localedata/data/sr_RS.xml +++ b/i18npool/source/localedata/data/sr_RS.xml @@ -350,8 +350,11 @@ + + + diff --git a/i18npool/source/localedata/data/sw_TZ.xml b/i18npool/source/localedata/data/sw_TZ.xml index 22bf61807a54..3a92d8eb3593 100644 --- a/i18npool/source/localedata/data/sw_TZ.xml +++ b/i18npool/source/localedata/data/sw_TZ.xml @@ -322,8 +322,11 @@ + + + diff --git a/i18npool/source/localedata/data/tk_TM.xml b/i18npool/source/localedata/data/tk_TM.xml index cfd09c63c4ab..c30d1f782811 100644 --- a/i18npool/source/localedata/data/tk_TM.xml +++ b/i18npool/source/localedata/data/tk_TM.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/tpi_PG.xml b/i18npool/source/localedata/data/tpi_PG.xml index 0017a1081233..51cc3500cc57 100644 --- a/i18npool/source/localedata/data/tpi_PG.xml +++ b/i18npool/source/localedata/data/tpi_PG.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/uk_UA.xml b/i18npool/source/localedata/data/uk_UA.xml index 981c24f7c94f..1025096c7a6a 100644 --- a/i18npool/source/localedata/data/uk_UA.xml +++ b/i18npool/source/localedata/data/uk_UA.xml @@ -369,9 +369,12 @@ - - - + + + + + + diff --git a/i18npool/source/localedata/data/vi_VN.xml b/i18npool/source/localedata/data/vi_VN.xml index 4b9bfb266051..93fc1ee3adc4 100644 --- a/i18npool/source/localedata/data/vi_VN.xml +++ b/i18npool/source/localedata/data/vi_VN.xml @@ -323,8 +323,11 @@ + + + diff --git a/i18npool/source/localedata/data/zh_CN.xml b/i18npool/source/localedata/data/zh_CN.xml index 0fadbf5d9075..c9d1371cb753 100644 --- a/i18npool/source/localedata/data/zh_CN.xml +++ b/i18npool/source/localedata/data/zh_CN.xml @@ -415,16 +415,19 @@ - - - - - - - - - - + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/data/zh_TW.xml b/i18npool/source/localedata/data/zh_TW.xml index 1d1e476b7771..aa53647057f8 100644 --- a/i18npool/source/localedata/data/zh_TW.xml +++ b/i18npool/source/localedata/data/zh_TW.xml @@ -343,17 +343,20 @@ - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx index 870c49939648..697d3594e8d8 100644 --- a/i18npool/source/registerservices/registerservices.cxx +++ b/i18npool/source/registerservices/registerservices.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -173,6 +174,9 @@ IMPL_CREATEINSTANCE_MSF( TextConversion_zh ) IMPL_CREATEINSTANCE( Transliteration_u2l ) IMPL_CREATEINSTANCE( Transliteration_l2u ) +IMPL_CREATEINSTANCE( Transliteration_sentencecase ) +IMPL_CREATEINSTANCE( Transliteration_titlecase ) +IMPL_CREATEINSTANCE( Transliteration_togglecase ) IMPL_CREATEINSTANCE( Transliteration_caseignore ) IMPL_CREATEINSTANCE( hiraganaToKatakana ) IMPL_CREATEINSTANCE( katakanaToHiragana ) @@ -422,6 +426,15 @@ static const struct InstancesArray { { TRLT_SERVICELNAME_L10N, TRLT_IMPLNAME_PREFIX "LOWERCASE_UPPERCASE", &Transliteration_l2u_CreateInstance }, + { TRLT_SERVICELNAME_L10N, + TRLT_IMPLNAME_PREFIX "SENTENCE_CASE", + &Transliteration_sentencecase_CreateInstance }, + { TRLT_SERVICELNAME_L10N, + TRLT_IMPLNAME_PREFIX "TITLE_CASE", + &Transliteration_titlecase_CreateInstance }, + { TRLT_SERVICELNAME_L10N, + TRLT_IMPLNAME_PREFIX "TOGGLE_CASE", + &Transliteration_togglecase_CreateInstance }, { TRLT_SERVICELNAME_L10N, TRLT_IMPLNAME_PREFIX "IGNORE_CASE", &Transliteration_caseignore_CreateInstance }, diff --git a/i18npool/source/transliteration/makefile.mk b/i18npool/source/transliteration/makefile.mk index daf3068d4d20..5ad615c64dbe 100644 --- a/i18npool/source/transliteration/makefile.mk +++ b/i18npool/source/transliteration/makefile.mk @@ -50,6 +50,7 @@ SLOFILES= \ $(SLO)$/transliteration_OneToOne.obj \ $(SLO)$/transliteration_Ignore.obj \ $(SLO)$/transliteration_Numeric.obj \ + $(SLO)$/transliteration_sentencecase.obj \ $(SLO)$/hiraganaToKatakana.obj \ $(SLO)$/katakanaToHiragana.obj \ $(SLO)$/ignoreKana.obj \ diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index 0bea721a0c9d..d75eede13bf9 100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -261,4 +261,19 @@ Transliteration_l2u::Transliteration_l2u() implementationName = "com.sun.star.i18n.Transliteration.Transliteration_l2u"; } +Transliteration_titlecase::Transliteration_titlecase() +{ + nMappingType = MappingTypeToTitle; + transliterationName = "title(generic)"; + implementationName = "com.sun.star.i18n.Transliteration.Transliteration_titlecase"; +} + +Transliteration_togglecase::Transliteration_togglecase() +{ + nMappingType = MappingTypeLowerToUpper | MappingTypeUpperToLower; + transliterationName = "toggle(generic)"; + implementationName = "com.sun.star.i18n.Transliteration.Transliteration_togglecase"; +} + + } } } } diff --git a/i18npool/source/transliteration/transliteration_sentencecase.cxx b/i18npool/source/transliteration/transliteration_sentencecase.cxx new file mode 100644 index 000000000000..35f9a69abb4d --- /dev/null +++ b/i18npool/source/transliteration/transliteration_sentencecase.cxx @@ -0,0 +1,190 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: halfwidthToFullwidth.cxx,v $ + * $Revision: 1.12 $ + * + * 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_i18npool.hxx" + +// prevent internal compiler error with MSVC6SP3 +#include + +#include +#include +#define TRANSLITERATION_sentencecase +#include +#include +#include +#include +#include +#include + +using namespace com::sun::star::uno; +using namespace com::sun::star::lang; +using namespace rtl; + +namespace com { namespace sun { namespace star { namespace i18n { + + +Transliteration_sentencecase::Transliteration_sentencecase() +{ + transliterationName = "sentenceCase"; + implementationName = "com.sun.star.i18n.Transliteration.SENTENCE_CASE"; +} + +OUString SAL_CALL +Transliteration_sentencecase::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) + throw(RuntimeException) +{ + // inspired from Transliteration_body::transliterate + sal_Int32 nOffCount = 0, i; + bool bPoint = true; + if (useOffset) + { + for( i = 0; i < nCount; ++i ) { + sal_Unicode c = inStr.getStr()[ i + startPos ]; + if( sal_Unicode('.') == c || sal_Unicode('!') == c || sal_Unicode('?') == c ) { + bPoint = true; + nOffCount++; + } + else if( unicode::isAlpha( c ) || unicode::isDigit( c ) ) + { + const Mapping* map = 0; + if( bPoint && unicode::isLower( c )) + { + map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeLowerToUpper); + } + bPoint = false; + + if(map == 0) + { + nOffCount++; + } + else + { + nOffCount += map->nmap; + } + } + else + { + nOffCount++; + } + } + } + + bPoint = true; + rtl::OUStringBuffer result; + + if (useOffset) + { + result.ensureCapacity(nOffCount); + if ( nOffCount != offset.getLength() ) + offset.realloc( nOffCount ); + } + + + sal_Int32 j = 0; + sal_Int32 * pArr = offset.getArray(); + for( i = 0; i < nCount; ++i ) { + sal_Unicode c = inStr.getStr()[ i + startPos ]; + if( sal_Unicode('.') == c || sal_Unicode('!') == c || sal_Unicode('?') == c ) { + bPoint = true; + result.append(c); + pArr[j++] = i + startPos; + } + else if( unicode::isAlpha( c ) || unicode::isDigit( c ) ) + { + const Mapping* map = 0; + if( bPoint && unicode::isLower( c )) + { + map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeLowerToUpper); + } + bPoint = false; + + if(map == 0) + { + result.append( c ); + pArr[j++] = i + startPos; + } + else + { + for (sal_Int32 k = 0; k < map->nmap; k++) + { + result.append( map->map[k] ); + pArr[j++] = i + startPos; + } + } + } + else + { + result.append( c ); + pArr[j++] = i + startPos; + } + } + return result.makeStringAndClear(); +} + +sal_Unicode SAL_CALL +Transliteration_sentencecase::transliterateChar2Char( sal_Unicode inChar) + throw(RuntimeException, MultipleCharsOutputException) +{ + return inChar; +} + +sal_Int16 SAL_CALL Transliteration_sentencecase::getType() throw(RuntimeException) +{ + return TransliterationType::IGNORE; +} + +OUString SAL_CALL +Transliteration_sentencecase::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, + Sequence< sal_Int32 >& offset) throw(RuntimeException) +{ + return this->transliterate(inStr, startPos, nCount, offset); +} + +sal_Bool SAL_CALL Transliteration_sentencecase::equals( + const OUString& /*str1*/, sal_Int32 /*pos1*/, sal_Int32 /*nCount1*/, sal_Int32& /*nMatch1*/, + const OUString& /*str2*/, sal_Int32 /*pos2*/, sal_Int32 /*nCount2*/, sal_Int32& /*nMatch2*/) + throw(RuntimeException) +{ + throw RuntimeException(); +} + +Sequence< OUString > SAL_CALL +Transliteration_sentencecase::transliterateRange( const OUString& str1, const OUString& str2 ) + throw( RuntimeException) +{ + Sequence< OUString > ostr(2); + ostr[0] = str1; + ostr[1] = str2; + return ostr; +} + +} } } } + -- cgit v1.2.3 From 757f6d98c004988c98c506aa9bff4572affcf3e1 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 17 Sep 2009 07:35:16 +0000 Subject: #i1601# Sentence case, Title case, and Toggle case transliteration added --- sw/inc/editsh.hxx | 1 + sw/sdi/_textsh.sdi | 18 ++++++++++++++++++ sw/sdi/annotsh.sdi | 21 +++++++++++++++++++++ sw/sdi/drwtxtsh.sdi | 18 ++++++++++++++++++ sw/source/core/edit/editsh.cxx | 26 ++++++++++++++++++++++++++ sw/source/ui/shells/annotsh.cxx | 10 ++++++++++ sw/source/ui/shells/drwtxtsh.cxx | 10 ++++++++++ sw/source/ui/shells/textsh.cxx | 12 +++++++++++- sw/uiconfig/sglobal/menubar/menubar.xml | 5 ++++- sw/uiconfig/sweb/menubar/menubar.xml | 5 ++++- sw/uiconfig/swform/menubar/menubar.xml | 5 ++++- sw/uiconfig/swreport/menubar/menubar.xml | 5 ++++- sw/uiconfig/swriter/menubar/menubar.xml | 5 ++++- sw/uiconfig/swxform/menubar/menubar.xml | 5 ++++- 14 files changed, 139 insertions(+), 7 deletions(-) diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 83b0e5242a9e..020a0c52c486 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -201,6 +201,7 @@ public: // change text to Upper/Lower/Hiragana/Katagana/... void TransliterateText( sal_uInt32 nType ); + void TransliterateText( const String& rModuleName ); // count words in current selection void CountWords( SwDocStat& rStat ) const; diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index 3ce311a4d7c2..cd07a642c05d 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -1483,6 +1483,24 @@ interface BaseText DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] + SID_TRANSLITERATE_SENTENCE_CASE + [ + ExecMethod = ExecTransliteration; + StateMethod = NoState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + SID_TRANSLITERATE_TITLE_CASE + [ + ExecMethod = ExecTransliteration; + StateMethod = NoState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + SID_TRANSLITERATE_TOGGLE_CASE + [ + ExecMethod = ExecTransliteration; + StateMethod = NoState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] SID_TRANSLITERATE_UPPER [ ExecMethod = ExecTransliteration; diff --git a/sw/sdi/annotsh.sdi b/sw/sdi/annotsh.sdi index c3693daf6c19..591373d034c6 100755 --- a/sw/sdi/annotsh.sdi +++ b/sw/sdi/annotsh.sdi @@ -181,6 +181,27 @@ interface Annotation : _Annotation DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] + SID_TRANSLITERATE_SENTENCE_CASE + [ + ExecMethod = ExecTransliteration; + StateMethod = NoState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + + SID_TRANSLITERATE_TITLE_CASE + [ + ExecMethod = ExecTransliteration; + StateMethod = NoState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + + SID_TRANSLITERATE_TOGGLE_CASE + [ + ExecMethod = ExecTransliteration; + StateMethod = NoState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + SID_TRANSLITERATE_UPPER [ ExecMethod = ExecTransliteration; diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi index 8f6eb837af86..4bba952eead3 100644 --- a/sw/sdi/drwtxtsh.sdi +++ b/sw/sdi/drwtxtsh.sdi @@ -483,6 +483,24 @@ interface TextDrawText [ StateMethod = StateInsert ; ] + SID_TRANSLITERATE_SENTENCE_CASE + [ + ExecMethod = ExecTransliteration; + StateMethod = NoState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + SID_TRANSLITERATE_TITLE_CASE + [ + ExecMethod = ExecTransliteration; + StateMethod = NoState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + SID_TRANSLITERATE_TOGGLE_CASE + [ + ExecMethod = ExecTransliteration; + StateMethod = NoState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] SID_TRANSLITERATE_UPPER [ ExecMethod = ExecTransliteration; diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 0035a8880ba9..3bfea5fa6290 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -1182,6 +1182,32 @@ void SwEditShell::TransliterateText( sal_uInt32 nType ) EndAllAction(); } +void SwEditShell::TransliterateText( const String& rModuleName ) +{ + utl::TransliterationWrapper aTrans(::comphelper::getProcessServiceFactory(), 0 ); + aTrans.loadModuleByImplName( rModuleName, LANGUAGE_SYSTEM ); + StartAllAction(); + SET_CURR_SHELL( this ); + + SwPaM* pCrsr = GetCrsr(); + if( pCrsr->GetNext() != pCrsr ) + { + GetDoc()->StartUndo(UNDO_EMPTY, NULL); + FOREACHPAM_START( this ) + + if( PCURCRSR->HasMark() ) + GetDoc()->TransliterateText( *PCURCRSR, aTrans ); + + FOREACHPAM_END() + GetDoc()->EndUndo(UNDO_EMPTY, NULL); + } + else + GetDoc()->TransliterateText( *pCrsr, aTrans ); + + EndAllAction(); +} + + void SwEditShell::CountWords( SwDocStat& rStat ) const { FOREACHPAM_START( this ) diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 054220be6707..2e5a54076d7e 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -1286,6 +1287,15 @@ void SwAnnotationShell::ExecTransliteration(SfxRequest &rReq) switch( rReq.GetSlot() ) { + case SID_TRANSLITERATE_SENTENCE_CASE: + nMode = TransliterationModulesExtra::SENTENCE_CASE; + break; + case SID_TRANSLITERATE_TITLE_CASE: + nMode = TransliterationModulesExtra::TITLE_CASE; + break; + case SID_TRANSLITERATE_TOGGLE_CASE: + nMode = TransliterationModulesExtra::TOGGLE_CASE; + break; case SID_TRANSLITERATE_UPPER: nMode = TransliterationModules_LOWERCASE_UPPERCASE; break; diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 99a2bf71bca7..2b3d07d83b7d 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -723,6 +724,15 @@ void SwDrawTextShell::ExecTransliteration( SfxRequest & rReq ) switch( rReq.GetSlot() ) { + case SID_TRANSLITERATE_SENTENCE_CASE: + nMode = TransliterationModulesExtra::SENTENCE_CASE; + break; + case SID_TRANSLITERATE_TITLE_CASE: + nMode = TransliterationModulesExtra::TITLE_CASE; + break; + case SID_TRANSLITERATE_TOGGLE_CASE: + nMode = TransliterationModulesExtra::TOGGLE_CASE; + break; case SID_TRANSLITERATE_UPPER: nMode = TransliterationModules_LOWERCASE_UPPERCASE; break; diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 742e93b646c2..a16c8dc81616 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -67,7 +67,8 @@ #include #include #include -#include +#include +#include #include #include @@ -1029,6 +1030,15 @@ void SwTextShell::ExecTransliteration( SfxRequest & rReq ) switch( rReq.GetSlot() ) { + case SID_TRANSLITERATE_SENTENCE_CASE: + nMode = TransliterationModulesExtra::SENTENCE_CASE; + break; + case SID_TRANSLITERATE_TITLE_CASE: + nMode = TransliterationModulesExtra::TITLE_CASE; + break; + case SID_TRANSLITERATE_TOGGLE_CASE: + nMode = TransliterationModulesExtra::TOGGLE_CASE; + break; case SID_TRANSLITERATE_UPPER: nMode = TransliterationModules_LOWERCASE_UPPERCASE; break; diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml index 4b46f4d46a2a..e35a7d825418 100644 --- a/sw/uiconfig/sglobal/menubar/menubar.xml +++ b/sw/uiconfig/sglobal/menubar/menubar.xml @@ -216,8 +216,11 @@ - + + + + diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml index 4be8c6f8e791..45d9bebbc7b5 100644 --- a/sw/uiconfig/sweb/menubar/menubar.xml +++ b/sw/uiconfig/sweb/menubar/menubar.xml @@ -164,8 +164,11 @@ - + + + + diff --git a/sw/uiconfig/swform/menubar/menubar.xml b/sw/uiconfig/swform/menubar/menubar.xml index 13448e424754..7adebe218a31 100644 --- a/sw/uiconfig/swform/menubar/menubar.xml +++ b/sw/uiconfig/swform/menubar/menubar.xml @@ -216,8 +216,11 @@ - + + + + diff --git a/sw/uiconfig/swreport/menubar/menubar.xml b/sw/uiconfig/swreport/menubar/menubar.xml index 1f94b7ced1c3..95316fad4be0 100644 --- a/sw/uiconfig/swreport/menubar/menubar.xml +++ b/sw/uiconfig/swreport/menubar/menubar.xml @@ -216,8 +216,11 @@ - + + + + diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml index 7c44f84982a9..c675168efa8f 100644 --- a/sw/uiconfig/swriter/menubar/menubar.xml +++ b/sw/uiconfig/swriter/menubar/menubar.xml @@ -219,8 +219,11 @@ - + + + + diff --git a/sw/uiconfig/swxform/menubar/menubar.xml b/sw/uiconfig/swxform/menubar/menubar.xml index b37a8e14d232..7af7d4ccf2a8 100644 --- a/sw/uiconfig/swxform/menubar/menubar.xml +++ b/sw/uiconfig/swxform/menubar/menubar.xml @@ -217,8 +217,11 @@ - + + + + -- cgit v1.2.3 From b30d9f2d6c7cebd256c402c1ef206befc1455792 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 17 Sep 2009 07:37:25 +0000 Subject: #i1601# Sentence case, Title case, and Toggle case transliteration added --- .../data/org/openoffice/UI/GenericCommands.xcu | 25 +++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu b/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu index f066fb0b96dc..ea92b1edf576 100644 --- a/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu +++ b/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu @@ -2079,11 +2079,6 @@ 1 - - - ~Uppercase - - Insert Controls @@ -2092,11 +2087,31 @@ 1 + + + ~Sentence case + + ~Lowercase + + + ~Uppercase + + + + + ~Title case + + + + + T~oggle case + + H~alf-width -- cgit v1.2.3 From 8f6ae57d3358c67e704d63cfd99209af21201567 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 17 Sep 2009 07:38:27 +0000 Subject: #i1601# Sentence case, Title case, and Toggle case transliteration added --- .../org/openoffice/Office/UI/GenericCommands.xcu | 42 +++++++++++++++++----- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 23caee9af12d..0a3fe0a3bdd3 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -2093,22 +2093,22 @@ 1 - + + + Language Status + + + - ~Uppercase + Insert Controls 1 - - - Language Status - - - + - Insert Controls + ~Sentence case 1 @@ -2122,6 +2122,30 @@ 1 + + + ~Uppercase + + + 1 + + + + + ~Title case + + + 1 + + + + + T~oggle case + + + 1 + + H~alf-width -- cgit v1.2.3 From 76b8b7baa77573076292306400b7cb80ccc502e4 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 17 Sep 2009 07:39:00 +0000 Subject: #i1601# Sentence case, Title case, and Toggle case transliteration added --- unotools/source/i18n/transliterationwrapper.cxx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index bd33e447471f..2536b1aee1ca 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -34,11 +34,12 @@ #include #include #include -#ifndef _COMPHELPER_COMPONENTFACTORY_HXX_ #include -#endif + #include #include +#include +#include #define TRANSLIT_LIBRARYNAME "i18n" #define TRANSLIT_SERVICENAME "com.sun.star.i18n.Transliteration" @@ -168,14 +169,22 @@ void TransliterationWrapper::loadModuleIfNeeded( sal_uInt16 nLang ) sal_Bool bLoad = bFirstCall; bFirstCall = sal_False; - if( nLanguage != nLang ) + if( static_cast< sal_Int32 >(nType) == TransliterationModulesExtra::SENTENCE_CASE ) { - setLanguageLocaleImpl( nLang ); - if( !bLoad ) - bLoad = needLanguageForTheMode(); + if( bLoad ) + loadModuleByImplName(String::CreateFromAscii("SENTENCE_CASE"), nLang); + } + else + { + if( nLanguage != nLang ) + { + setLanguageLocaleImpl( nLang ); + if( !bLoad ) + bLoad = needLanguageForTheMode(); + } + if( bLoad ) + loadModuleImpl(); } - if( bLoad ) - loadModuleImpl(); } -- cgit v1.2.3 From 6aad92c994f65f44927b7186645c6c77b6b81ff9 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 17 Sep 2009 07:41:59 +0000 Subject: #i1601# Sentence case, Title case, and Toggle case transliteration added --- svx/inc/globlmn_tmpl.hrc | 29 ++++++++++++++++--- svx/inc/svx/svxids.hrc | 6 +++- svx/sdi/svx.sdi | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 5 deletions(-) diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc index d40ca4de1876..45488894b37a 100644 --- a/svx/inc/globlmn_tmpl.hrc +++ b/svx/inc/globlmn_tmpl.hrc @@ -1341,10 +1341,10 @@ {\ MenuItem\ {\ - Identifier = SID_TRANSLITERATE_UPPER ; \ - Command = ".uno:ChangeCaseToUpper" ; \ - HelpID = SID_TRANSLITERATE_UPPER ; \ - Text [ en-US ] = "~Uppercase";\ + Identifier = SID_TRANSLITERATE_SENTENCE_CASE; \ + Command = ".uno:ChangeCaseToSentenceCase" ; \ + HelpID = SID_TRANSLITERATE_SENTENCE_CASE; \ + Text [ en-US ] = "~Sentence case";\ };\ MenuItem\ {\ @@ -1354,6 +1354,27 @@ Text [ en-US ] = "~Lowercase";\ };\ MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_UPPER ; \ + Command = ".uno:ChangeCaseToUpper" ; \ + HelpID = SID_TRANSLITERATE_UPPER ; \ + Text [ en-US ] = "~Uppercase";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_TITLE_CASE; \ + Command = ".uno:ChangeCaseToTitleCase" ; \ + HelpID = SID_TRANSLITERATE_TITLE_CASE; \ + Text [ en-US ] = "~Title case (aka. First letter capitalization)";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_TOGGLE_CASE; \ + Command = ".uno:ChangeCaseToToggleCase" ; \ + HelpID = SID_TRANSLITERATE_TOGGLE_CASE; \ + Text [ en-US ] = "T~oggle case";\ + };\ + MenuItem\ {\ Identifier = SID_TRANSLITERATE_HALFWIDTH; \ Command = ".uno:ChangeCaseToHalfWidth" ; \ diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index d7c018bedaac..6ed62ada704d 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -1347,9 +1347,13 @@ #define SID_CHAR_DLG_PREVIEW_STRING (SID_SVX_START+1090) #define SID_RECHECK_DOCUMENT (SID_SVX_START+1091) #define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092) +#define SID_TRANSLITERATE_SENTENCE_CASE (SID_SVX_START+1093) +#define SID_TRANSLITERATE_TITLE_CASE (SID_SVX_START+1094) +#define SID_TRANSLITERATE_TOGGLE_CASE (SID_SVX_START+1095) + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE SID_ATTR_PARA_OUTLINE_LEVEL + 1 +#define SID_SVX_FIRSTFREE SID_TRANSLITERATE_TOGGLE_CASE + 1 // -------------------------------------------------------------------------- // Overflow check for slot IDs diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index a69aae4cf9fd..1a3b39b26eff 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -1457,6 +1457,81 @@ SfxVoidItem ChangeCaseToKatakana SID_TRANSLITERATE_KATAGANA GroupId = GID_FORMAT; ] +//-------------------------------------------------------------------------- +SfxVoidItem ChangeCaseToSentenceCase SID_TRANSLITERATE_SENTENCE_CASE +() +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_FORMAT; +] + +//-------------------------------------------------------------------------- +SfxVoidItem ChangeCaseToTitleCase SID_TRANSLITERATE_TITLE_CASE +() +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_FORMAT; +] + +//-------------------------------------------------------------------------- +SfxVoidItem ChangeCaseToToggleCase SID_TRANSLITERATE_TOGGLE_CASE +() +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_FORMAT; +] + //-------------------------------------------------------------------------- SfxVoidItem ChangeCaseToLower SID_TRANSLITERATE_LOWER () -- cgit v1.2.3 From 46f1a498f70bbed831ae1e01a3a016a26f298eba Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 23 Sep 2009 12:26:08 +0000 Subject: #i1601# transliteration for sentence case, title case and toggle case --- sw/source/core/edit/editsh.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 3bfea5fa6290..267d45fca53f 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -1159,8 +1159,7 @@ void SwEditShell::SetExtTextInputData( const CommandExtTextInputData& rData ) void SwEditShell::TransliterateText( sal_uInt32 nType ) { - utl::TransliterationWrapper aTrans( - ::comphelper::getProcessServiceFactory(), nType ); + utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), nType ); StartAllAction(); SET_CURR_SHELL( this ); -- cgit v1.2.3 From 3327c079e5160ba94d92e4a728a017c904ed2b99 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 23 Sep 2009 12:28:22 +0000 Subject: #i1601# transliteration for sentence case, title case and toggle case --- unotools/source/i18n/transliterationwrapper.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index 2536b1aee1ca..90ee4d8db14b 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -151,7 +151,10 @@ sal_Bool TransliterationWrapper::needLanguageForTheMode() const { return TransliterationModules_UPPERCASE_LOWERCASE == nType || TransliterationModules_LOWERCASE_UPPERCASE == nType || - TransliterationModules_IGNORE_CASE == nType; + TransliterationModules_IGNORE_CASE == nType || + TransliterationModulesExtra::SENTENCE_CASE == nType || + TransliterationModulesExtra::TITLE_CASE == nType || + TransliterationModulesExtra::TOGGLE_CASE == nType; } @@ -174,6 +177,16 @@ void TransliterationWrapper::loadModuleIfNeeded( sal_uInt16 nLang ) if( bLoad ) loadModuleByImplName(String::CreateFromAscii("SENTENCE_CASE"), nLang); } + else if( static_cast< sal_Int32 >(nType) == TransliterationModulesExtra::TITLE_CASE ) + { + if( bLoad ) + loadModuleByImplName(String::CreateFromAscii("TITLE_CASE"), nLang); + } + else if( static_cast< sal_Int32 >(nType) == TransliterationModulesExtra::TOGGLE_CASE ) + { + if( bLoad ) + loadModuleByImplName(String::CreateFromAscii("TOGGLE_CASE"), nLang); + } else { if( nLanguage != nLang ) -- cgit v1.2.3 From 892a6935027c6817ddf45720109273bb4fd282c6 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 23 Sep 2009 12:29:56 +0000 Subject: #i1601# transliteration for sentence case, title case and toggle case --- i18npool/inc/transliteration_body.hxx | 16 +- i18npool/inc/transliteration_sentencecase.hxx | 69 ------ .../source/registerservices/registerservices.cxx | 1 - i18npool/source/transliteration/makefile.mk | 1 - .../transliteration/transliteration_body.cxx | 256 ++++++++++++++++++++- .../transliteration_sentencecase.cxx | 190 --------------- i18npool/util/makefile.mk | 1 + 7 files changed, 262 insertions(+), 272 deletions(-) delete mode 100644 i18npool/inc/transliteration_sentencecase.hxx delete mode 100644 i18npool/source/transliteration/transliteration_sentencecase.cxx diff --git a/i18npool/inc/transliteration_body.hxx b/i18npool/inc/transliteration_body.hxx index 6e5ef5c32776..cac2c99e8764 100644 --- a/i18npool/inc/transliteration_body.hxx +++ b/i18npool/inc/transliteration_body.hxx @@ -94,17 +94,29 @@ public: #endif +#if defined( TRANSLITERATION_ALL ) +class Transliteration_togglecase : public Transliteration_body +{ +public: + Transliteration_togglecase(); +}; + class Transliteration_titlecase : public Transliteration_body { public: Transliteration_titlecase(); + + virtual rtl::OUString SAL_CALL transliterate( const rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset ) throw(com::sun::star::uno::RuntimeException); }; -class Transliteration_togglecase : public Transliteration_body +class Transliteration_sentencecase : public Transliteration_body { public: - Transliteration_togglecase(); + Transliteration_sentencecase(); + + virtual rtl::OUString SAL_CALL transliterate( const rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset ) throw(com::sun::star::uno::RuntimeException); }; +#endif } } } } diff --git a/i18npool/inc/transliteration_sentencecase.hxx b/i18npool/inc/transliteration_sentencecase.hxx deleted file mode 100644 index 11318f5cc963..000000000000 --- a/i18npool/inc/transliteration_sentencecase.hxx +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: transliteration_Numeric.hxx,v $ - * $Revision: 1.6 $ - * - * 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 _I18NPPOL_TRANSLITERATION_SENTENCECASE_HXX_ -#define _I18NPPOL_TRANSLITERATION_SENTENCECASE_HXX_ - -#include - -namespace com { namespace sun { namespace star { namespace i18n { - -class Transliteration_sentencecase : public transliteration_commonclass { -public: - Transliteration_sentencecase( ); - - ::rtl::OUString SAL_CALL - transliterate( const ::rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, ::com::sun::star::uno::Sequence< sal_Int32 >& offset ) - throw(::com::sun::star::uno::RuntimeException); - - sal_Unicode SAL_CALL - transliterateChar2Char( sal_Unicode inChar) - throw(com::sun::star::i18n::MultipleCharsOutputException, - com::sun::star::uno::RuntimeException); - - // Methods which are shared. - sal_Int16 SAL_CALL getType( ) throw(::com::sun::star::uno::RuntimeException); - - ::rtl::OUString SAL_CALL - folding( const ::rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, ::com::sun::star::uno::Sequence< sal_Int32 >& offset ) - throw(::com::sun::star::uno::RuntimeException); - - sal_Bool SAL_CALL - equals( const ::rtl::OUString& str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32& nMatch1, const ::rtl::OUString& str2, sal_Int32 pos2, sal_Int32 nCount2, sal_Int32& nMatch2 ) - throw(::com::sun::star::uno::RuntimeException); - - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - transliterateRange( const ::rtl::OUString& str1, const ::rtl::OUString& str2 ) - throw(::com::sun::star::uno::RuntimeException); -}; - -} } } } - -#endif // _I18NPPOL_TRANSLITERATION_SENTENCECASE_HXX_ - diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx index 697d3594e8d8..642e6b0f5736 100644 --- a/i18npool/source/registerservices/registerservices.cxx +++ b/i18npool/source/registerservices/registerservices.cxx @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include diff --git a/i18npool/source/transliteration/makefile.mk b/i18npool/source/transliteration/makefile.mk index 5ad615c64dbe..daf3068d4d20 100644 --- a/i18npool/source/transliteration/makefile.mk +++ b/i18npool/source/transliteration/makefile.mk @@ -50,7 +50,6 @@ SLOFILES= \ $(SLO)$/transliteration_OneToOne.obj \ $(SLO)$/transliteration_Ignore.obj \ $(SLO)$/transliteration_Numeric.obj \ - $(SLO)$/transliteration_sentencecase.obj \ $(SLO)$/hiraganaToKatakana.obj \ $(SLO)$/katakanaToHiragana.obj \ $(SLO)$/ignoreKana.obj \ diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index d75eede13bf9..0426f89b604d 100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -31,7 +31,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_i18npool.hxx" +#include #include +#include + +#include +#include + + +#include "CharacterClassificationImpl.hxx" +#include "breakiteratorImpl.hxx" + #define TRANSLITERATION_ALL #include "transliteration_body.hxx" @@ -39,8 +49,11 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::rtl; +#define A2OU(x) OUString::createFromAscii(x) + namespace com { namespace sun { namespace star { namespace i18n { + Transliteration_body::Transliteration_body() { nMappingType = 0; @@ -71,9 +84,35 @@ Transliteration_body::transliterateRange( const OUString& str1, const OUString& return ostr; } + +static sal_uInt8 lcl_getMappingTypeForToggleCase( sal_uInt8 nMappingType, sal_Unicode cChar ) +{ + sal_uInt8 nRes = nMappingType; + + // take care of TOGGLE_CASE transliteration: + // nMappingType should not be a combination of flags, thuse we decide now + // which one to use. + if (nMappingType == (MappingTypeLowerToUpper | MappingTypeUpperToLower)) + { + const sal_Int16 nType = unicode::getUnicodeType( cChar ); + if (nType & 0x02 /* lower case*/) + nRes = MappingTypeLowerToUpper; + else + { + DBG_ASSERT( nType & 0x01 /* upper case */, "uppercase character expected! 'Toggle case' failed?" ); + nRes = MappingTypeUpperToLower; + } + } + + return nRes; +} + + OUString SAL_CALL -Transliteration_body::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, - Sequence< sal_Int32 >& offset) throw(RuntimeException) +Transliteration_body::transliterate( + const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, + Sequence< sal_Int32 >& offset) + throw(RuntimeException) { #if 0 /* Performance optimization: @@ -142,7 +181,12 @@ Transliteration_body::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nOffCount = 0, i; for (i = 0; i < nCount; i++) { - const Mapping &map = casefolding::getValue(in, i, nCount, aLocale, nMappingType); + // take care of TOGGLE_CASE transliteration: + sal_uInt8 nTmpMappingType = nMappingType; + if (nMappingType == (MappingTypeLowerToUpper | MappingTypeUpperToLower)) + nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] ); + + const Mapping &map = casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType ); nOffCount += map.nmap; } rtl_uString* pStr = x_rtl_uString_new_WithLength( nOffCount, 1 ); // our x_rtl_ustring.h @@ -155,7 +199,12 @@ Transliteration_body::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 * pArr = offset.getArray(); for (i = 0; i < nCount; i++) { - const Mapping &map = casefolding::getValue(in, i, nCount, aLocale, nMappingType); + // take care of TOGGLE_CASE transliteration: + sal_uInt8 nTmpMappingType = nMappingType; + if (nMappingType == (MappingTypeLowerToUpper | MappingTypeUpperToLower)) + nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] ); + + const Mapping &map = casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType ); for (sal_Int32 k = 0; k < map.nmap; k++) { pArr[j] = i + startPos; @@ -187,7 +236,12 @@ Transliteration_body::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 j = 0; for ( sal_Int32 i = 0; i < nCount; i++) { - const Mapping &map = casefolding::getValue(in, i, nCount, aLocale, nMappingType); + // take care of TOGGLE_CASE transliteration: + sal_uInt8 nTmpMappingType = nMappingType; + if (nMappingType == (MappingTypeLowerToUpper | MappingTypeUpperToLower)) + nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] ); + + const Mapping &map = casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType ); for (sal_Int32 k = 0; k < map.nmap; k++) { out[j++] = map.map[k]; @@ -261,6 +315,17 @@ Transliteration_l2u::Transliteration_l2u() implementationName = "com.sun.star.i18n.Transliteration.Transliteration_l2u"; } +Transliteration_togglecase::Transliteration_togglecase() +{ + // usually nMappingType must NOT be a combiantion of different flages here, + // but we take care of that problem in Transliteration_body::transliterate above + // before that value is used. There we will decide which of both is to be used on + // a per character basis. + nMappingType = MappingTypeLowerToUpper | MappingTypeUpperToLower; + transliterationName = "toggle(generic)"; + implementationName = "com.sun.star.i18n.Transliteration.Transliteration_togglecase"; +} + Transliteration_titlecase::Transliteration_titlecase() { nMappingType = MappingTypeToTitle; @@ -268,12 +333,185 @@ Transliteration_titlecase::Transliteration_titlecase() implementationName = "com.sun.star.i18n.Transliteration.Transliteration_titlecase"; } -Transliteration_togglecase::Transliteration_togglecase() +rtl::OUString SAL_CALL Transliteration_titlecase::transliterate( + const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, + Sequence< sal_Int32 >& /*offset*/ ) + throw(RuntimeException) +{ + Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); + CharacterClassificationImpl aCharClassImpl( xMSF ); + + // possible problem: the locale is not exactly specific for each word in the text... + OUString aRes( aCharClassImpl.toTitle( inStr, startPos, nCount, aLocale ) ); + return aRes; +} + +Transliteration_sentencecase::Transliteration_sentencecase() { - nMappingType = MappingTypeLowerToUpper | MappingTypeUpperToLower; - transliterationName = "toggle(generic)"; - implementationName = "com.sun.star.i18n.Transliteration.Transliteration_togglecase"; + nMappingType = MappingTypeToTitle; // though only to be applied to the first word... + transliterationName = "sentence(generic)"; + implementationName = "com.sun.star.i18n.Transliteration.Transliteration_sentencecase"; } +rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( + const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, + Sequence< sal_Int32 >& offset ) + throw(RuntimeException) +{ + // inspired from Transliteration_body::transliterate + sal_Int32 nOffCount = 0, i; + bool bPoint = true; + if (useOffset) + { + for( i = 0; i < nCount; ++i ) { + sal_Unicode c = inStr.getStr()[ i + startPos ]; + if( sal_Unicode('.') == c || sal_Unicode('!') == c || sal_Unicode('?') == c ) { + bPoint = true; + nOffCount++; + } + else if( unicode::isAlpha( c ) || unicode::isDigit( c ) ) + { + const Mapping* map = 0; + if( bPoint && unicode::isLower( c )) + { + map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeLowerToUpper); + bPoint = false; + } + else if (!bPoint && unicode::isUpper( c )) + { + map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeUpperToLower); + } + + if(map == 0) + { + nOffCount++; + } + else + { + nOffCount += map->nmap; + } + } + else + { + nOffCount++; + } + } + } + + bPoint = true; + rtl::OUStringBuffer result; + + if (useOffset) + { + result.ensureCapacity(nOffCount); + if ( nOffCount != offset.getLength() ) + offset.realloc( nOffCount ); + } + + + sal_Int32 j = 0; + sal_Int32 * pArr = offset.getArray(); + for( i = 0; i < nCount; ++i ) { + sal_Unicode c = inStr.getStr()[ i + startPos ]; + if( sal_Unicode('.') == c || sal_Unicode('!') == c || sal_Unicode('?') == c ) { + bPoint = true; + result.append(c); + pArr[j++] = i + startPos; + } + else if( unicode::isAlpha( c ) || unicode::isDigit( c ) ) + { + const Mapping* map = 0; + if( bPoint && unicode::isLower( c )) + { + map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeLowerToUpper); + } + else if (!bPoint && unicode::isUpper( c )) + { + map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeUpperToLower); + } + + if(map == 0) + { + result.append( c ); + pArr[j++] = i + startPos; + } + else + { + for (sal_Int32 k = 0; k < map->nmap; k++) + { + result.append( map->map[k] ); + pArr[j++] = i + startPos; + } + } + bPoint = false; + } + else + { + result.append( c ); + pArr[j++] = i + startPos; + } + } + return result.makeStringAndClear(); +} + +#if 0 +// TL: alternative implemntation try. But breakiterator has its problem too since +// beginOfSentence does not work as expected with '.'. See comment below. +// For the time being I will leave this code here as a from-scratch sample if the +// breakiterator works better at some point... +rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( + const OUString& inStr, sal_Int32 nStartPos, sal_Int32 nCount, + Sequence< sal_Int32 >& /*offset*/ ) + throw(RuntimeException) +{ + OUString aRes( inStr.copy( nStartPos, nCount ) ); + + if (nStartPos >= 0 && nStartPos < inStr.getLength() && nCount > 0) + { + Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); + BreakIteratorImpl brk( xMSF ); + + sal_Int32 nSentenceStart = -1, nOldSentenceStart = -1; + sal_Int32 nPos = nStartPos + nCount - 1; + while (nPos >= nStartPos && nPos != -1) + { + // possible problem: the locale is not exactly specific for each sentence in the text, + // but it is the only one we have... + nOldSentenceStart = nSentenceStart; + nSentenceStart = brk.beginOfSentence( inStr, nPos, aLocale ); + + // since the breakiterator completely ignores '.' characvters as end-of-sentence when + // the next word is lower case we need to take care of that ourself. The drawback: + // la mid-sentence abbreviation like e.g. will now be identified as end-of-sentence. :-( + // Well, at least the other product does it in the same way... + sal_Int32 nFullStopPos = inStr.lastIndexOf( (sal_Unicode)'.', nPos ); + nPos = nSentenceStart; + if (nFullStopPos > 0 && nFullStopPos > nSentenceStart) + { + Boundary aBd2 = brk.nextWord( inStr, nFullStopPos, aLocale, WordType::DICTIONARY_WORD ); + nSentenceStart = aBd2.startPos; + nPos = nFullStopPos; + } + + if (nSentenceStart < nOldSentenceStart || nOldSentenceStart == -1) + { + // the sentence start might be a quotation mark or some kind of bracket, thus + // we need the first dictionary word starting or following this position + // Boundary aBd1 = brk.nextWord( inStr, nSentenceStart, aLocale, WordType::DICTIONARY_WORD ); + Boundary aBd2 = brk.getWordBoundary( inStr, nSentenceStart, aLocale, WordType::DICTIONARY_WORD, true ); + // OUString aWord1( inStr.copy( aBd1.startPos, aBd1.endPos - aBd1.startPos + 1 ) ); + OUString aWord2( inStr.copy( aBd2.startPos, aBd2.endPos - aBd2.startPos + 1 ) ); + } + else + break; // prevent endless loop + + // continue with previous sentence + if (nPos != -1) + --nPos; + } + } + return aRes; +} +#endif } } } } diff --git a/i18npool/source/transliteration/transliteration_sentencecase.cxx b/i18npool/source/transliteration/transliteration_sentencecase.cxx deleted file mode 100644 index 35f9a69abb4d..000000000000 --- a/i18npool/source/transliteration/transliteration_sentencecase.cxx +++ /dev/null @@ -1,190 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: halfwidthToFullwidth.cxx,v $ - * $Revision: 1.12 $ - * - * 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_i18npool.hxx" - -// prevent internal compiler error with MSVC6SP3 -#include - -#include -#include -#define TRANSLITERATION_sentencecase -#include -#include -#include -#include -#include -#include - -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; -using namespace rtl; - -namespace com { namespace sun { namespace star { namespace i18n { - - -Transliteration_sentencecase::Transliteration_sentencecase() -{ - transliterationName = "sentenceCase"; - implementationName = "com.sun.star.i18n.Transliteration.SENTENCE_CASE"; -} - -OUString SAL_CALL -Transliteration_sentencecase::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) - throw(RuntimeException) -{ - // inspired from Transliteration_body::transliterate - sal_Int32 nOffCount = 0, i; - bool bPoint = true; - if (useOffset) - { - for( i = 0; i < nCount; ++i ) { - sal_Unicode c = inStr.getStr()[ i + startPos ]; - if( sal_Unicode('.') == c || sal_Unicode('!') == c || sal_Unicode('?') == c ) { - bPoint = true; - nOffCount++; - } - else if( unicode::isAlpha( c ) || unicode::isDigit( c ) ) - { - const Mapping* map = 0; - if( bPoint && unicode::isLower( c )) - { - map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeLowerToUpper); - } - bPoint = false; - - if(map == 0) - { - nOffCount++; - } - else - { - nOffCount += map->nmap; - } - } - else - { - nOffCount++; - } - } - } - - bPoint = true; - rtl::OUStringBuffer result; - - if (useOffset) - { - result.ensureCapacity(nOffCount); - if ( nOffCount != offset.getLength() ) - offset.realloc( nOffCount ); - } - - - sal_Int32 j = 0; - sal_Int32 * pArr = offset.getArray(); - for( i = 0; i < nCount; ++i ) { - sal_Unicode c = inStr.getStr()[ i + startPos ]; - if( sal_Unicode('.') == c || sal_Unicode('!') == c || sal_Unicode('?') == c ) { - bPoint = true; - result.append(c); - pArr[j++] = i + startPos; - } - else if( unicode::isAlpha( c ) || unicode::isDigit( c ) ) - { - const Mapping* map = 0; - if( bPoint && unicode::isLower( c )) - { - map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeLowerToUpper); - } - bPoint = false; - - if(map == 0) - { - result.append( c ); - pArr[j++] = i + startPos; - } - else - { - for (sal_Int32 k = 0; k < map->nmap; k++) - { - result.append( map->map[k] ); - pArr[j++] = i + startPos; - } - } - } - else - { - result.append( c ); - pArr[j++] = i + startPos; - } - } - return result.makeStringAndClear(); -} - -sal_Unicode SAL_CALL -Transliteration_sentencecase::transliterateChar2Char( sal_Unicode inChar) - throw(RuntimeException, MultipleCharsOutputException) -{ - return inChar; -} - -sal_Int16 SAL_CALL Transliteration_sentencecase::getType() throw(RuntimeException) -{ - return TransliterationType::IGNORE; -} - -OUString SAL_CALL -Transliteration_sentencecase::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, - Sequence< sal_Int32 >& offset) throw(RuntimeException) -{ - return this->transliterate(inStr, startPos, nCount, offset); -} - -sal_Bool SAL_CALL Transliteration_sentencecase::equals( - const OUString& /*str1*/, sal_Int32 /*pos1*/, sal_Int32 /*nCount1*/, sal_Int32& /*nMatch1*/, - const OUString& /*str2*/, sal_Int32 /*pos2*/, sal_Int32 /*nCount2*/, sal_Int32& /*nMatch2*/) - throw(RuntimeException) -{ - throw RuntimeException(); -} - -Sequence< OUString > SAL_CALL -Transliteration_sentencecase::transliterateRange( const OUString& str1, const OUString& str2 ) - throw( RuntimeException) -{ - Sequence< OUString > ostr(2); - ostr[0] = str1; - ostr[1] = str2; - return ostr; -} - -} } } } - diff --git a/i18npool/util/makefile.mk b/i18npool/util/makefile.mk index 582089a309e8..e6c243007fd2 100644 --- a/i18npool/util/makefile.mk +++ b/i18npool/util/makefile.mk @@ -72,6 +72,7 @@ SHL1LIBS=$(LIB1TARGET) SHL1STDLIBS= \ $(I18NUTILLIB) \ $(I18NISOLANGLIB) \ + $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(SALLIB) \ -- cgit v1.2.3 From d86ed27c5d8b22f5c0fe2094061ecc9bec07f2af Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 23 Sep 2009 12:32:20 +0000 Subject: #i1601# transliteration for sentence case, title case and toggle case --- svx/inc/globlmn_tmpl.hrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc index 45488894b37a..8f5e3f390a1b 100644 --- a/svx/inc/globlmn_tmpl.hrc +++ b/svx/inc/globlmn_tmpl.hrc @@ -1365,7 +1365,7 @@ Identifier = SID_TRANSLITERATE_TITLE_CASE; \ Command = ".uno:ChangeCaseToTitleCase" ; \ HelpID = SID_TRANSLITERATE_TITLE_CASE; \ - Text [ en-US ] = "~Title case (aka. First letter capitalization)";\ + Text [ en-US ] = "~Title case";\ };\ MenuItem\ {\ -- cgit v1.2.3 From 76812dd089689fc486535d7748a21a1e1f55e503 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 24 Sep 2009 08:26:57 +0000 Subject: #i105261# zulu fingerprint for language guessing added --- libtextcat/data/new_fingerprints/fpdb.conf | 1 + libtextcat/data/new_fingerprints/zulu.lm | 400 +++++++++++++++++++++++++++++ 2 files changed, 401 insertions(+) create mode 100644 libtextcat/data/new_fingerprints/zulu.lm diff --git a/libtextcat/data/new_fingerprints/fpdb.conf b/libtextcat/data/new_fingerprints/fpdb.conf index 5b54fef1d7ad..df56f9e270ef 100644 --- a/libtextcat/data/new_fingerprints/fpdb.conf +++ b/libtextcat/data/new_fingerprints/fpdb.conf @@ -82,3 +82,4 @@ ukrainian.lm uk--utf8 vietnamese.lm vi--utf8 welsh.lm cy--utf8 yiddish_utf.lm yi--utf8 +zulu.lm zu--utf8 diff --git a/libtextcat/data/new_fingerprints/zulu.lm b/libtextcat/data/new_fingerprints/zulu.lm new file mode 100644 index 000000000000..f30c09ced93f --- /dev/null +++ b/libtextcat/data/new_fingerprints/zulu.lm @@ -0,0 +1,400 @@ +_ +a +e +i +n +u +o +l +k +h +s +a_ +b +t +m +g +w +z +e_ +i_ +ng +ku +d +y +la +an +_n +th +le +_u +o_ +el +ba +_k +en +in +wa +p +_e +zi +. +hi +si +al +ha +uk +ab +_i +r +is +ka +_a +kh +we +li +ni +ma +_ng +he +ul +._ +ga +thi +la_ +be +ak +c +on +nd +na +ok +am +lo +ho +, +se +ph +hi_ +ut +es +nga +_ku +,_ +ez +thi_ +un +uth +le_ +uku +hu +f +u_ +um +ek +ne +go +q +_uk +at +aba +_l +sh +lu +M +_uku +ol +_b +hl +ni_ +ngo +kw +- +N +ik +oku +em +nt +as +ge +az +ya +iz +sa +_o +S +uthi +A +za +_w +wa_ +_s +mb +kut +kuth +ela +ye +_y +uthi_ +il +ay +ele +ba_ +I +dl +nge +ath +ub +ke +U +zo +na_ +yi +us +kuthi +esi +ob +v +om +ama +it +lo_ +bu +L +ezi +j +ny +im +ing +li_ +_ab +eni +no +de +ela_ +ze +ang +ko +ala +lw +yo +zin +_U +lel +eng +mi +_ngo +eb +uz +me +gi +ti +ukut +so +ukuth +bo +da +_ba +nz +_aba +the +eli +akh +eni_ +E +ban +s_ +aka +_kw +ma_ +ap +_ukut +he_ +ini +di +K +ka_ +ib +kwa +ulu +ele_ +kho +nj +bi +_z +khu +we_ +lal +enz +ho_ +et +C +gu +zi_ +and +hla +ngi +pha +_um +_ka +isi +_nge +isa +aph +ung +izi +dla +ala_ +zw +nde +to +n_ +ne_ +nk +ke_ +_I +athi +_no +lan +_wa +kul +B +ind +fu +wen +ikh +azi +ule +kub +e. +_S +x +o. +ona +kha +_iz +je +bh +_M +er +kwe +oba +ane +O +_N +sa_ +a. +lwa +_ez +kus +ki +mu +od +" +ebe +P +_nga +hul +_m +ase +ben +_be +T +ic +nda +_si +_na +/ +ant +ngu +ad +anga +nje +ith +a._ +ye_ +athi_ +R +os +alo +tha +za_ +eth +_es +uma +ana +ile +te +ale +aban +: +_A +oba_ +hat +kun +ha_ +phe +be_ +ali +_am +si_ +wo +uy +sik +ise +kan +hath +dlal +_ne +zwe +aw +han +tu +nye +qe +_ko +ah +hel +thu +isa_ +gob +_K +_lo +ta +_ama +ot +ula +_em +ze_ +i. +ngob +_izi +hol +ar +ani +ole +uba +_in +up +eka +ini_ +goba +tho +hon +_ezi +ona_ +ezin +ngoba +lu_ +goba_ +ip +a, +eli_ +t_ +nya +ndl +sha +_is +the_ +i._ +amb -- cgit v1.2.3 From 221011588e12dc8989cfb065e34d4e7eee41e8ec Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 24 Sep 2009 08:32:49 +0000 Subject: #i105261# zulu fingerprint for language guessing added --- scp2/source/ooo/file_ooo.scp | 6 ++++++ scp2/source/ooo/module_hidden_ooo.scp | 1 + 2 files changed, 7 insertions(+) diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp index 5ddbbe70b70f..6d3c7555fe86 100644 --- a/scp2/source/ooo/file_ooo.scp +++ b/scp2/source/ooo/file_ooo.scp @@ -1061,6 +1061,12 @@ File gid_File_Lm_Yiddish_Utf Styles = (PACKED); End +File gid_File_Lm_Zulu + TXT_FILE_BODY; + Name = "zulu.lm"; + Dir = gid_Dir_Share_Fingerprint; + Styles = (PACKED); +End diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp index c08852aae29a..fee485ca0d85 100644 --- a/scp2/source/ooo/module_hidden_ooo.scp +++ b/scp2/source/ooo/module_hidden_ooo.scp @@ -625,6 +625,7 @@ Module gid_Module_Root_Files_6 gid_File_Lm_Vietnamese, gid_File_Lm_Welsh, gid_File_Lm_Yiddish_Utf, + gid_File_Lm_Zulu, gid_File_Mod_Chart, gid_File_Mod_Datastyl, gid_File_Mod_Defs, -- cgit v1.2.3 From 637351b5bf6cf81b06beb4374a7eb6656e7f7394 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 24 Sep 2009 08:39:39 +0000 Subject: #i105261# zulu fingerprint for language guessing added --- libtextcat/data/new_fingerprints/lm/zulu.lm | 400 ++++++++++++++++++++++++++++ libtextcat/data/new_fingerprints/zulu.lm | 400 ---------------------------- 2 files changed, 400 insertions(+), 400 deletions(-) create mode 100644 libtextcat/data/new_fingerprints/lm/zulu.lm delete mode 100644 libtextcat/data/new_fingerprints/zulu.lm diff --git a/libtextcat/data/new_fingerprints/lm/zulu.lm b/libtextcat/data/new_fingerprints/lm/zulu.lm new file mode 100644 index 000000000000..f30c09ced93f --- /dev/null +++ b/libtextcat/data/new_fingerprints/lm/zulu.lm @@ -0,0 +1,400 @@ +_ +a +e +i +n +u +o +l +k +h +s +a_ +b +t +m +g +w +z +e_ +i_ +ng +ku +d +y +la +an +_n +th +le +_u +o_ +el +ba +_k +en +in +wa +p +_e +zi +. +hi +si +al +ha +uk +ab +_i +r +is +ka +_a +kh +we +li +ni +ma +_ng +he +ul +._ +ga +thi +la_ +be +ak +c +on +nd +na +ok +am +lo +ho +, +se +ph +hi_ +ut +es +nga +_ku +,_ +ez +thi_ +un +uth +le_ +uku +hu +f +u_ +um +ek +ne +go +q +_uk +at +aba +_l +sh +lu +M +_uku +ol +_b +hl +ni_ +ngo +kw +- +N +ik +oku +em +nt +as +ge +az +ya +iz +sa +_o +S +uthi +A +za +_w +wa_ +_s +mb +kut +kuth +ela +ye +_y +uthi_ +il +ay +ele +ba_ +I +dl +nge +ath +ub +ke +U +zo +na_ +yi +us +kuthi +esi +ob +v +om +ama +it +lo_ +bu +L +ezi +j +ny +im +ing +li_ +_ab +eni +no +de +ela_ +ze +ang +ko +ala +lw +yo +zin +_U +lel +eng +mi +_ngo +eb +uz +me +gi +ti +ukut +so +ukuth +bo +da +_ba +nz +_aba +the +eli +akh +eni_ +E +ban +s_ +aka +_kw +ma_ +ap +_ukut +he_ +ini +di +K +ka_ +ib +kwa +ulu +ele_ +kho +nj +bi +_z +khu +we_ +lal +enz +ho_ +et +C +gu +zi_ +and +hla +ngi +pha +_um +_ka +isi +_nge +isa +aph +ung +izi +dla +ala_ +zw +nde +to +n_ +ne_ +nk +ke_ +_I +athi +_no +lan +_wa +kul +B +ind +fu +wen +ikh +azi +ule +kub +e. +_S +x +o. +ona +kha +_iz +je +bh +_M +er +kwe +oba +ane +O +_N +sa_ +a. +lwa +_ez +kus +ki +mu +od +" +ebe +P +_nga +hul +_m +ase +ben +_be +T +ic +nda +_si +_na +/ +ant +ngu +ad +anga +nje +ith +a._ +ye_ +athi_ +R +os +alo +tha +za_ +eth +_es +uma +ana +ile +te +ale +aban +: +_A +oba_ +hat +kun +ha_ +phe +be_ +ali +_am +si_ +wo +uy +sik +ise +kan +hath +dlal +_ne +zwe +aw +han +tu +nye +qe +_ko +ah +hel +thu +isa_ +gob +_K +_lo +ta +_ama +ot +ula +_em +ze_ +i. +ngob +_izi +hol +ar +ani +ole +uba +_in +up +eka +ini_ +goba +tho +hon +_ezi +ona_ +ezin +ngoba +lu_ +goba_ +ip +a, +eli_ +t_ +nya +ndl +sha +_is +the_ +i._ +amb diff --git a/libtextcat/data/new_fingerprints/zulu.lm b/libtextcat/data/new_fingerprints/zulu.lm deleted file mode 100644 index f30c09ced93f..000000000000 --- a/libtextcat/data/new_fingerprints/zulu.lm +++ /dev/null @@ -1,400 +0,0 @@ -_ -a -e -i -n -u -o -l -k -h -s -a_ -b -t -m -g -w -z -e_ -i_ -ng -ku -d -y -la -an -_n -th -le -_u -o_ -el -ba -_k -en -in -wa -p -_e -zi -. -hi -si -al -ha -uk -ab -_i -r -is -ka -_a -kh -we -li -ni -ma -_ng -he -ul -._ -ga -thi -la_ -be -ak -c -on -nd -na -ok -am -lo -ho -, -se -ph -hi_ -ut -es -nga -_ku -,_ -ez -thi_ -un -uth -le_ -uku -hu -f -u_ -um -ek -ne -go -q -_uk -at -aba -_l -sh -lu -M -_uku -ol -_b -hl -ni_ -ngo -kw -- -N -ik -oku -em -nt -as -ge -az -ya -iz -sa -_o -S -uthi -A -za -_w -wa_ -_s -mb -kut -kuth -ela -ye -_y -uthi_ -il -ay -ele -ba_ -I -dl -nge -ath -ub -ke -U -zo -na_ -yi -us -kuthi -esi -ob -v -om -ama -it -lo_ -bu -L -ezi -j -ny -im -ing -li_ -_ab -eni -no -de -ela_ -ze -ang -ko -ala -lw -yo -zin -_U -lel -eng -mi -_ngo -eb -uz -me -gi -ti -ukut -so -ukuth -bo -da -_ba -nz -_aba -the -eli -akh -eni_ -E -ban -s_ -aka -_kw -ma_ -ap -_ukut -he_ -ini -di -K -ka_ -ib -kwa -ulu -ele_ -kho -nj -bi -_z -khu -we_ -lal -enz -ho_ -et -C -gu -zi_ -and -hla -ngi -pha -_um -_ka -isi -_nge -isa -aph -ung -izi -dla -ala_ -zw -nde -to -n_ -ne_ -nk -ke_ -_I -athi -_no -lan -_wa -kul -B -ind -fu -wen -ikh -azi -ule -kub -e. -_S -x -o. -ona -kha -_iz -je -bh -_M -er -kwe -oba -ane -O -_N -sa_ -a. -lwa -_ez -kus -ki -mu -od -" -ebe -P -_nga -hul -_m -ase -ben -_be -T -ic -nda -_si -_na -/ -ant -ngu -ad -anga -nje -ith -a._ -ye_ -athi_ -R -os -alo -tha -za_ -eth -_es -uma -ana -ile -te -ale -aban -: -_A -oba_ -hat -kun -ha_ -phe -be_ -ali -_am -si_ -wo -uy -sik -ise -kan -hath -dlal -_ne -zwe -aw -han -tu -nye -qe -_ko -ah -hel -thu -isa_ -gob -_K -_lo -ta -_ama -ot -ula -_em -ze_ -i. -ngob -_izi -hol -ar -ani -ole -uba -_in -up -eka -ini_ -goba -tho -hon -_ezi -ona_ -ezin -ngoba -lu_ -goba_ -ip -a, -eli_ -t_ -nya -ndl -sha -_is -the_ -i._ -amb -- cgit v1.2.3 From 47889e229cd51dd8a019d41dace6572e84771d18 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 28 Sep 2009 10:46:54 +0000 Subject: 158766 avoid duplicating symbols in the catalog --- starmath/inc/dialog.hxx | 85 +++---- starmath/inc/smmod.hxx | 5 +- starmath/inc/symbol.hxx | 176 +++++--------- starmath/source/cfgitem.cxx | 28 +-- starmath/source/cfgitem.hxx | 6 +- starmath/source/dialog.cxx | 306 +++++++++-------------- starmath/source/document.cxx | 24 +- starmath/source/edit.cxx | 6 +- starmath/source/makefile.mk | 28 +-- starmath/source/node.cxx | 6 +- starmath/source/parse.cxx | 12 +- starmath/source/rect.cxx | 2 +- starmath/source/smdll.cxx | 2 +- starmath/source/smmod.cxx | 12 +- starmath/source/symbol.cxx | 559 +++++++++++-------------------------------- starmath/source/unomodel.cxx | 23 +- starmath/source/view.cxx | 24 +- 17 files changed, 427 insertions(+), 877 deletions(-) diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index a2814082a9e5..aefc11a60d8a 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -303,7 +303,7 @@ public: class SmShowSymbolSet : public Control { - SmSymSet aSymbolSet; + SymbolPtrVec_t aSymbolSet; ScrollBar aVScrollBar; Size aOutputSize; Link aSelectHdlLink; @@ -321,7 +321,7 @@ class SmShowSymbolSet : public Control public: SmShowSymbolSet(Window *pParent, const ResId& rResId); - void SetSymbolSet(const SmSymSet& rSymbolSet); + void SetSymbolSet(const SymbolPtrVec_t& rSymbolSet); void SelectSymbol(USHORT nSymbol); USHORT GetSelectSymbol() const { return nSelectSymbol; } @@ -363,8 +363,10 @@ class SmSymbolDialog : public ModalDialog PushButton aEditBtn; SmViewShell &rViewSh; - SmSymSetManager &rSymSetMgr; - const SmSymSet *pSymSet; + SmSymbolManager &rSymbolMgr; + + String aSymbolSetName; + SymbolPtrVec_t aSymbolSet; OutputDevice *pFontListDev; @@ -376,7 +378,7 @@ class SmSymbolDialog : public ModalDialog DECL_LINK(GetClickHdl, Button *); void FillSymbolSets(BOOL bDeleteText = TRUE); - void SetSymbolSetManager(SmSymSetManager &rMgr); + void SetSymbolSetManager(SmSymbolManager &rMgr); const SmSym *GetSymbol() const; void InitColor_Impl(); @@ -384,7 +386,7 @@ class SmSymbolDialog : public ModalDialog public: SmSymbolDialog(Window * pParent, OutputDevice *pFntListDevice, - SmSymSetManager &rSymSetMgr, SmViewShell &rViewShell, BOOL bFreeRes = TRUE); + SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell, BOOL bFreeRes = TRUE); virtual ~SmSymbolDialog(); BOOL SelectSymbolSet(const XubString &rSymbolSetName); @@ -442,8 +444,8 @@ class SmSymDefineDialog : public ModalDialog Image aRigthArrow_Im; Image aRigthArrow_Im_HC; // hi-contrast version - SmSymSetManager aSymSetMgrCopy, - &rSymSetMgr; + SmSymbolManager aSymbolMgrCopy, + &rSymbolMgr; const SmSym *pOrigSymbol; const SubsetMap *pSubsetMap; @@ -465,7 +467,7 @@ class SmSymDefineDialog : public ModalDialog void FillFonts(BOOL bDeleteText = TRUE); void FillStyles(BOOL bDeleteText = TRUE); - void SetSymbolSetManager(const SmSymSetManager &rMgr); + void SetSymbolSetManager(const SmSymbolManager &rMgr); void SetFont(const XubString &rFontName, const XubString &rStyleName); void SetOrigSymbol(const SmSym *pSymbol, const XubString &rSymbolSetName); void UpdateButtons(); @@ -477,18 +479,18 @@ class SmSymDefineDialog : public ModalDialog BOOL SelectFont(const XubString &rFontName, BOOL bApplyFont); BOOL SelectStyle(const XubString &rStyleName, BOOL bApplyFont); - - SmSymSet *GetSymbolSet(const ComboBox &rComboBox); - inline const SmSymSet *GetSymbolSet(const ComboBox &rComboBox) const; - SmSym *GetSymbol(const ComboBox &rComboBox); - inline const SmSym *GetSymbol(const ComboBox &rComboBox) const; + SmSym * GetSymbol(const ComboBox &rComboBox); + const SmSym * GetSymbol(const ComboBox &rComboBox) const + { + return ((SmSymDefineDialog *) this)->GetSymbol(rComboBox); + } void InitColor_Impl(); virtual void DataChanged( const DataChangedEvent& rDCEvt ); public: - SmSymDefineDialog(Window *pParent, OutputDevice *pFntListDevice, SmSymSetManager &rMgr, BOOL bFreeRes = TRUE); + SmSymDefineDialog(Window *pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr, BOOL bFreeRes = TRUE); ~SmSymDefineDialog(); using OutputDevice::SetFont; @@ -496,44 +498,31 @@ public: // Dialog virtual short Execute(); - inline BOOL SelectOldSymbolSet(const XubString &rSymbolSetName); - inline BOOL SelectOldSymbol(const XubString &rSymbolName); - inline BOOL SelectSymbolSet(const XubString &rSymbolSetName); - inline BOOL SelectSymbol(const XubString &rSymbolName); - BOOL SelectFont(const XubString &rFontName) { return SelectFont(rFontName, TRUE); } - BOOL SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, TRUE); }; - void SelectChar(xub_Unicode cChar); -}; - -inline const SmSymSet * SmSymDefineDialog::GetSymbolSet(const ComboBox &rComboBox) const -{ - return ((SmSymDefineDialog *) this)->GetSymbolSet(rComboBox); -} + BOOL SmSymDefineDialog::SelectOldSymbolSet(const XubString &rSymbolSetName) + { + return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, FALSE); + } -inline const SmSym * SmSymDefineDialog::GetSymbol(const ComboBox &rComboBox) const -{ - return ((SmSymDefineDialog *) this)->GetSymbol(rComboBox); -} + BOOL SmSymDefineDialog::SelectOldSymbol(const XubString &rSymbolName) + { + return SelectSymbol(aOldSymbols, rSymbolName, FALSE); + } -inline BOOL SmSymDefineDialog::SelectOldSymbolSet(const XubString &rSymbolSetName) -{ - return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, FALSE); -} + BOOL SmSymDefineDialog::SelectSymbolSet(const XubString &rSymbolSetName) + { + return SelectSymbolSet(aSymbolSets, rSymbolSetName, FALSE); + } -inline BOOL SmSymDefineDialog::SelectOldSymbol(const XubString &rSymbolName) -{ - return SelectSymbol(aOldSymbols, rSymbolName, FALSE); -} + BOOL SmSymDefineDialog::SelectSymbol(const XubString &rSymbolName) + { + return SelectSymbol(aSymbols, rSymbolName, FALSE); + } -inline BOOL SmSymDefineDialog::SelectSymbolSet(const XubString &rSymbolSetName) -{ - return SelectSymbolSet(aSymbolSets, rSymbolSetName, FALSE); -} + BOOL SelectFont(const XubString &rFontName) { return SelectFont(rFontName, TRUE); } + BOOL SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, TRUE); }; + void SelectChar(xub_Unicode cChar); +}; -inline BOOL SmSymDefineDialog::SelectSymbol(const XubString &rSymbolName) -{ - return SelectSymbol(aSymbols, rSymbolName, FALSE); -} #endif diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index 4b493c0cbca7..914c4d46cf0c 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -48,7 +48,7 @@ class SvxErrorHandler; class SfxObjectFactory; class SmConfig; class SmModule; -class SmSymSetManager; +class SmSymbolManager; /************************************************************************* |* @@ -151,7 +151,7 @@ public: svtools::ColorConfig & GetColorConfig(); SmConfig * GetConfig(); - SmSymSetManager & GetSymSetManager(); + SmSymbolManager & GetSymbolManager(); SmLocalizedSymbolData & GetLocSymbolData() const; @@ -178,7 +178,6 @@ public: }; #define SM_MOD() ( *(SmModule**) GetAppData(SHL_SM) ) -#define SM_MOD1() ( *(SmModule**) GetAppData(SHL_SM) ) #endif // _SDMOD_HXX diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx index d39376c30ed0..ce4c0611d368 100644 --- a/starmath/inc/symbol.hxx +++ b/starmath/inc/symbol.hxx @@ -31,198 +31,146 @@ #define SYMBOL_HXX #include -#ifndef _FONT_HXX //autogen #include -#endif #include #include #include #include #include + +#include +#include +#include + #include "utility.hxx" -#include +#include "smmod.hxx" -#define SS_ATTR_ACCESS 0x80 #define SYMBOLSET_NONE 0xFFFF #define SYMBOL_NONE 0xFFFF -class SmSymSetManager; //////////////////////////////////////////////////////////////////////////////// inline const String GetExportSymbolName( const String &rUiSymbolName ) { - return SM_MOD1()->GetLocSymbolData().GetExportSymbolName( rUiSymbolName ); + return SM_MOD()->GetLocSymbolData().GetExportSymbolName( rUiSymbolName ); } inline const String GetUiSymbolName( const String &rExportSymbolName ) { - return SM_MOD1()->GetLocSymbolData().GetUiSymbolName( rExportSymbolName ); + return SM_MOD()->GetLocSymbolData().GetUiSymbolName( rExportSymbolName ); } inline const String GetExportSymbolSetName( const String &rUiSymbolSetName ) { - return SM_MOD1()->GetLocSymbolData().GetExportSymbolSetName( rUiSymbolSetName ); + return SM_MOD()->GetLocSymbolData().GetExportSymbolSetName( rUiSymbolSetName ); } inline const String GetUiSymbolSetName( const String &rExportSymbolSetName ) { - return SM_MOD1()->GetLocSymbolData().GetUiSymbolSetName( rExportSymbolSetName ); + return SM_MOD()->GetLocSymbolData().GetUiSymbolSetName( rExportSymbolSetName ); } //////////////////////////////////////////////////////////////////////////////// class SmSym { - friend class SmSymSetManager; - - SmFace Face; - String Name; - String aExportName; - String aSetName; - SmSym *pHashNext; - SmSymSetManager *pSymSetManager; - sal_Unicode Character; - BYTE Attribut; - BOOL bPredefined; - BOOL bDocSymbol; + SmFace m_aFace; + String m_aName; + String m_aExportName; + String m_aSetName; + sal_Unicode m_cChar; + BOOL m_bPredefined; + BOOL m_bDocSymbol; public: SmSym(); - SmSym(const SmSym& rSymbol); SmSym(const String& rName, const Font& rFont, sal_Unicode cChar, const String& rSet, BOOL bIsPredefined = FALSE); + SmSym(const SmSym& rSymbol); SmSym& operator = (const SmSym& rSymbol); - const Font& GetFace() const { return Face; } - sal_Unicode GetCharacter() const { return Character; } - const String& GetName() const { return Name; } + const Font& GetFace() const { return m_aFace; } + sal_Unicode GetCharacter() const { return m_cChar; } + const String& GetName() const { return m_aName; } - void SetFace( const Font& rFont ) { Face = rFont; } - void SetCharacter( sal_Unicode cChar ) { Character = cChar; } - void SetName( const String &rTxt ) { Name = rTxt; } + void SetFace( const Font& rFont ) { m_aFace = rFont; } + void SetCharacter( sal_Unicode cChar ) { m_cChar = cChar; } - BOOL IsPredefined() const { return bPredefined; } - const String & GetSetName() const { return aSetName; } - void SetSetName( const String &rName ) { aSetName = rName; } - const String & GetExportName() const { return aExportName; } - void SetExportName( const String &rName ) { aExportName = rName; } +//! since the symbol name is also used as key in the map it should not be possible to change the name +//! because ten the key would not be the same as its supposed copy here +// void SetName( const String &rTxt ) { m_aName = rTxt; } - BOOL IsDocSymbol() const { return bDocSymbol; } - void SetDocSymbol( BOOL bVal ) { bDocSymbol = bVal; } -}; + BOOL IsPredefined() const { return m_bPredefined; } + const String & GetSymbolSetName() const { return m_aSetName; } + void SetSymbolSetName( const String &rName ) { m_aSetName = rName; } + const String & GetExportName() const { return m_aExportName; } + void SetExportName( const String &rName ) { m_aExportName = rName; } + + BOOL IsDocSymbol() const { return m_bDocSymbol; } + void SetDocSymbol( BOOL bVal ) { m_bDocSymbol = bVal; } -DECLARE_LIST(SmListSym, SmSym *) -SV_DECL_PTRARR( SymbolArray, SmSym *, 32, 32 ) + // true if rSymbol has the same name, font and character + bool IsEqualInUI( const SmSym& rSymbol ) const; +}; /**************************************************************************/ -class SmSymSet +struct lt_String { - friend class SmSymSetManager; - - SmListSym SymbolList; - String Name; - SmSymSetManager *pSymSetManager; - -public: - SmSymSet(); - SmSymSet(const SmSymSet& rSymbolSet); - SmSymSet(const String& rName); - ~SmSymSet(); - - SmSymSet& operator = (const SmSymSet& rSymbolSet); - - const String& GetName() const { return Name; } - USHORT GetCount() const { return (USHORT) SymbolList.Count(); } - - const SmSym& GetSymbol(USHORT SymbolNo) const + bool operator()( const String &r1, const String &r2 ) const { - DBG_ASSERT(SymbolList.GetObject(SymbolNo), "Symbol nicht vorhanden"); - return *SymbolList.GetObject(SymbolNo); + // r1 < r2 ? + return r1.CompareTo( r2 ) == COMPARE_LESS; } - - USHORT AddSymbol(SmSym* pSymbol); - void DeleteSymbol(USHORT SymbolNo); - SmSym * RemoveSymbol(USHORT SymbolNo); - USHORT GetSymbolPos(const String& rName); }; -DECLARE_DYNARRAY(SmArraySymSet, SmSymSet *) - -/**************************************************************************/ - -class SmSymbolDialog; - - -struct SmSymSetManager_Impl -{ - SmArraySymSet SymbolSets; - SmSymSetManager & rSymSetMgr; - SmSym** HashEntries; - USHORT NoSymbolSets; - USHORT NoHashEntries; - BOOL Modified; - - SmSymSetManager_Impl( SmSymSetManager &rMgr, USHORT HashTableSize ); - ~SmSymSetManager_Impl(); - SmSymSetManager_Impl & operator = ( const SmSymSetManager_Impl &rImpl ); -}; +// type of the actual container to hold the symbols +typedef std::map< String, SmSym, lt_String > SymbolMap_t; +// vector of pointers to the actual symbols in the above container +typedef std::vector< const SmSym * > SymbolPtrVec_t; -class SmSymSetManager : public SfxListener +class SmSymbolManager : public SfxListener { - friend struct SmSymSetManager_Impl; - - SmSymSetManager_Impl *pImpl; + SymbolMap_t m_aSymbols; + bool m_bModified; virtual void SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType); - UINT32 GetHashIndex(const String& rSymbolName); - void EnterHashTable(SmSym& rSymbol); - void EnterHashTable(SmSymSet& rSymbolSet); - void FillHashTable(); void Init(); void Exit(); public: - SmSymSetManager(USHORT HashTableSize = 137); - SmSymSetManager(const SmSymSetManager& rSymbolSetManager); - ~SmSymSetManager(); + SmSymbolManager(); + SmSymbolManager(const SmSymbolManager& rSymbolSetManager); + ~SmSymbolManager(); - SmSymSetManager& operator = (const SmSymSetManager& rSymbolSetManager); + SmSymbolManager & operator = (const SmSymbolManager& rSymbolSetManager); - void GetSymbols( std::vector< SmSym > &rSymbols ) const; + // symbol sets are for UI purpose only, thus we assemble them here + std::set< String > GetSymbolSetNames() const; + const SymbolPtrVec_t GetSymbolSet( const String& rSymbolSetName ); - - USHORT AddSymbolSet(SmSymSet* pSymbolSet); - void ChangeSymbolSet(SmSymSet* pSymbolSet); - void DeleteSymbolSet(USHORT SymbolSetNo); - USHORT GetSymbolSetPos(const String& rSymbolSetName) const; - USHORT GetSymbolSetCount() const { return pImpl->NoSymbolSets; } - SmSymSet *GetSymbolSet(USHORT SymbolSetNo) const - { - return pImpl->SymbolSets.Get(SymbolSetNo); - } + USHORT GetSymbolCount() const { return static_cast< USHORT >(m_aSymbols.size()); } + const SymbolPtrVec_t GetSymbols() const; + bool AddOrReplaceSymbol( const SmSym & rSymbol, bool bForceChange = false ); + void RemoveSymbol( const String & rSymbolName ); SmSym * GetSymbolByName(const String& rSymbolName); const SmSym * GetSymbolByName(const String& rSymbolName) const { - return ((SmSymSetManager *) this)->GetSymbolByName(rSymbolName); + return ((SmSymbolManager *) this)->GetSymbolByName(rSymbolName); } - void AddReplaceSymbol( const SmSym & rSymbol ); - USHORT GetSymbolCount() const; - const SmSym * GetSymbolByPos( USHORT nPos ) const; - - BOOL IsModified() const { return pImpl->Modified; } - void SetModified(BOOL Modify) { pImpl->Modified = Modify; } + bool IsModified() const { return m_bModified; } + void SetModified(bool bModify) { m_bModified = bModify; } void Load(); void Save(); diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 16461d97d6e1..6cc49595d821 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -432,7 +432,7 @@ SmMathConfig::SmMathConfig() : pFormat = 0; pOther = 0; pFontFormatList = 0; - pSymSetMgr = 0; + pSymbolMgr = 0; bIsOtherModified = bIsFormatModified = FALSE; } @@ -444,7 +444,7 @@ SmMathConfig::~SmMathConfig() delete pFormat; delete pOther; delete pFontFormatList; - delete pSymSetMgr; + delete pSymbolMgr; } @@ -557,14 +557,14 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol, } -SmSymSetManager & SmMathConfig::GetSymSetManager() +SmSymbolManager & SmMathConfig::GetSymbolManager() { - if (!pSymSetMgr) + if (!pSymbolMgr) { - pSymSetMgr = new SmSymSetManager; - pSymSetMgr->Load(); + pSymbolMgr = new SmSymbolManager; + pSymbolMgr->Load(); } - return *pSymSetMgr; + return *pSymbolMgr; } @@ -581,18 +581,6 @@ void SmMathConfig::Save() } -USHORT SmMathConfig::GetSymbolCount() const -{ - return ((SmMathConfig *) this)->GetSymSetManager().GetSymbolCount(); -} - - -const SmSym * SmMathConfig::GetSymbol( USHORT nIndex ) const -{ - return ((SmMathConfig *) this)->GetSymSetManager().GetSymbolByPos( nIndex ); -} - - void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const { Sequence< OUString > aNodes( ((SmMathConfig*) this)->GetNodeNames( A2OU( SYMBOL_LIST ) ) ); @@ -643,7 +631,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols ) // Set pVal->Name = aNodeNameDelim; pVal->Name += *pName++; - OUString aTmp( rSymbol.GetSetName() ); + OUString aTmp( rSymbol.GetSymbolSetName() ); if (rSymbol.IsPredefined()) aTmp = GetExportSymbolSetName( aTmp ); pVal->Value <<= aTmp; diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx index 8987e153026f..a255d76a1533 100644 --- a/starmath/source/cfgitem.hxx +++ b/starmath/source/cfgitem.hxx @@ -125,7 +125,7 @@ class SmMathConfig : public utl::ConfigItem SmFormat * pFormat; SmCfgOther * pOther; SmFontFormatList * pFontFormatList; - SmSymSetManager * pSymSetMgr; + SmSymbolManager * pSymbolMgr; BOOL bIsOtherModified; BOOL bIsFormatModified; @@ -185,11 +185,9 @@ public: //using utl::ConfigItem::ReplaceSetProperties; //using utl::ConfigItem::GetReadOnlyStates; - SmSymSetManager & GetSymSetManager(); + SmSymbolManager & GetSymbolManager(); void GetSymbols( std::vector< SmSym > &rSymbols ) const; void SetSymbols( const std::vector< SmSym > &rNewSymbols ); - USHORT GetSymbolCount() const; - const SmSym * GetSymbol( USHORT nIndex ) const; const SmFormat & GetStandardFormat() const; void SetStandardFormat( const SmFormat &rFormat, BOOL bSaveFontFormatList = FALSE ); diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 20af2f38b3ee..5d5124211ece 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -429,7 +429,7 @@ IMPL_LINK( SmFontSizeDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton if (pQueryBox->Execute() == RET_YES) { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); WriteTo( aFmt ); pp->GetConfig()->SetStandardFormat( aFmt ); @@ -536,7 +536,7 @@ IMPL_LINK_INLINE_START( SmFontTypeDialog, DefaultButtonClickHdl, Button *, EMPTY QueryBox *pQueryBox = new QueryBox(this, SmResId(RID_DEFAULTSAVEQUERY)); if (pQueryBox->Execute() == RET_YES) { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); WriteTo( aFmt ); pp->GetConfig()->SetStandardFormat( aFmt, TRUE ); @@ -582,7 +582,7 @@ SmFontTypeDialog::SmFontTypeDialog(Window * pParent, OutputDevice *pFntListDevic void SmFontTypeDialog::ReadFrom(const SmFormat &rFormat) { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); aVariableFont = pp->GetConfig()->GetFontPickList(FNT_VARIABLE); aFunctionFont = pp->GetConfig()->GetFontPickList(FNT_FUNCTION); @@ -604,7 +604,7 @@ void SmFontTypeDialog::ReadFrom(const SmFormat &rFormat) void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); pp->GetConfig()->GetFontPickList(FNT_VARIABLE) = aVariableFont; pp->GetConfig()->GetFontPickList(FNT_FUNCTION) = aFunctionFont; @@ -743,7 +743,7 @@ IMPL_LINK( SmDistanceDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton if (pQueryBox->Execute() == RET_YES) { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); WriteTo( aFmt ); pp->GetConfig()->SetStandardFormat( aFmt ); @@ -1066,7 +1066,7 @@ IMPL_LINK( SmAlignDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton*/ if (pQueryBox->Execute() == RET_YES) { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); WriteTo( aFmt ); pp->GetConfig()->SetStandardFormat( aFmt ); @@ -1143,12 +1143,12 @@ void SmShowSymbolSet::Paint(const Rectangle&) SetMapMode(MapMode(MAP_PIXEL)); USHORT v = sal::static_int_cast< USHORT >((aVScrollBar.GetThumbPos() * nColumns)); - USHORT nSymbols = aSymbolSet.GetCount(); + size_t nSymbols = aSymbolSet.size(); Color aTxtColor( GetTextColor() ); for (USHORT i = v; i < nSymbols ; i++) { - SmSym aSymbol (aSymbolSet.GetSymbol(i)); + SmSym aSymbol (*aSymbolSet[i]); Font aFont (aSymbol.GetFace()); aFont.SetAlign(ALIGN_TOP); @@ -1209,7 +1209,7 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt) case KEY_LEFT: n -= 1; break; case KEY_RIGHT: n += 1; break; case KEY_HOME: n = 0; break; - case KEY_END: n = aSymbolSet.GetCount() - 1; break; + case KEY_END: n = static_cast< USHORT >(aSymbolSet.size() - 1); break; case KEY_PAGEUP: n -= nColumns * nRows; break; case KEY_PAGEDOWN: n += nColumns * nRows; break; @@ -1221,7 +1221,7 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt) else n = 0; - if (n >= aSymbolSet.GetCount()) + if (n >= aSymbolSet.size()) n = nSelectSymbol; // adjust scrollbar @@ -1277,13 +1277,13 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) : } -void SmShowSymbolSet::SetSymbolSet(const SmSymSet& rSymbolSet) +void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet) { aSymbolSet = rSymbolSet; - if (aSymbolSet.GetCount() > (nColumns * nRows)) + if (static_cast< USHORT >(aSymbolSet.size()) > (nColumns * nRows)) { - aVScrollBar.SetRange(Range(0, ((aSymbolSet.GetCount() + (nColumns - 1)) / nColumns) - nRows)); + aVScrollBar.SetRange(Range(0, ((aSymbolSet.size() + (nColumns - 1)) / nColumns) - nRows)); aVScrollBar.Enable(TRUE); } else @@ -1305,10 +1305,10 @@ void SmShowSymbolSet::SelectSymbol(USHORT nSymbol) ((nSelectSymbol - v) / nColumns) * nLen), Size(nLen, nLen))); - if (nSymbol < aSymbolSet.GetCount()) + if (nSymbol < aSymbolSet.size()) nSelectSymbol = nSymbol; - if (aSymbolSet.GetCount() == 0) + if (aSymbolSet.size() == 0) nSelectSymbol = SYMBOL_NONE; if (nSelectSymbol != SYMBOL_NONE) @@ -1383,9 +1383,10 @@ void SmSymbolDialog::FillSymbolSets(BOOL bDeleteText) if (bDeleteText) aSymbolSets.SetNoSelection(); - USHORT nNumSymSets = rSymSetMgr.GetSymbolSetCount(); - for (USHORT i = 0; i < nNumSymSets; i++) - aSymbolSets.InsertEntry(rSymSetMgr.GetSymbolSet(i)->GetName()); + std::set< String > aSybolSetNames( rSymbolMgr.GetSymbolSetNames() ); + std::set< String >::const_iterator aIt( aSybolSetNames.begin() ); + for ( ; aIt != aSybolSetNames.end(); ++aIt) + aSymbolSets.InsertEntry( *aIt ); } @@ -1419,7 +1420,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton ) DBG_ASSERT(pButton == &aEditBtn, "Sm : falsches Argument"); #endif - SmSymDefineDialog *pDialog = new SmSymDefineDialog(this, pFontListDev, rSymSetMgr); + SmSymDefineDialog *pDialog = new SmSymDefineDialog(this, pFontListDev, rSymbolMgr); // aktuelles Symbol und SymbolSet am neuen Dialog setzen const XubString aSymSetName (aSymbolSets.GetSelectEntry()), @@ -1435,9 +1436,9 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton ) USHORT nSymPos = GetSelectedSymbol(); // Dialog an evtl geaenderte Daten des SymbolSet Manager anpassen - if (pDialog->Execute() == RET_OK && rSymSetMgr.IsModified()) + if (pDialog->Execute() == RET_OK && rSymbolMgr.IsModified()) { - rSymSetMgr.Save(); + rSymbolMgr.Save(); FillSymbolSets(); } @@ -1445,7 +1446,16 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton ) // (soweit eines vorhanden ist) if (!SelectSymbolSet(aOldSymbolSet) && aSymbolSets.GetEntryCount() > 0) SelectSymbolSet(aSymbolSets.GetEntry(0)); - + else + { + // just update display of current symbol set + DBG_ASSERT( aSymSetName == aSymSetName, "unexpected change in symbol set name" ); + aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName ); + aSymbolSetDisplay.SetSymbolSet( aSymbolSet ); + } + + if (nSymPos >= aSymbolSet.size()) + nSymPos = static_cast< USHORT >(aSymbolSet.size()) - 1; SelectSymbol( nSymPos ); delete pDialog; @@ -1502,7 +1512,7 @@ IMPL_LINK_INLINE_END( SmSymbolDialog, CloseClickHdl, Button *, pButton ) SmSymbolDialog::SmSymbolDialog(Window *pParent, OutputDevice *pFntListDevice, - SmSymSetManager &rMgr, SmViewShell &rViewShell, BOOL bFreeRes) : + SmSymbolManager &rMgr, SmViewShell &rViewShell, BOOL bFreeRes) : ModalDialog (pParent, SmResId(RID_SYMBOLDIALOG)), aSymbolSetText (this, SmResId(1)), aSymbolSets (this, SmResId(1)), @@ -1513,13 +1523,14 @@ SmSymbolDialog::SmSymbolDialog(Window *pParent, OutputDevice *pFntListDevice, aCloseBtn (this, SmResId(3)), aEditBtn (this, SmResId(1)), rViewSh (rViewShell), - rSymSetMgr (rMgr), + rSymbolMgr (rMgr), pFontListDev (pFntListDevice) { if (bFreeRes) FreeResource(); - pSymSet = NULL; + aSymbolSetName = String(); + aSymbolSet.clear(); FillSymbolSets(); if (aSymbolSets.GetEntryCount() > 0) SelectSymbolSet(aSymbolSets.GetEntry(0)); @@ -1583,18 +1594,17 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName) BOOL bRet = FALSE; USHORT nPos = aSymbolSets.GetEntryPos(rSymbolSetName); - pSymSet = NULL; + aSymbolSetName = String(); + aSymbolSet.clear(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { aSymbolSets.SelectEntryPos(nPos); - USHORT nSymbolSetNo = rSymSetMgr.GetSymbolSetPos(aSymbolSets.GetSelectEntry()); - pSymSet = rSymSetMgr.GetSymbolSet(nSymbolSetNo); -#if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT(pSymSet, "Sm : NULL pointer"); -#endif - aSymbolSetDisplay.SetSymbolSet(*pSymSet); - if (pSymSet->GetCount() > 0) + aSymbolSetName = rSymbolSetName; + aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName ); + + aSymbolSetDisplay.SetSymbolSet( aSymbolSet ); + if (aSymbolSet.size() > 0) SelectSymbol(0); bRet = TRUE; @@ -1609,8 +1619,8 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName) void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo) { const SmSym *pSym = NULL; - if (pSymSet && nSymbolNo < pSymSet->GetCount()) - pSym = &pSymSet->GetSymbol(nSymbolNo); + if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size())) + pSym = aSymbolSet[ nSymbolNo ]; aSymbolSetDisplay.SelectSymbol(nSymbolNo); aSymbolDisplay.SetSymbol(pSym); @@ -1621,7 +1631,8 @@ void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo) const SmSym * SmSymbolDialog::GetSymbol() const { USHORT nSymbolNo = aSymbolSetDisplay.GetSelectSymbol(); - return pSymSet == NULL ? NULL : &pSymSet->GetSymbol(nSymbolNo); + bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size()); + return bValid ? aSymbolSet[ nSymbolNo ] : NULL; } @@ -1681,15 +1692,10 @@ void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, BOOL bDeleteText) if (bDeleteText) rComboBox.SetText(XubString()); - ComboBox &rSymbolSets = &rComboBox == &aOldSymbols ? - aOldSymbolSets : aSymbolSets; - const SmSymSet *pSymSet = GetSymbolSet(rSymbolSets); - if (pSymSet) - { USHORT nNumSymbols = pSymSet->GetCount(); - for (USHORT i = 0; i < nNumSymbols; i++) - rComboBox.InsertEntry(pSymSet->GetSymbol(i).GetName()); - } - + ComboBox &rBox = &rComboBox == &aOldSymbols ? aOldSymbolSets : aSymbolSets; + SymbolPtrVec_t aSymSet( aSymbolMgrCopy.GetSymbolSet( rBox.GetText() ) ); + for (size_t i = 0; i < aSymSet.size(); ++i) + rComboBox.InsertEntry( aSymSet[i]->GetName() ); } @@ -1704,9 +1710,10 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, BOOL bDeleteText) if (bDeleteText) rComboBox.SetText(XubString()); - USHORT nNumSymSets = aSymSetMgrCopy.GetSymbolSetCount(); - for (USHORT i = 0; i < nNumSymSets; i++) - rComboBox.InsertEntry(aSymSetMgrCopy.GetSymbolSet(i)->GetName()); + const std::set< String > aSymbolSetNames( aSymbolMgrCopy.GetSymbolSetNames() ); + std::set< String >::const_iterator aIt( aSymbolSetNames.begin() ); + for ( ; aIt != aSymbolSetNames.end(); ++aIt) + rComboBox.InsertEntry( *aIt ); } @@ -1751,26 +1758,13 @@ void SmSymDefineDialog::FillStyles(BOOL bDeleteText) } -SmSymSet * SmSymDefineDialog::GetSymbolSet(const ComboBox &rComboBox) -{ -#if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets, - "Sm : falsche ComboBox"); -#endif - USHORT nSymbolSetNo = aSymSetMgrCopy.GetSymbolSetPos(rComboBox.GetText()); - - return nSymbolSetNo == SYMBOLSET_NONE ? - NULL : aSymSetMgrCopy.GetSymbolSet(nSymbolSetNo); -} - - SmSym * SmSymDefineDialog::GetSymbol(const ComboBox &rComboBox) { #if OSL_DEBUG_LEVEL > 1 DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols, "Sm : falsche ComboBox"); #endif - return aSymSetMgrCopy.GetSymbolByName(rComboBox.GetText()); + return aSymbolMgrCopy.GetSymbolByName(rComboBox.GetText()); } @@ -1900,32 +1894,16 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton ) DBG_ASSERT(aAddBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??"); #endif - SmSymSet *pSymSet = GetSymbolSet(aSymbolSets); - - // SymbolSet einfuegen falls es noch nicht existiert - if (!pSymSet) - { - pSymSet = new SmSymSet(aSymbolSets.GetText()); - aSymSetMgrCopy.AddSymbolSet(pSymSet); - FillSymbolSets(aOldSymbolSets, FALSE); - FillSymbolSets(aSymbolSets, FALSE); - } -#if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT(pSymSet, "Sm : NULL pointer"); -#endif - - // Symbol ins SymbolSet einfuegen + // add symbol // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality - SmSym *pSym = new SmSym(aSymbols.GetText(), aCharsetDisplay.GetFont(), - sal::static_int_cast< sal_Unicode >(aCharsetDisplay.GetSelectCharacter()), - aSymbolSets.GetText()); - pSymSet->AddSymbol(pSym); - - // update der Hash Tabelle erzwingen (damit aAddBtn disabled wird). - // (wird spaeter nach Ueberarbeitung von symbol.cxx ueberfluessig werden). - aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1); - - // Symbolliste aktualiseren + const SmSym aSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(), + sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ), + aSymbolSets.GetText() ); + aSymbolMgrCopy.AddOrReplaceSymbol( aSymbol ); + + // update list box entries + FillSymbolSets(aOldSymbolSets, FALSE); + FillSymbolSets(aSymbolSets, FALSE); FillSymbols(aOldSymbols ,FALSE); FillSymbols(aSymbols ,FALSE); @@ -1943,61 +1921,27 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton ) DBG_ASSERT(aChangeBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??"); #endif - // finden des SymbolSets zum alten Symbol - SmSymSet *pOldSymSet = GetSymbolSet(aOldSymbolSets); -#if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT(pOldSymSet, "Sm : NULL pointer"); -#endif - - // suchen des neuen SymbolSets - SmSymSet *pNewSymSet = GetSymbolSet(aSymbolSets); - // SymbolSet einfuegen falls es noch nicht existiert - if (!pNewSymSet) - { - pNewSymSet = new SmSymSet(aSymbolSets.GetText()); - aSymSetMgrCopy.AddSymbolSet(pNewSymSet); - FillSymbolSets(aOldSymbolSets, FALSE); - FillSymbolSets(aSymbolSets, FALSE); - } - - // das (alte) Symbol besorgen - USHORT nSymbol = pOldSymSet->GetSymbolPos(aOldSymbols.GetText()); - SmSym *pSym = (SmSym *) &pOldSymSet->GetSymbol(nSymbol); -#if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT( SYMBOL_NONE != nSymbol, "symbol not found" ); - DBG_ASSERT(pSym, "Sm : NULL pointer"); -#endif - - // apply changes - pSym->SetName( aSymbols.GetText() ); - //! get font from symbol-display since charset-display does not keep + // get new Sybol to use + //! get font from symbol-disp lay since charset-display does not keep //! the bold attribut. - pSym->SetFace( aSymbolDisplay.GetFont() ); // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality - pSym->SetCharacter( sal::static_int_cast< sal_Unicode >(aCharsetDisplay.GetSelectCharacter()) ); + const SmSym aNewSymbol( aSymbols.GetText(), aSymbolDisplay.GetFont(), + sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ), + aSymbolSets.GetText() ); - // das SymbolSet wechseln wenn noetig - if (pOldSymSet != pNewSymSet) - { - pNewSymSet->AddSymbol( new SmSym( *pSym ) ); - pOldSymSet->DeleteSymbol(nSymbol); - - // - // update controls - // - // actualize symbol-lists in the dialog - String aTmpOldSymbolName( pOrigSymbol->GetName() ); - aOldSymbols.SetText( String() ); - aOldSymbols.RemoveEntry( aTmpOldSymbolName ); - if (aSymbolSets.GetText() == aOldSymbolSets.GetText()) - aSymbols.RemoveEntry( aTmpOldSymbolName ); - // clear display for original symbol - SetOrigSymbol(NULL, XubString()); - } + // remove old symbol if the name was changed then add new one + if (aOldSymbols.GetText() != aSymbols.GetText()) + aSymbolMgrCopy.RemoveSymbol( aOldSymbols.GetText() ); + aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol, true ); - //!! den SymbolSet Manger dazu zwingen seinen HashTable zu aktualisieren, - //!! um mit moeglich neuen bzw fehlenden alten Symbol Namen konform zu sein. - aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1); + // clear display for original symbol + SetOrigSymbol(NULL, XubString()); + + // update list box entries + FillSymbolSets(aOldSymbolSets, FALSE); + FillSymbolSets(aSymbolSets, FALSE); + FillSymbols(aOldSymbols ,FALSE); + FillSymbols(aSymbols ,FALSE); UpdateButtons(); @@ -2015,33 +1959,16 @@ IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, EMPTYARG pButton ) if (pOrigSymbol) { - // loeschen des Symbols: - // - // zugehoeriges SymbolSet finden - SmSymSet *pSymSet = GetSymbolSet(aOldSymbolSets); - // finden des Index - XubString aTmpOldSymbolName (pOrigSymbol->GetName()); - USHORT nSymbolNo = pSymSet->GetSymbolPos(aTmpOldSymbolName); - // Bezuege auf das Symbols loeschen + aSymbolMgrCopy.RemoveSymbol( pOrigSymbol->GetName() ); + + // clear display for original symbol SetOrigSymbol(NULL, XubString()); - // und weg mit dem Symbol - pSymSet->DeleteSymbol(nSymbolNo); -#if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT(pSymSet, "Sm : NULL pointer"); - DBG_ASSERT(nSymbolNo != SYMBOL_NONE, "Sm : kein Symbol"); -#endif - //!! den SymbolSet Manger dazu zwingen seinen HashTable zu aktualisieren, - //!! was er naemlich nicht tut, wenn in einem seiner SymbolSets geaendert/ - //!! geloescht wird, was wiederum zu einem Absturz fuehren kann (wenn er - //!! ueber ein nicht mehr existentes aber nicht entferntes Symbol iteriert). - aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1); - - // aktualisieren der Symboleintraege des Dialogs - aOldSymbols.SetText(XubString()); - aOldSymbols.RemoveEntry(aTmpOldSymbolName); - if (aSymbolSets.GetText() == aOldSymbolSets.GetText()) - aSymbols.RemoveEntry(aTmpOldSymbolName); + // update list box entries + FillSymbolSets(aOldSymbolSets, FALSE); + FillSymbolSets(aSymbolSets, FALSE); + FillSymbols(aOldSymbols ,FALSE); + FillSymbols(aSymbols ,FALSE); } UpdateButtons(); @@ -2073,7 +2000,7 @@ void SmSymDefineDialog::UpdateButtons() && aCharsetDisplay.GetSelectCharacter() == pOrigSymbol->GetCharacter(); // hinzufuegen nur wenn es noch kein Symbol desgleichen Namens gibt - bAdd = aSymSetMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL; + bAdd = aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL; // loeschen nur wenn alle Einstellungen gleich sind bDelete = pOrigSymbol != NULL; @@ -2092,7 +2019,7 @@ void SmSymDefineDialog::UpdateButtons() SmSymDefineDialog::SmSymDefineDialog(Window * pParent, - OutputDevice *pFntListDevice, SmSymSetManager &rMgr, BOOL bFreeRes) : + OutputDevice *pFntListDevice, SmSymbolManager &rMgr, BOOL bFreeRes) : ModalDialog (pParent, SmResId(RID_SYMDEFINEDIALOG)), aOldSymbolText (this, SmResId(1)), aOldSymbols (this, SmResId(1)), @@ -2123,7 +2050,7 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent, aRightArrow (this, SmResId(1)), aRigthArrow_Im (SmResId(1)), aRigthArrow_Im_HC (SmResId(2)), // hi-contrast version - rSymSetMgr (rMgr), + rSymbolMgr (rMgr), pSubsetMap (NULL), pFontList (NULL) { @@ -2134,9 +2061,10 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent, pOrigSymbol = 0; - // make autocompletion for symbols case-sensitive - aOldSymbols.EnableAutocomplete(TRUE, TRUE); - aSymbols .EnableAutocomplete(TRUE, TRUE); + // auto completion is troublesome since that symbols character also gets automatically selected in the + // display and if the user previously selected a character to define/redefine that one this is bad + aOldSymbols.EnableAutocomplete( FALSE, TRUE ); + aSymbols .EnableAutocomplete( FALSE, TRUE ); FillFonts(); if (aFonts.GetEntryCount() > 0) @@ -2144,7 +2072,7 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent, InitColor_Impl(); - SetSymbolSetManager(rSymSetMgr); + SetSymbolSetManager(rSymbolMgr); aOldSymbols .SetSelectHdl(LINK(this, SmSymDefineDialog, OldSymbolChangeHdl)); aOldSymbolSets .SetSelectHdl(LINK(this, SmSymDefineDialog, OldSymbolSetChangeHdl)); @@ -2218,41 +2146,23 @@ short SmSymDefineDialog::Execute() short nResult = ModalDialog::Execute(); // Aenderungen uebernehmen falls Dialog mit OK beendet wurde - if (aSymSetMgrCopy.IsModified() && nResult == RET_OK) - { - // leere SymbolSets aus dem Ergebnis entfernen. - // Dabei von hinten durch das array iterieren, da beim loeschen die - // Elemente aufruecken. - USHORT nSymbolSets = aSymSetMgrCopy.GetSymbolSetCount(); - for (USHORT i = 0; i < nSymbolSets; i++) - { - USHORT nIdx = nSymbolSets - 1 - i; - if (aSymSetMgrCopy.GetSymbolSet(nIdx)->GetCount() == 0) - aSymSetMgrCopy.DeleteSymbolSet(nIdx); - } - - - - rSymSetMgr = aSymSetMgrCopy; -#ifdef DEBUG -// USHORT nS = rSymSetMgr.GetSymbolSetCount(); -#endif - } + if (aSymbolMgrCopy.IsModified() && nResult == RET_OK) + rSymbolMgr = aSymbolMgrCopy; return nResult; } -void SmSymDefineDialog::SetSymbolSetManager(const SmSymSetManager &rMgr) +void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr) { - aSymSetMgrCopy = rMgr; + aSymbolMgrCopy = rMgr; #ifdef DEBUG -// USHORT nS = aSymSetMgrCopy.GetSymbolSetCount(); +// USHORT nS = aSymbolMgrCopy.GetSymbolSetCount(); #endif // Das modified Flag der Kopie auf FALSE setzen, damit man spaeter damit // testen kann ob sich was geaendert hat. - aSymSetMgrCopy.SetModified(FALSE); + aSymbolMgrCopy.SetModified(FALSE); FillSymbolSets(aOldSymbolSets); if (aOldSymbolSets.GetEntryCount() > 0) @@ -2407,13 +2317,13 @@ BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox, { // bei Wechsel des alten Symbols nur vorhandene anzeigen sonst keins const SmSym *pOldSymbol = NULL; - XubString aTMpOldSymbolSetName; + XubString aTmpOldSymbolSetName; if (nPos != COMBOBOX_ENTRY_NOTFOUND) { - pOldSymbol = aSymSetMgrCopy.GetSymbolByName(aNormName); - aTMpOldSymbolSetName = aOldSymbolSets.GetText(); + pOldSymbol = aSymbolMgrCopy.GetSymbolByName(aNormName); + aTmpOldSymbolSetName = aOldSymbolSets.GetText(); } - SetOrigSymbol(pOldSymbol, aTMpOldSymbolSetName); + SetOrigSymbol(pOldSymbol, aTmpOldSymbolSetName); } else aSymbolName.SetText(rComboBox.GetText()); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 33fa49bdb4ef..a675389981fb 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -151,8 +151,8 @@ void SmDocShell::LoadSymbols() { RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::LoadSymbols" ); - SmModule *pp = SM_MOD1(); - pp->GetSymSetManager().Load(); + SmModule *pp = SM_MOD(); + pp->GetSymbolManager().Load(); } @@ -282,7 +282,7 @@ void SmDocShell::ArrangeFormula() pOutDev = &pView->GetGraphicWindow(); else { - pOutDev = &SM_MOD1()->GetDefaultVirtualDev(); + pOutDev = &SM_MOD()->GetDefaultVirtualDev(); pOutDev->SetMapMode( MapMode(MAP_100TH_MM) ); } } @@ -616,7 +616,7 @@ Printer* SmDocShell::GetPrt() SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES, 0); - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); pp->GetConfig()->ConfigToItemSet(*pOptions); pPrinter = new SfxPrinter(pOptions); pPrinter->SetMapMode( MapMode(MAP_100TH_MM) ); @@ -698,7 +698,7 @@ SmDocShell::SmDocShell(SfxObjectCreateMode eMode,const sal_Bool _bScriptSupport) SetPool(&SFX_APP()->GetPool()); - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); aFormat = pp->GetConfig()->GetStandardFormat(); StartListening(aFormat); @@ -718,7 +718,7 @@ SmDocShell::~SmDocShell() { RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::~SmDocShell" ); - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); EndListening(aFormat); EndListening(*pp->GetConfig()); @@ -1014,7 +1014,7 @@ void SmDocShell::Execute(SfxRequest& rReq) case SID_AUTO_REDRAW : { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); BOOL bRedraw = pp->GetConfig()->IsAutoRedraw(); pp->GetConfig()->SetAutoRedraw(!bRedraw); } @@ -1033,7 +1033,7 @@ void SmDocShell::Execute(SfxRequest& rReq) // get device used to retrieve the FontList OutputDevice *pDev = GetPrinter(); if (!pDev || pDev->GetDevFontCount() == 0) - pDev = &SM_MOD1()->GetDefaultVirtualDev(); + pDev = &SM_MOD()->GetDefaultVirtualDev(); DBG_ASSERT (pDev, "device for font list missing" ); SmFontTypeDialog *pFontTypeDialog = new SmFontTypeDialog( NULL, pDev ); @@ -1117,7 +1117,7 @@ void SmDocShell::Execute(SfxRequest& rReq) pAlignDialog->WriteTo(aNewFormat); - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); pAlignDialog->WriteTo( aFmt ); pp->GetConfig()->SetStandardFormat( aFmt ); @@ -1202,7 +1202,7 @@ void SmDocShell::GetState(SfxItemSet &rSet) case SID_AUTO_REDRAW : { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); BOOL bRedraw = pp->GetConfig()->IsAutoRedraw(); rSet.Put(SfxBoolItem(SID_AUTO_REDRAW, bRedraw)); @@ -1291,8 +1291,8 @@ void SmDocShell::SaveSymbols() { RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveSymbols" ); - SmModule *pp = SM_MOD1(); - pp->GetSymSetManager().Save(); + SmModule *pp = SM_MOD(); + pp->GetSymbolManager().Save(); } diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index d9c333611071..e89a2f0f3d5b 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -116,7 +116,7 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) : // Even RTL languages don't use RTL for math rCmdBox.GetEditWindow()->EnableRTL( FALSE ); - ApplyColorConfigValues( SM_MOD1()->GetColorConfig() ); + ApplyColorConfigValues( SM_MOD()->GetColorConfig() ); // compare DataChanged SetBackground( GetSettings().GetStyleSettings().GetWindowColor() ); @@ -212,7 +212,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& ) { const StyleSettings aSettings( GetSettings().GetStyleSettings() ); - ApplyColorConfigValues( SM_MOD1()->GetColorConfig() ); + ApplyColorConfigValues( SM_MOD()->GetColorConfig() ); SetBackground( aSettings.GetWindowColor() ); // edit fields in other Applications use this font instead of @@ -246,7 +246,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& ) IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ ) { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); if (pp->GetConfig()->IsAutoRedraw()) Flush(); aModifyTimer.Start(); diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index 0f604a22b346..e0b8d47d7cfe 100644 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -52,33 +52,33 @@ SRC2FILES = smres.src \ commands.src SLO1FILES = \ - $(SLO)$/register.obj \ - $(SLO)$/typemap.obj \ + $(SLO)$/accessibility.obj \ + $(SLO)$/edit.obj \ + $(SLO)$/eqnolefilehdr.obj \ + $(SLO)$/mathmlexport.obj \ + $(SLO)$/mathmlimport.obj \ $(SLO)$/symbol.obj \ - $(SLO)$/toolbox.obj \ + $(SLO)$/types.obj \ + $(SLO)$/unodoc.obj \ $(SLO)$/action.obj \ - $(SLO)$/accessibility.obj \ $(SLO)$/cfgitem.obj \ $(SLO)$/config.obj \ $(SLO)$/dialog.obj \ $(SLO)$/document.obj \ - $(SLO)$/mathtype.obj \ - $(SLO)$/mathmlimport.obj \ - $(SLO)$/mathmlexport.obj \ $(SLO)$/format.obj \ + $(SLO)$/mathtype.obj \ $(SLO)$/node.obj \ $(SLO)$/parse.obj \ - $(SLO)$/utility.obj \ + $(SLO)$/register.obj \ $(SLO)$/smdll.obj \ + $(SLO)$/toolbox.obj \ + $(SLO)$/typemap.obj \ $(SLO)$/smmod.obj \ - $(SLO)$/types.obj \ - $(SLO)$/view.obj \ - $(SLO)$/viewhdl.obj \ - $(SLO)$/edit.obj \ + $(SLO)$/utility.obj \ $(SLO)$/rect.obj \ $(SLO)$/unomodel.obj \ - $(SLO)$/unodoc.obj \ - $(SLO)$/eqnolefilehdr.obj + $(SLO)$/viewhdl.obj \ + $(SLO)$/view.obj SLO2FILES = \ $(SLO)$/register.obj \ diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index ad3987549c0f..bfafe705f486 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -118,7 +118,7 @@ Color SmTmpDevice::Impl_GetColor( const Color& rColor ) if (OUTDEV_WINDOW == rOutDev.GetOutDevType()) aBgCol = ((Window &) rOutDev).GetDisplayBackground().GetColor(); - nNewCol = SM_MOD1()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; + nNewCol = SM_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; Color aTmpColor( nNewCol ); if (aBgCol.IsDark() && aTmpColor.IsDark()) @@ -2806,9 +2806,9 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell SmNode::Prepare(rFormat, rDocShell); const SmSym *pSym; - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); - if (NULL != (pSym = pp->GetSymSetManager().GetSymbolByName(GetToken().aText))) + if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName(GetToken().aText))) { SetText( pSym->GetCharacter() ); GetFont() = pSym->GetFace(); diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 83662e50b123..fe0a5eeb6437 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -383,7 +383,7 @@ BOOL SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos ) BOOL bIsDelim = *pDelim != 0; - INT16 nTypJp = SM_MOD1()->GetSysLocale().GetCharClass().getType( rTxt, nPos ); + INT16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos ); bIsDelim |= nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR || nTypJp == com::sun::star::i18n::UnicodeType::CONTROL; @@ -441,7 +441,7 @@ void SmParser::NextToken() xub_StrLen nRealStart; BOOL bCont; BOOL bNumStart = FALSE; - CharClass aCC(SM_MOD1()->GetSysLocale().GetCharClass().getLocale()); + CharClass aCC(SM_MOD()->GetSysLocale().GetCharClass().getLocale()); do { // skip white spaces @@ -1365,7 +1365,7 @@ void SmParser::Blank() // Blanks am Zeilenende ignorieren wenn die entsprechende Option gesetzt ist if ( CurToken.eType == TNEWLINE || - (CurToken.eType == TEND && SM_MOD1()->GetConfig()->IsIgnoreSpacesRight()) ) + (CurToken.eType == TEND && SM_MOD()->GetConfig()->IsIgnoreSpacesRight()) ) { pBlankNode->Clear(); } @@ -2289,13 +2289,13 @@ void SmParser::Special() // UI uses localized names XML file format does not.) if (IsImportSymbolNames()) { - const SmLocalizedSymbolData &rLSD = SM_MOD1()->GetLocSymbolData(); + const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData(); aNewName = rLSD.GetUiSymbolName( rName ); bReplace = TRUE; } else if (IsExportSymbolNames()) { - const SmLocalizedSymbolData &rLSD = SM_MOD1()->GetLocSymbolData(); + const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData(); aNewName = rLSD.GetExportSymbolName( rName ); bReplace = TRUE; } @@ -2303,7 +2303,7 @@ void SmParser::Special() else // 5.0 <-> 6.0 formula text (symbol name) conversion { LanguageType nLanguage = GetLanguage(); - SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData(); + SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData(); const ResStringArray *pFrom = 0; const ResStringArray *pTo = 0; if (CONVERT_50_TO_60 == GetConversion()) diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 0718be8ffd37..1a2a6a408a59 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -719,7 +719,7 @@ BOOL SmGetGlyphBoundRect(const OutputDevice &rDev, { // since we format for the printer (where GetTextBoundRect will fail) // we need a virtual device here. - pGlyphDev = &SM_MOD1()->GetDefaultVirtualDev(); + pGlyphDev = &SM_MOD()->GetDefaultVirtualDev(); } const FontMetric aDevFM (rDev.GetFontMetric()); diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx index 7b9e79a9cf41..1ee06fc60e7d 100644 --- a/starmath/source/smdll.cxx +++ b/starmath/source/smdll.cxx @@ -78,7 +78,7 @@ void SmDLL::Init() SmModule** ppShlPtr = (SmModule**) GetAppData(SHL_SM); *ppShlPtr = new SmModule( &rFactory ); - SfxModule *p = SM_MOD1(); + SfxModule *p = SM_MOD(); SmModule *pp = (SmModule *) p; rFactory.SetDocumentServiceName( String::CreateFromAscii("com.sun.star.formula.FormulaProperties") ); diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index 20cfc284d006..a34302338d75 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -101,7 +101,7 @@ const String SmLocalizedSymbolData::GetUiSymbolName( const String &rExportName ) { String aRes; - const SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData(); + const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData(); const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray(); const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray(); USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count()); @@ -122,7 +122,7 @@ const String SmLocalizedSymbolData::GetExportSymbolName( const String &rUiName ) { String aRes; - const SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData(); + const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData(); const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray(); const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray(); USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count()); @@ -143,7 +143,7 @@ const String SmLocalizedSymbolData::GetUiSymbolSetName( const String &rExportNam { String aRes; - const SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData(); + const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData(); const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray(); const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray(); USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count()); @@ -164,7 +164,7 @@ const String SmLocalizedSymbolData::GetExportSymbolSetName( const String &rUiNam { String aRes; - const SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData(); + const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData(); const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray(); const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray(); USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count()); @@ -317,9 +317,9 @@ SmConfig * SmModule::GetConfig() return pConfig; } -SmSymSetManager & SmModule::GetSymSetManager() +SmSymbolManager & SmModule::GetSymbolManager() { - return GetConfig()->GetSymSetManager(); + return GetConfig()->GetSymbolManager(); } SmLocalizedSymbolData & SmModule::GetLocSymbolData() const diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index aba0e754b85e..4868a4d7a37d 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -37,12 +37,13 @@ #include #include -#ifndef _SV_RESARY_HXX -#include -#endif #include #include +#include +#include +#include + #include "symbol.hxx" #include "view.hxx" #include "utility.hxx" @@ -58,72 +59,38 @@ using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::uno; using namespace ::rtl; -// Das hier muss auch mal alles "uberarbeitet werden. Insbesondere die nicht -// funktionierende und bei l"oschen/"andern von Symbolen nicht gepflegte -// Hash Tabelle!!! Diese aktualisert sich erst im Wertzuweisungsoperator -// beim Verlassen des 'SmSymDefineDialog's! - -/**************************************************************************/ -/* -** -** MACRO DEFINTION -** -**/ - -#define SF_SM20IDENT 0x03031963L -#define SF_IDENT 0x30334D53L - - -SV_IMPL_PTRARR( SymbolArray, SmSym * ); - -/**************************************************************************/ -/* -** -** DATA DEFINITION -** -**/ - -long SF_Ident = SF_IDENT; /**************************************************************************/ -/* -** -** CLASS IMPLEMENTATION -** -**/ SmSym::SmSym() : - Name(C2S("unknown")), - aSetName(C2S("unknown")), - pHashNext(0), - pSymSetManager(0), - Character('\0'), - bPredefined(FALSE), - bDocSymbol(FALSE) + m_aName(C2S("unknown")), + m_aSetName(C2S("unknown")), + m_cChar('\0'), + m_bPredefined(FALSE), + m_bDocSymbol(FALSE) { - aExportName = Name; - Face.SetTransparent(TRUE); - Face.SetAlign(ALIGN_BASELINE); + m_aExportName = m_aName; + m_aFace.SetTransparent(TRUE); + m_aFace.SetAlign(ALIGN_BASELINE); } SmSym::SmSym(const SmSym& rSymbol) { - pSymSetManager = 0; *this = rSymbol; } -SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode aChar, +SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode cChar, const String& rSet, BOOL bIsPredefined) { - Name = aExportName = rName; + m_aName = m_aExportName = rName; - Face = rFont; - Face.SetTransparent(TRUE); - Face.SetAlign(ALIGN_BASELINE); + m_aFace = rFont; + m_aFace.SetTransparent(TRUE); + m_aFace.SetAlign(ALIGN_BASELINE); - Character = aChar; + m_cChar = cChar; //! according to HDU this should not be used anymore now //! since this was necessary in the early days but should //! not be done now since this is handled now at a more @@ -135,481 +102,231 @@ SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode aChar, // // if (RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet()) // Character |= 0xF000; - aSetName = rSet; - bPredefined = bIsPredefined; - bDocSymbol = FALSE; - - pHashNext = 0; - pSymSetManager = 0; + m_aSetName = rSet; + m_bPredefined = bIsPredefined; + m_bDocSymbol = FALSE; } SmSym& SmSym::operator = (const SmSym& rSymbol) { - Name = rSymbol.Name; - Face = rSymbol.Face; - Character = rSymbol.Character; - aSetName = rSymbol.aSetName; - bPredefined = rSymbol.bPredefined; - bDocSymbol = rSymbol.bDocSymbol; - aExportName = rSymbol.aExportName; - - pHashNext = 0; - - if (pSymSetManager) - pSymSetManager->SetModified(TRUE); - - return *this; -} - -/**************************************************************************/ - -SmSymSet::SmSymSet() : - Name(C2S("unknown")), - pSymSetManager(0) -{ - SymbolList.Clear(); -} - -SmSymSet::SmSymSet(const SmSymSet& rSymbolSet) -{ - pSymSetManager = 0; - *this = rSymbolSet; -} - -SmSymSet::SmSymSet(const String& rName) -{ - Name = rName; - SymbolList.Clear(); - - pSymSetManager = 0; -} - -SmSymSet::~SmSymSet() -{ - for (USHORT i = 0; i < GetCount(); i++) - delete SymbolList.GetObject(i); -} - -SmSymSet& SmSymSet::operator = (const SmSymSet& rSymbolSet) -{ - USHORT i; - for (i = 0; i < GetCount(); i++) - delete SymbolList.GetObject(i); - - Name = rSymbolSet.Name; - SymbolList.Clear(); - for (i = 0; i < rSymbolSet.GetCount(); i++) - AddSymbol(new SmSym(rSymbolSet.GetSymbol(i))); + m_aName = rSymbol.m_aName; + m_aExportName = rSymbol.m_aExportName; + m_cChar = rSymbol.m_cChar; + m_aFace = rSymbol.m_aFace; + m_aSetName = rSymbol.m_aSetName; + m_bPredefined = rSymbol.m_bPredefined; + m_bDocSymbol = rSymbol.m_bDocSymbol; + SmSymbolManager * pSymSetManager = &SM_MOD()->GetSymbolManager(); if (pSymSetManager) - pSymSetManager->SetModified(TRUE); + pSymSetManager->SetModified(true); return *this; } -USHORT SmSymSet::AddSymbol(SmSym* pSymbol) -{ - DBG_ASSERT(pSymbol, "Kein Symbol"); - - if (pSymbol) - pSymbol->SetSetName( GetName() ); - SymbolList.Insert(pSymbol, LIST_APPEND); - DBG_ASSERT(SymbolList.GetPos(pSymbol) == SymbolList.Count() - 1, - "Sm : ... ergibt falschen return Wert"); - - if (pSymSetManager) - pSymSetManager->SetModified(TRUE); - - return (USHORT) SymbolList.Count() - 1; -} - -void SmSymSet::DeleteSymbol(USHORT SymbolNo) -{ - delete RemoveSymbol(SymbolNo); -} - -SmSym * SmSymSet::RemoveSymbol(USHORT SymbolNo) -{ - DBG_ASSERT(SymbolList.GetObject(SymbolNo), "Symbol nicht vorhanden"); - - SmSym *pSym = SymbolList.GetObject(SymbolNo); - SymbolList.Remove(SymbolNo); - - if (pSymSetManager) - pSymSetManager->SetModified(TRUE); - - return pSym; -} - -USHORT SmSymSet::GetSymbolPos(const String& rName) -{ - for (USHORT i = 0; i < GetCount(); i++) - if (SymbolList.GetObject(i)->GetName() == rName) - return (i); - return SYMBOL_NONE; -} - -/**************************************************************************/ - -SmSymSetManager_Impl::SmSymSetManager_Impl( - SmSymSetManager &rMgr, USHORT HashTableSize ) : - - rSymSetMgr (rMgr) -{ - NoSymbolSets = 0; - NoHashEntries = HashTableSize; - HashEntries = new SmSym *[NoHashEntries]; - memset( HashEntries, 0, sizeof(SmSym *) * NoHashEntries ); - Modified = FALSE; -} - - -SmSymSetManager_Impl::~SmSymSetManager_Impl() +bool SmSym::IsEqualInUI( const SmSym& rSymbol ) const { - for (USHORT i = 0; i < NoSymbolSets; ++i) - delete SymbolSets.Get(i); - SymbolSets.Clear(); - - NoSymbolSets = 0; - if (HashEntries) - { - delete[] HashEntries; - HashEntries = 0; - } - NoHashEntries = 0; - Modified = FALSE; -} - - -SmSymSetManager_Impl & SmSymSetManager_Impl::operator = ( const SmSymSetManager_Impl &rImpl ) -{ - //! rMySymSetMgr remains unchanged - - NoHashEntries = rImpl.NoHashEntries; - if (HashEntries) - delete [] HashEntries; - HashEntries = new SmSym *[NoHashEntries]; - memset( HashEntries, 0, sizeof(SmSym *) * NoHashEntries ); - - NoSymbolSets = 0; - SymbolSets.Clear(); - for (USHORT i = 0; i < rImpl.NoSymbolSets; ++i) - { - rSymSetMgr.AddSymbolSet( new SmSymSet( *rImpl.rSymSetMgr.GetSymbolSet(i) ) ); - } - DBG_ASSERT( NoSymbolSets == rImpl.NoSymbolSets, - "incorrect number of symbolsets" ); - - Modified = TRUE; - return *this; + return m_aName == rSymbol.m_aName && + m_aFace == rSymbol.m_aFace && + m_cChar == rSymbol.m_cChar; } /**************************************************************************/ -void SmSymSetManager::SFX_NOTIFY(SfxBroadcaster& /*rBC*/, const TypeId& rBCType, +void SmSymbolManager::SFX_NOTIFY(SfxBroadcaster& /*rBC*/, const TypeId& rBCType, const SfxHint& /*rHint*/, const TypeId& rHintType) { } -UINT32 SmSymSetManager::GetHashIndex(const String& rSymbolName) -{ - UINT32 x = 1; - for (xub_StrLen i = 0; i < rSymbolName.Len(); i++) - x += x * rSymbolName.GetChar(i) + i; - - return x % pImpl->NoHashEntries; -} - - -void SmSymSetManager::EnterHashTable(SmSym& rSymbol) -{ - int j = GetHashIndex( rSymbol.GetName() ); - if (pImpl->HashEntries[j] == 0) - pImpl->HashEntries[j] = &rSymbol; - else - { - SmSym *p = pImpl->HashEntries[j]; - while (p->pHashNext) - p = p->pHashNext; - p->pHashNext = &rSymbol; - } - rSymbol.pHashNext = 0; -} - - -void SmSymSetManager::EnterHashTable(SmSymSet& rSymbolSet) -{ - for (USHORT i = 0; i < rSymbolSet.GetCount(); i++) - EnterHashTable( *rSymbolSet.SymbolList.GetObject(i) ); -} - -void SmSymSetManager::FillHashTable() -{ - if (pImpl->HashEntries) - { - memset( pImpl->HashEntries, 0, pImpl->NoHashEntries * sizeof(SmSym *) ); - - for (UINT32 i = 0; i < pImpl->NoSymbolSets; i++) - EnterHashTable( *GetSymbolSet( (USHORT) i ) ); - } -} - -void SmSymSetManager::Init() +void SmSymbolManager::Init() { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); StartListening(*pp->GetConfig()); } -void SmSymSetManager::Exit() +void SmSymbolManager::Exit() { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); EndListening(*pp->GetConfig()); } -SmSymSetManager::SmSymSetManager(USHORT HashTableSize) +SmSymbolManager::SmSymbolManager() { - pImpl = new SmSymSetManager_Impl( *this, HashTableSize ); + m_bModified = false; } -SmSymSetManager::SmSymSetManager(const SmSymSetManager& rSymbolSetManager) : +SmSymbolManager::SmSymbolManager(const SmSymbolManager& rSymbolSetManager) : SfxListener() { - pImpl = new SmSymSetManager_Impl( *this, rSymbolSetManager.pImpl->NoHashEntries ); - *pImpl = *rSymbolSetManager.pImpl; + m_aSymbols = rSymbolSetManager.m_aSymbols; + m_bModified = true; } -SmSymSetManager::~SmSymSetManager() +SmSymbolManager::~SmSymbolManager() { - delete pImpl; - pImpl = 0; } -SmSymSetManager& SmSymSetManager::operator = (const SmSymSetManager& rSymbolSetManager) + +SmSymbolManager& SmSymbolManager::operator = (const SmSymbolManager& rSymbolSetManager) { - *pImpl = *rSymbolSetManager.pImpl; + m_aSymbols = rSymbolSetManager.m_aSymbols; + m_bModified = true; return *this; } -USHORT SmSymSetManager::AddSymbolSet(SmSymSet* pSymbolSet) -{ - if (pImpl->NoSymbolSets >= pImpl->SymbolSets.GetSize()) - pImpl->SymbolSets.SetSize(pImpl->NoSymbolSets + 1); - - pImpl->SymbolSets.Put(pImpl->NoSymbolSets++, pSymbolSet); - pSymbolSet->pSymSetManager = this; - - for (USHORT i = 0; i < pSymbolSet->GetCount(); i++) - pSymbolSet->SymbolList.GetObject(i)->pSymSetManager = this; - - FillHashTable(); - pImpl->Modified = TRUE; - - return (USHORT) (pImpl->NoSymbolSets - 1); -} - -void SmSymSetManager::ChangeSymbolSet(SmSymSet* pSymbolSet) +SmSym *SmSymbolManager::GetSymbolByName(const String& rSymbolName) { - if (pSymbolSet) - { - FillHashTable(); - pImpl->Modified = TRUE; - } + SmSym *pRes = NULL; + SymbolMap_t::iterator aIt( m_aSymbols.find( rSymbolName ) ); + if (aIt != m_aSymbols.end()) + pRes = &aIt->second; + return pRes; } -void SmSymSetManager::DeleteSymbolSet(USHORT SymbolSetNo) -{ - delete pImpl->SymbolSets.Get(SymbolSetNo); - pImpl->NoSymbolSets--; - - for (UINT32 i = SymbolSetNo; i < pImpl->NoSymbolSets; i++) - pImpl->SymbolSets.Put(i, pImpl->SymbolSets.Get(i + 1)); - - FillHashTable(); - pImpl->Modified = TRUE; +const SymbolPtrVec_t SmSymbolManager::GetSymbols() const +{ + SymbolPtrVec_t aRes; + SymbolMap_t::const_iterator aIt( m_aSymbols.begin() ); + for ( ; aIt != m_aSymbols.end(); ++aIt) + aRes.push_back( &aIt->second ); + DBG_ASSERT( sSymbols.size() == m_aSymbols.size(), "number of symbols mismatch " ); + return aRes; } -USHORT SmSymSetManager::GetSymbolSetPos(const String& rSymbolSetName) const +bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChange ) { - for (USHORT i = 0; i < pImpl->NoSymbolSets; i++) - if (pImpl->SymbolSets.Get(i)->GetName() == rSymbolSetName) - return (i); - - return SYMBOLSET_NONE; -} + bool bAdded = false; -SmSym *SmSymSetManager::GetSymbolByName(const String& rSymbolName) -{ - SmSym *pSym = pImpl->HashEntries[GetHashIndex(rSymbolName)]; - while (pSym) + const String aSymbolName( rSymbol.GetName() ); + if (aSymbolName.Len() > 0 && rSymbol.GetSymbolSetName().Len() > 0) { - if (pSym->Name == rSymbolName) - break; - pSym = pSym->pHashNext; - } - - return pSym; -} + const SmSym *pFound = GetSymbolByName( aSymbolName ); + const bool bSymbolConflict = pFound && !pFound->IsEqualInUI( rSymbol ); - -void SmSymSetManager::AddReplaceSymbol( const SmSym &rSymbol ) -{ - SmSym *pSym = GetSymbolByName( rSymbol.GetName() ); - if (pSym) - { - *pSym = rSymbol; - } - else - { - USHORT nPos = GetSymbolSetPos( rSymbol.GetSetName() ); - if (SYMBOLSET_NONE == nPos) + // avoid having the same symbol name twice but with different symbols in use + if (!pFound || bForceChange) { - AddSymbolSet( new SmSymSet( rSymbol.GetSetName() ) ); - nPos = GetSymbolSetPos( rSymbol.GetSetName() ); + m_aSymbols[ aSymbolName ] = rSymbol; + bAdded = true; + } + else if (pFound && !bForceChange && bSymbolConflict) + { + // TODO: but what ... + DBG_ASSERT( 0, "symbol conflict, different symbol with same name found!" ); } - DBG_ASSERT( nPos != SYMBOLSET_NONE, "SymbolSet not found"); - SmSym *pTmpSym = new SmSym( rSymbol ); - GetSymbolSet( nPos )->AddSymbol( pTmpSym ); - EnterHashTable( *pTmpSym ); } - SetModified( TRUE ); -} + DBG_ASSERT( bAdded, "failed to add symbol" ); + if (bAdded) + m_bModified = true; -USHORT SmSymSetManager::GetSymbolCount() const -{ - USHORT nRes = 0; - USHORT nSets = GetSymbolSetCount(); - for (USHORT i = 0; i < nSets; ++i) - nRes = nRes + GetSymbolSet(i)->GetCount(); - return nRes; + return bAdded; } -const SmSym * SmSymSetManager::GetSymbolByPos( USHORT nPos ) const +void SmSymbolManager::RemoveSymbol( const String & rSymbolName ) { - const SmSym *pRes = 0; - - INT16 nIdx = 0; - USHORT nSets = GetSymbolSetCount(); - USHORT i = 0; - while (i < nSets && !pRes) + if (rSymbolName.Len() > 0) { - USHORT nEntries = GetSymbolSet(i)->GetCount(); - if (nPos < nIdx + nEntries) - pRes = &GetSymbolSet(i)->GetSymbol( nPos - nIdx ); - else - nIdx = nIdx + nEntries; - ++i; + size_t nOldSize = m_aSymbols.size(); + m_aSymbols.erase( rSymbolName ); + m_bModified = nOldSize != m_aSymbols.size(); } +} - return pRes; + +std::set< String > SmSymbolManager::GetSymbolSetNames() const +{ + std::set< String > aRes; + SymbolMap_t::const_iterator aIt( m_aSymbols.begin() ); + for ( ; aIt != m_aSymbols.end(); ++aIt ) + aRes.insert( aIt->second.GetSymbolSetName() ); + return aRes; } -void SmSymSetManager::GetSymbols( std::vector< SmSym > &rSymbols ) const +const SymbolPtrVec_t SmSymbolManager::GetSymbolSet( const String& rSymbolSetName ) { - INT32 nCount = GetSymbolCount(); - rSymbols.resize( nCount ); - USHORT nPos = 0; - std::vector< SmSym >::iterator aIt( rSymbols.begin() ); - std::vector< SmSym >::iterator aEnd( rSymbols.end() ); - while (aIt != aEnd) + SymbolPtrVec_t aRes; + if (rSymbolSetName.Len() > 0) { - const SmSym *pSym = GetSymbolByPos( nPos++ ); - DBG_ASSERT( pSym, "symbol missing" ); - if (pSym) - *aIt++ = *pSym; + SymbolMap_t::const_iterator aIt( m_aSymbols.begin() ); + for ( ; aIt != m_aSymbols.end(); ++aIt ) + { + if (aIt->second.GetSymbolSetName() == rSymbolSetName) + aRes.push_back( &aIt->second ); + } } - DBG_ASSERT( nPos == nCount, "index out of range?" ); + return aRes; } -void SmSymSetManager::Load() +void SmSymbolManager::Load() { std::vector< SmSym > aSymbols; - SmMathConfig &rCfg = *SM_MOD1()->GetConfig(); + SmMathConfig &rCfg = *SM_MOD()->GetConfig(); rCfg.GetSymbols( aSymbols ); - INT32 nSymbolCount = aSymbols.size(); + size_t nSymbolCount = aSymbols.size(); - USHORT i; - for (i = 0; i < nSymbolCount; ++i) + m_aSymbols.clear(); + for (size_t i = 0; i < nSymbolCount; ++i) { const SmSym &rSym = aSymbols[i]; - DBG_ASSERT( rSym.Name.Len() > 0, "symbol without name!" ); - if (rSym.Name.Len() > 0) - { - SmSymSet *pSymSet = 0; - const String &rSetName = rSym.GetSetName(); - USHORT nSetPos = GetSymbolSetPos( rSetName ); - if (SYMBOLSET_NONE != nSetPos) - pSymSet = GetSymbolSet( nSetPos ); - else - { - pSymSet = new SmSymSet( rSetName ); - AddSymbolSet( pSymSet ); - } - - pSymSet->AddSymbol( new SmSym( rSym ) ); - } + DBG_ASSERT( rSym.GetName().Len() > 0, "symbol without name!" ); + if (rSym.GetName().Len() > 0) + AddOrReplaceSymbol( rSym ); } - // build HashTables - INT32 nSymbolSetCount = GetSymbolSetCount(); - for (i = 0; i < nSymbolSetCount; ++i) - ChangeSymbolSet( GetSymbolSet( i ) ); + m_bModified = true; if (0 == nSymbolCount) { DBG_ERROR( "no symbol set found" ); - pImpl->Modified = FALSE; + m_bModified = false; } } -void SmSymSetManager::Save() +void SmSymbolManager::Save() { - SmMathConfig &rCfg = *SM_MOD1()->GetConfig(); - - // get number of Symbols - USHORT nSymbolCount = 0; - USHORT nSetCount = GetSymbolSetCount(); - USHORT i; - for (i = 0; i < nSetCount; ++i) - nSymbolCount = nSymbolCount + GetSymbolSet( i )->GetCount(); - - if (nSymbolCount) + if (m_bModified) { - USHORT nSaveSymbolCnt = 0; - const SmSym **pSymbols = new const SmSym* [ nSymbolCount ]; - const SmSym **pSym = pSymbols; - for (i = 0; i < nSetCount; ++i) + SmMathConfig &rCfg = *SM_MOD()->GetConfig(); + +#if 0 + USHORT nSymbolCount = GetSymbolCount(); + USHORT nSaveSymbolCnt = 0; + const SmSym **pSymbols = new const SmSym* [ nSymbolCount ]; + const SmSym **pSym = pSymbols; + for (USHORT j = 0; j < nSymbolCount; ++j) { - const SmSymSet *pSymSet = GetSymbolSet( i ); - USHORT n = pSymSet->GetCount(); - for (USHORT j = 0; j < n; ++j) + const SmSym &rSym = *pSymSet->GetSymbol( j ); + if (!rSym.IsDocSymbol()) { - const SmSym &rSym = pSymSet->GetSymbol( j ); - if (!rSym.IsDocSymbol()) - { - *pSym++ = &rSym; - ++nSaveSymbolCnt; - } + *pSym++ = &rSym; + ++nSaveSymbolCnt; } } DBG_ASSERT(pSym - pSymbols == nSaveSymbolCnt, "wrong number of symbols" ); - +#endif + SymbolPtrVec_t aTmp( GetSymbols() ); std::vector< SmSym > aSymbols; - GetSymbols( aSymbols ); + for (size_t i = 0; i < aTmp.size(); ++i) + aSymbols.push_back( *aTmp[i] ); rCfg.SetSymbols( aSymbols ); +#if 0 delete [] pSymbols; +#endif + + m_bModified = false; } } diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index ed6e5b6bd23f..9d481bf1b840 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -593,7 +593,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* 0 }; SfxItemSet *pItemSet = new SfxItemSet( pDocSh->GetPool(), nRange ); - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); pp->GetConfig()->ConfigToItemSet(*pItemSet); SfxPrinter *pPrinter = SfxPrinter::Create ( aStream, pItemSet ); @@ -610,8 +610,8 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* if ( *pValues >>= aSequence ) { sal_uInt32 nSize = aSequence.getLength(); - SmModule *pp = SM_MOD1(); - SmSymSetManager &rManager = pp->GetSymSetManager(); + SmModule *pp = SM_MOD(); + SmSymbolManager &rManager = pp->GetSymbolManager(); SymbolDescriptor *pDescriptor = aSequence.getArray(); for (sal_uInt32 i = 0; i < nSize ; i++, pDescriptor++) { @@ -626,7 +626,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* pDescriptor->sSymbolSet ); aSymbol.SetExportName ( pDescriptor->sExportName ); aSymbol.SetDocSymbol( TRUE ); - rManager.AddReplaceSymbol ( aSymbol ); + rManager.AddOrReplaceSymbol ( aSymbol ); } } else @@ -795,14 +795,15 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu case HANDLE_SYMBOLS: { // this is get - SmModule *pp = SM_MOD1(); - const SmSymSetManager &rManager = pp->GetSymSetManager(); + SmModule *pp = SM_MOD(); + const SmSymbolManager &rManager = pp->GetSymbolManager(); vector < const SmSym * > aVector; - USHORT nCount = 0; - for (USHORT i = 0, nEnd = rManager.GetSymbolCount(); i < nEnd; i++) + const SymbolPtrVec_t aSymbols( rManager.GetSymbols() ); + size_t nCount = 0; + for (size_t i = 0; i < aSymbols.size(); ++i) { - const SmSym * pSymbol = rManager.GetSymbolByPos( i ); + const SmSym * pSymbol = aSymbols[ i ]; if (pSymbol && !pSymbol->IsPredefined () ) { aVector.push_back ( pSymbol ); @@ -812,12 +813,12 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu Sequence < SymbolDescriptor > aSequence ( nCount ); SymbolDescriptor * pDescriptor = aSequence.getArray(); - vector ::const_iterator aIter = aVector.begin(), aEnd = aVector.end(); + vector < const SmSym * >::const_iterator aIter = aVector.begin(), aEnd = aVector.end(); for(; aIter != aEnd; pDescriptor++, aIter++) { pDescriptor->sName = (*aIter)->GetName(); pDescriptor->sExportName = (*aIter)->GetExportName(); - pDescriptor->sSymbolSet = (*aIter)->GetSetName(); + pDescriptor->sSymbolSet = (*aIter)->GetSymbolSetName(); pDescriptor->nCharacter = static_cast < sal_Int32 > ((*aIter)->GetCharacter()); Font rFont = (*aIter)->GetFace(); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 22f186fbcb76..81030653c006 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -111,7 +111,7 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell): const Fraction aFraction (1,1); SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction)); - ApplyColorConfigValues( SM_MOD1()->GetColorConfig() ); + ApplyColorConfigValues( SM_MOD()->GetColorConfig() ); SetTotalSize(); @@ -149,7 +149,7 @@ void SmGraphicWindow::ApplyColorConfigValues( const svtools::ColorConfig &rColor void SmGraphicWindow::DataChanged( const DataChangedEvent& rEvt ) { - ApplyColorConfigValues( SM_MOD1()->GetColorConfig() ); + ApplyColorConfigValues( SM_MOD()->GetColorConfig() ); ScrollableWindow::DataChanged( rEvt ); } @@ -274,7 +274,7 @@ void SmGraphicWindow::SetCursor(const Rectangle &rRect) // The old cursor will be removed, and the new one will be shown if // that is activated in the ConfigItem { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); if (IsCursorVisible()) ShowCursor(FALSE); // clean up remainings of old cursor @@ -328,7 +328,7 @@ void SmGraphicWindow::Paint(const Rectangle&) nCol++; const SmNode *pFound = SetCursorPos(nRow, nCol); - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); if (pFound && pp->GetConfig()->IsShowFormulaCursor()) ShowCursor(TRUE); } @@ -1015,7 +1015,7 @@ void SmViewShell::Impl_Print( { RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Impl_Print" ); - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); rOutDev.Push(); rOutDev.SetLineColor( Color(COL_BLACK) ); @@ -1187,7 +1187,7 @@ USHORT SmViewShell::Print(SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPri OutputRect.Right() -= 1500 - (aPrtPaperSize.Width() - (aPrtPageOffset.X() + OutputRect.Right())); - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); Impl_Print( *pPrinter, pp->GetConfig()->GetPrintSize(), OutputRect, aZeroPoint ); @@ -1217,7 +1217,7 @@ USHORT SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool if ((nDiffFlags & SFX_PRINTER_OPTIONS) == SFX_PRINTER_OPTIONS) { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); pp->GetConfig()->ItemSetToConfig(pNewPrinter->GetOptions()); } return 0; @@ -1405,7 +1405,7 @@ void SmViewShell::Execute(SfxRequest& rReq) { case SID_FORMULACURSOR: { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem *pItem; @@ -1707,11 +1707,11 @@ void SmViewShell::Execute(SfxRequest& rReq) SmDocShell *pDoc = GetDoc(); OutputDevice *pDev = pDoc->GetPrinter(); if (!pDev || pDev->GetDevFontCount() == 0) - pDev = &SM_MOD1()->GetDefaultVirtualDev(); + pDev = &SM_MOD()->GetDefaultVirtualDev(); DBG_ASSERT (pDev, "device for font list missing" ); - SmModule *pp = SM_MOD1(); - SmSymbolDialog( NULL, pDev, pp->GetSymSetManager(), *this ).Execute(); + SmModule *pp = SM_MOD(); + SmSymbolDialog( NULL, pDev, pp->GetSymbolManager(), *this ).Execute(); } break; @@ -1789,7 +1789,7 @@ void SmViewShell::GetState(SfxItemSet &rSet) case SID_FORMULACURSOR: { - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); rSet.Put(SfxBoolItem(nWh, pp->GetConfig()->IsShowFormulaCursor())); } break; -- cgit v1.2.3 From 99e0c16a598611c7bb7e8d0fa1afffcf428e2f92 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Tue, 29 Sep 2009 14:30:58 +0000 Subject: #i105421# get rid of sfx2 --- linguistic/prj/build.lst | 2 +- linguistic/source/convdic.cxx | 92 ++++++++++++++++++--------------- linguistic/source/convdiclist.cxx | 1 - linguistic/source/convdicxml.cxx | 3 +- linguistic/source/convdicxml.hxx | 2 +- linguistic/source/defs.hxx | 7 +++ linguistic/source/dicimp.cxx | 104 ++++++++++++++++++++++++-------------- linguistic/source/dicimp.hxx | 3 +- linguistic/source/dlistimp.cxx | 48 +++++++++++++----- linguistic/source/hhconvdic.cxx | 1 - linguistic/source/makefile.mk | 1 - 11 files changed, 162 insertions(+), 102 deletions(-) diff --git a/linguistic/prj/build.lst b/linguistic/prj/build.lst index 0b8f5f62fb1c..344453253054 100644 --- a/linguistic/prj/build.lst +++ b/linguistic/prj/build.lst @@ -1,4 +1,4 @@ -lg linguistic : xmloff sfx2 NULL +lg linguistic : xmloff NULL lg linguistic usr1 - all lg_mkout NULL lg linguistic\prj get - all lg_prj NULL lg linguistic\inc nmake - all lg_inc NULL diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index c58e7d142d47..c55e4ef30f4c 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -30,19 +30,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_linguistic.hxx" + +#include #include -#include +#include #include #include #include -#include #include -#include -#include -#include +#include +#include #include +#include +#include +#include -#include // helper for factories #include #include #include @@ -50,18 +52,19 @@ #include #include #include -#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_ +#include #include -#endif #include #include #include +#include +#include +#include #include #include #include #include #include -#include #include "convdic.hxx" @@ -89,23 +92,27 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport ) { if (rMainURL.Len() == 0) return; - - // get stream to be used DBG_ASSERT(!INetURLObject( rMainURL ).HasError(), "invalid URL"); - SfxMedium aMedium( rMainURL, STREAM_READ | STREAM_SHARE_DENYWRITE, FALSE ); - SvStream *pStream = aMedium.GetInStream(); - DBG_ASSERT( pStream, "input stream missing" ); - if (!pStream || pStream->GetError()) - return; - uno::Reference< lang::XMultiServiceFactory > xServiceFactory( - utl::getProcessServiceFactory() ); - DBG_ASSERT( xServiceFactory.is(), "XMLReader::Read: got no service manager" ); - if (!xServiceFactory.is()) + uno::Reference< lang::XMultiServiceFactory > xServiceFactory( utl::getProcessServiceFactory() ); + + // get xInputStream stream + uno::Reference< io::XInputStream > xIn; + try + { + uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance( + A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW ); + xIn = xAccess->openFileRead( rMainURL ); + } + catch (uno::Exception & e) + { + DBG_ASSERT( 0, "failed to get input stream" ); + (void) e; + } + if (!xIn.is()) return; - uno::Reference< io::XInputStream > xIn = new utl::OInputStreamWrapper( *pStream ); - DBG_ASSERT( xIn.is(), "input stream missing" ); + SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xIn ) ); ULONG nError = sal::static_int_cast< ULONG >(-1); @@ -274,23 +281,29 @@ void ConvDic::Save() DBG_ASSERT( !bNeedEntries, "saving while entries missing" ); if (aMainURL.Len() == 0 || bNeedEntries) return; - DBG_ASSERT(!INetURLObject( aMainURL ).HasError(), "invalid URL"); - SfxMedium aMedium( aMainURL, STREAM_WRITE | STREAM_TRUNC | STREAM_SHARE_DENYALL, - FALSE ); - aMedium.CreateTempFile(); // use temp file to write to... - SvStream *pStream = aMedium.GetOutStream(); - DBG_ASSERT( pStream, "output stream missing" ); - if (!pStream || pStream->GetError()) + uno::Reference< lang::XMultiServiceFactory > xServiceFactory( utl::getProcessServiceFactory() ); + + // get XOutputStream stream + uno::Reference< io::XStream > xStream; + try + { + uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance( + A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW ); + xStream = xAccess->openFileReadWrite( aMainURL ); + } + catch (uno::Exception & e) + { + DBG_ASSERT( 0, "failed to get input stream" ); + (void) e; + } + if (!xStream.is()) return; - uno::Reference< io::XOutputStream > xOut( - new utl::OOutputStreamWrapper( *pStream ) ); - DBG_ASSERT( xOut.is(), "output stream missing" ); + + SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) ); // get XML writer - uno::Reference< lang::XMultiServiceFactory > xServiceFactory( - utl::getProcessServiceFactory() ); uno::Reference< io::XActiveDataSource > xSaxWriter; if (xServiceFactory.is()) { @@ -306,10 +319,10 @@ void ConvDic::Save() } DBG_ASSERT( xSaxWriter.is(), "can't instantiate XML writer" ); - if (xSaxWriter.is() && xOut.is()) + if (xSaxWriter.is() && xStream.is()) { // connect XML writer to output stream - xSaxWriter->setOutputStream( xOut ); + xSaxWriter->setOutputStream( xStream->getOutputStream() ); // prepare arguments (prepend doc handler to given arguments) uno::Reference< xml::sax::XDocumentHandler > xDocHandler( xSaxWriter, UNO_QUERY ); @@ -318,15 +331,10 @@ void ConvDic::Save() //!! keep a first(!) reference until everything is done to //!! ensure the proper lifetime of the object uno::Reference< document::XFilter > aRef( (document::XFilter *) pExport ); - sal_Bool bRet = pExport->Export( aMedium ); // write entries to file + sal_Bool bRet = pExport->Export(); // write entries to file DBG_ASSERT( !pStream->GetError(), "I/O error while writing to stream" ); if (bRet) - { - // flush file, close it and release any lock - aMedium.Close(); - aMedium.Commit(); bIsModified = FALSE; - } } DBG_ASSERT( !bIsModified, "dictionary still modified after save. Save failed?" ); } diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index ff68146834bf..2d8a058974f7 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include // helper for factories diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx index 34133a4bc2f9..70ada335f57e 100644 --- a/linguistic/source/convdicxml.cxx +++ b/linguistic/source/convdicxml.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -335,7 +334,7 @@ void ConvDicXMLRightTextContext_Impl::EndElement() /////////////////////////////////////////////////////////////////////////// -sal_Bool ConvDicXMLExport::Export( SfxMedium & /*rMedium*/ ) +sal_Bool ConvDicXMLExport::Export() { sal_Bool bRet = sal_False; diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx index 0746b5998589..f0a3ae4417d4 100644 --- a/linguistic/source/convdicxml.hxx +++ b/linguistic/source/convdicxml.hxx @@ -79,7 +79,7 @@ public: void _ExportContent(); sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ); - sal_Bool Export( SfxMedium &rMedium ); + sal_Bool Export(); }; diff --git a/linguistic/source/defs.hxx b/linguistic/source/defs.hxx index ca3a611c30ee..48b6dc6d82e7 100644 --- a/linguistic/source/defs.hxx +++ b/linguistic/source/defs.hxx @@ -36,10 +36,17 @@ #include #include +#include + +class SvStream; + + /////////////////////////////////////////////////////////////////////////// #define A2OU(x) ::rtl::OUString::createFromAscii( x ) +typedef boost::shared_ptr< SvStream > SvStreamPtr; + namespace css = ::com::sun::star; /////////////////////////////////////////////////////////////////////////// diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index 1555fd3df4d7..019c6ffa1cd4 100644 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -30,29 +30,30 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_linguistic.hxx" -#include -#ifndef _DICIMP_HXX +#include #include -#endif -#ifndef _HYPHIMP_HXX #include -#endif -#include +#include +#include +#include #include #include #include #include -#include -#include +#include #include -#include +#include +#include #include #include #include +#include +#include + +#include "defs.hxx" -#include // helper for factories using namespace utl; using namespace osl; @@ -88,7 +89,7 @@ static sal_Bool getTag(const ByteString &rLine, } -INT16 ReadDicVersion( SvStream *pStream, USHORT &nLng, BOOL &bNeg ) +INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg ) { // Sniff the header INT16 nDicVersion; @@ -97,13 +98,13 @@ INT16 ReadDicVersion( SvStream *pStream, USHORT &nLng, BOOL &bNeg ) nLng = LANGUAGE_NONE; bNeg = FALSE; - if (!pStream || pStream->GetError()) + if (!rpStream.get() || rpStream->GetError()) return -1; - sal_Size nSniffPos = pStream->Tell(); + sal_Size nSniffPos = rpStream->Tell(); static sal_Size nVerOOo7Len = sal::static_int_cast< sal_Size >(strlen( pVerOOo7 )); pMagicHeader[ nVerOOo7Len ] = '\0'; - if ((pStream->Read((void *) pMagicHeader, nVerOOo7Len) == nVerOOo7Len) && + if ((rpStream->Read((void *) pMagicHeader, nVerOOo7Len) == nVerOOo7Len) && !strcmp(pMagicHeader, pVerOOo7)) { sal_Bool bSuccess; @@ -112,10 +113,10 @@ INT16 ReadDicVersion( SvStream *pStream, USHORT &nLng, BOOL &bNeg ) nDicVersion = 7; // 1st skip magic / header line - pStream->ReadLine(aLine); + rpStream->ReadLine(aLine); // 2nd line: language all | en-US | pt-BR ... - while (sal_True == (bSuccess = pStream->ReadLine(aLine))) + while (sal_True == (bSuccess = rpStream->ReadLine(aLine))) { ByteString aTagValue; @@ -151,13 +152,13 @@ INT16 ReadDicVersion( SvStream *pStream, USHORT &nLng, BOOL &bNeg ) { USHORT nLen; - pStream->Seek (nSniffPos ); + rpStream->Seek (nSniffPos ); - *pStream >> nLen; + *rpStream >> nLen; if (nLen >= MAX_HEADER_LENGTH) return -1; - pStream->Read(pMagicHeader, nLen); + rpStream->Read(pMagicHeader, nLen); pMagicHeader[nLen] = '\0'; // Check version magic @@ -175,14 +176,14 @@ INT16 ReadDicVersion( SvStream *pStream, USHORT &nLng, BOOL &bNeg ) 6 == nDicVersion) { // The language of the dictionary - *pStream >> nLng; + *rpStream >> nLng; if (VERS2_NOLANGUAGE == nLng) nLng = LANGUAGE_NONE; // Negative Flag sal_Char nTmp; - *pStream >> nTmp; + *rpStream >> nTmp; bNeg = (BOOL)nTmp; } } @@ -270,14 +271,29 @@ ULONG DictionaryNeo::loadEntries(const OUString &rMainURL) if (rMainURL.getLength() == 0) return 0; + DBG_ASSERT(!INetURLObject( rURL ).HasError(), "lng : invalid URL"); - ULONG nErr = sal::static_int_cast< ULONG >(-1); + uno::Reference< lang::XMultiServiceFactory > xServiceFactory( utl::getProcessServiceFactory() ); - // get stream to use - SfxMedium aMedium( rMainURL, STREAM_READ | STREAM_SHARE_DENYWRITE, FALSE ); - SvStream *pStream = aMedium.GetInStream(); - if (!pStream) - return nErr; + // get XInputStream stream + uno::Reference< io::XInputStream > xStream; + try + { + uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance( + A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW ); + xStream = xAccess->openFileRead( rMainURL ); + } + catch (uno::Exception & e) + { + DBG_ASSERT( 0, "failed to get input stream" ); + (void) e; + } + if (!xStream.is()) + return static_cast< ULONG >(-1); + + SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) ); + + ULONG nErr = sal::static_int_cast< ULONG >(-1); // Header einlesen BOOL bNegativ; @@ -285,6 +301,7 @@ ULONG DictionaryNeo::loadEntries(const OUString &rMainURL) nDicVersion = ReadDicVersion(pStream, nLang, bNegativ); if (0 != (nErr = pStream->GetError())) return nErr; + nLanguage = nLang; eDicType = bNegativ ? DictionaryType_NEGATIVE : DictionaryType_POSITIVE; @@ -398,16 +415,29 @@ ULONG DictionaryNeo::saveEntries(const OUString &rURL) if (rURL.getLength() == 0) return 0; + DBG_ASSERT(!INetURLObject( rURL ).HasError(), "lng : invalid URL"); - ULONG nErr = sal::static_int_cast< ULONG >(-1); + uno::Reference< lang::XMultiServiceFactory > xServiceFactory( utl::getProcessServiceFactory() ); - DBG_ASSERT(!INetURLObject( rURL ).HasError(), "lng : invalid URL"); - SfxMedium aMedium( rURL, STREAM_WRITE | STREAM_TRUNC | STREAM_SHARE_DENYALL, - FALSE ); - aMedium.CreateTempFile(); // use temp file to write to... - SvStream *pStream = aMedium.GetOutStream(); - if (!pStream) - return nErr; + // get XOutputStream stream + uno::Reference< io::XStream > xStream; + try + { + uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance( + A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW ); + xStream = xAccess->openFileReadWrite( rURL ); + } + catch (uno::Exception & e) + { + DBG_ASSERT( 0, "failed to get input stream" ); + (void) e; + } + if (!xStream.is()) + return static_cast< ULONG >(-1); + + SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) ); + + ULONG nErr = sal::static_int_cast< ULONG >(-1); rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); if (nDicVersion >= 6) @@ -500,10 +530,6 @@ ULONG DictionaryNeo::saveEntries(const OUString &rURL) //! get return value before Stream is destroyed ULONG nError = pStream->GetError(); - // flush file, close it and release any lock - aMedium.Close(); - aMedium.Commit(); - return nError; } diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx index 52eada08c486..917890bdd63c 100644 --- a/linguistic/source/dicimp.hxx +++ b/linguistic/source/dicimp.hxx @@ -42,6 +42,7 @@ #include #include +#include "defs.hxx" #include "misc.hxx" @@ -49,7 +50,7 @@ #define DIC_MAX_ENTRIES 30000 -INT16 ReadDicVersion( SvStream *pStream, USHORT &nLng, BOOL &bNeg ); +INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg ); const String GetDicExtension(); /////////////////////////////////////////////////////////////////////////// diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index 4da58e270991..6d247a16b605 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -30,21 +30,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_linguistic.hxx" -#include "dlistimp.hxx" -#include "dicimp.hxx" -#include "lngopt.hxx" +#include +#include #include +#include +#include #include #include #include -#include -#include -#include -#include -#include -#include // helper for factories #include +#include +#include +#include + +#include #include #include #include @@ -52,6 +52,11 @@ #include #include +#include "defs.hxx" +#include "dlistimp.hxx" +#include "dicimp.hxx" +#include "lngopt.hxx" + //using namespace utl; using namespace osl; using namespace rtl; @@ -929,11 +934,28 @@ static BOOL IsVers2OrNewer( const String& rFileURL, USHORT& nLng, BOOL& bNeg ) if(aExt != aDIC) return FALSE; - // get stream to be used - SfxMedium aMedium( rFileURL, STREAM_READ | STREAM_SHARE_DENYWRITE, FALSE ); - SvStream *pStream = aMedium.GetInStream(); + uno::Reference< lang::XMultiServiceFactory > xServiceFactory( utl::getProcessServiceFactory() ); + + // get XInputStream stream + uno::Reference< io::XInputStream > xStream; + try + { + uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance( + A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW ); + xStream = xAccess->openFileRead( rFileURL ); + } + catch (uno::Exception & e) + { + DBG_ASSERT( 0, "failed to get input stream" ); + (void) e; + } + DBG_ASSERT( xStream.is(), "failed to get stream for read" ); + if (!xStream.is()) + return FALSE; + + SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) ); - int nDicVersion = ReadDicVersion (pStream, nLng, bNeg); + int nDicVersion = ReadDicVersion(pStream, nLng, bNeg); if (2 == nDicVersion || nDicVersion >= 5) return TRUE; diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx index 7972c1b208c7..980aabb51bef 100644 --- a/linguistic/source/hhconvdic.cxx +++ b/linguistic/source/hhconvdic.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/linguistic/source/makefile.mk b/linguistic/source/makefile.mk index 0012a9acd156..a6f9d266d095 100644 --- a/linguistic/source/makefile.mk +++ b/linguistic/source/makefile.mk @@ -74,7 +74,6 @@ SHL1STDLIBS= \ $(SVTOOLLIB) \ $(SVLLIB) \ $(VCLLIB) \ - $(SFXLIB) \ $(SALLIB) \ $(UCBHELPERLIB) \ $(UNOTOOLSLIB) \ -- cgit v1.2.3 From 2b26e3c4cef2510b0027c4a3f88669b603a43df7 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 1 Oct 2009 10:51:09 +0000 Subject: #i1601# new strings for menu entries --- configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu b/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu index ea92b1edf576..6f2cb8c8a313 100644 --- a/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu +++ b/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu @@ -2094,22 +2094,22 @@ - ~Lowercase + ~lowercase - ~Uppercase + ~UPPERCASE - ~Title case + ~Capitalize Every Word - T~oggle case + ~tOGGLE cASE -- cgit v1.2.3 From f69e2960c10d35fbcd49581497a0e48ee39998a5 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 1 Oct 2009 10:53:19 +0000 Subject: #i1601# new strings for menu entries --- .../registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 0a3fe0a3bdd3..e28c241be9ed 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -2116,7 +2116,7 @@ - ~Lowercase + ~lowercase 1 @@ -2124,7 +2124,7 @@ - ~Uppercase + ~UPPERCASE 1 @@ -2132,7 +2132,7 @@ - ~Title case + ~Capitalize Every Word 1 @@ -2140,7 +2140,7 @@ - T~oggle case + ~tOGGLE cASE 1 -- cgit v1.2.3 From e640bf3c6d47ead0b1249c87ed828d0730533c94 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 1 Oct 2009 10:58:02 +0000 Subject: #i1601# new strings for menu entries --- svx/inc/globlmn_tmpl.hrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc index 8f5e3f390a1b..c3dae141a766 100644 --- a/svx/inc/globlmn_tmpl.hrc +++ b/svx/inc/globlmn_tmpl.hrc @@ -1351,28 +1351,28 @@ Identifier = SID_TRANSLITERATE_LOWER; \ Command = ".uno:ChangeCaseToLower" ; \ HelpID = SID_TRANSLITERATE_LOWER; \ - Text [ en-US ] = "~Lowercase";\ + Text [ en-US ] = "~lowercase";\ };\ MenuItem\ {\ Identifier = SID_TRANSLITERATE_UPPER ; \ Command = ".uno:ChangeCaseToUpper" ; \ HelpID = SID_TRANSLITERATE_UPPER ; \ - Text [ en-US ] = "~Uppercase";\ + Text [ en-US ] = "~UPPERCASE";\ };\ MenuItem\ {\ Identifier = SID_TRANSLITERATE_TITLE_CASE; \ Command = ".uno:ChangeCaseToTitleCase" ; \ HelpID = SID_TRANSLITERATE_TITLE_CASE; \ - Text [ en-US ] = "~Title case";\ + Text [ en-US ] = "~Capitalize Every Word";\ };\ MenuItem\ {\ Identifier = SID_TRANSLITERATE_TOGGLE_CASE; \ Command = ".uno:ChangeCaseToToggleCase" ; \ HelpID = SID_TRANSLITERATE_TOGGLE_CASE; \ - Text [ en-US ] = "T~oggle case";\ + Text [ en-US ] = "~tOGGLE cASE";\ };\ MenuItem\ {\ -- cgit v1.2.3 From dba84e79fc20ced9af1243f4f6ba7f7c0eaee170 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 7 Oct 2009 05:07:45 +0000 Subject: merge problem fixed --- starmath/source/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index 24f6a21ca0b9..3a3a09ab8dbf 100644 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -77,7 +77,6 @@ SLO1FILES = \ $(SLO)$/utility.obj \ $(SLO)$/rect.obj \ $(SLO)$/unomodel.obj \ - $(SLO)$/viewhdl.obj \ $(SLO)$/view.obj SLO2FILES = \ -- cgit v1.2.3 From 4726cacc24846b63e1177c7ab4dff4ae5b1c4291 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 19 Oct 2009 08:08:21 +0000 Subject: #106019# 'reset languages' menu entry --- framework/inc/classes/resource.hrc | 1 + framework/inc/helper/mischelper.hxx | 55 ++++ .../inc/uielement/langselectionmenucontroller.hxx | 3 +- .../uielement/langselectionstatusbarcontroller.hxx | 17 +- framework/source/classes/resource.src | 5 + framework/source/helper/mischelper.cxx | 246 ++++++++++++------ .../uielement/langselectionmenucontroller.cxx | 211 ++++++--------- .../uielement/langselectionstatusbarcontroller.cxx | 282 +++++++++------------ framework/util/makefile.mk | 3 +- 9 files changed, 439 insertions(+), 384 deletions(-) diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc index 37e71f2bacad..18286e792443 100644 --- a/framework/inc/classes/resource.hrc +++ b/framework/inc/classes/resource.hrc @@ -58,6 +58,7 @@ #define STR_SET_LANGUAGE_FOR_PARAGRAPH (RID_STR_START+19) #define STR_SET_LANGUAGE_FOR_ALL_TEXT (RID_STR_START+20) #define STR_UNTITLED_DOCUMENT (RID_STR_START+21) +#define STR_RESET_TO_DEFAULT_LANGUAGE (RID_STR_START+22) #define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION (RID_MENU_START+0) diff --git a/framework/inc/helper/mischelper.hxx b/framework/inc/helper/mischelper.hxx index 435b87a4f248..ff4cf43572fa 100644 --- a/framework/inc/helper/mischelper.hxx +++ b/framework/inc/helper/mischelper.hxx @@ -37,10 +37,56 @@ #include #include +#include + +#include + +class SvtLanguageTable; + + +// flags for script types in use within selection +#define LS_SCRIPT_LATIN 0x0001 +#define LS_SCRIPT_ASIAN 0x0002 +#define LS_SCRIPT_COMPLEX 0x0004 + namespace framework { +// menu ids for language status bar control +enum LangMenuIDs +{ + MID_LANG_SEL_1, + MID_LANG_SEL_2, + MID_LANG_SEL_3, + MID_LANG_SEL_4, + MID_LANG_SEL_5, + MID_LANG_SEL_6, + MID_LANG_SEL_7, + MID_LANG_SEL_8, + MID_LANG_SEL_9, + MID_LANG_SEL_NONE, + MID_LANG_SEL_RESET, + MID_LANG_SEL_MORE, + + MID_LANG_PARA_SEPERATOR, + MID_LANG_PARA_STRING, + + MID_LANG_PARA_1, + MID_LANG_PARA_2, + MID_LANG_PARA_3, + MID_LANG_PARA_4, + MID_LANG_PARA_5, + MID_LANG_PARA_6, + MID_LANG_PARA_7, + MID_LANG_PARA_8, + MID_LANG_PARA_9, + MID_LANG_PARA_NONE, + MID_LANG_PARA_RESET, + MID_LANG_PARA_MORE, +}; + + inline bool IsScriptTypeMatchingToLanguage( sal_Int16 nScriptType, LanguageType nLang ) { return 0 != (nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang )); @@ -66,6 +112,15 @@ public: ,sal_Bool& _rIni ,const sal_Char* _pName); +void FillLangItems( std::set< ::rtl::OUString > &rLangItems, + const SvtLanguageTable &rLanguageTable, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, + const LanguageGuessingHelper & rLangGuessHelper, + sal_Int16 nScriptType, + const ::rtl::OUString & rCurLang, + const ::rtl::OUString & rKeyboardLang, + const ::rtl::OUString & rGuessedTextLang ); + } // namespace framework #endif // __MISC_HELPER_HXX_ diff --git a/framework/inc/uielement/langselectionmenucontroller.hxx b/framework/inc/uielement/langselectionmenucontroller.hxx index ff8083ce6714..de0fabccecd4 100644 --- a/framework/inc/uielement/langselectionmenucontroller.hxx +++ b/framework/inc/uielement/langselectionmenucontroller.hxx @@ -102,11 +102,10 @@ namespace framework ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xMenuDispatch_Font; ::rtl::OUString m_aMenuCommandURL_CharDlgForParagraph; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xMenuDispatch_CharDlgForParagraph; - ::rtl::OUString m_aCurrentLanguage; ::rtl::OUString m_aCurLang; sal_Int16 m_nScriptType; ::rtl::OUString m_aKeyboardLang; - ::rtl::OUString m_aGuessedText; + ::rtl::OUString m_aGuessedTextLang; LanguageGuessingHelper m_aLangGuessHelper; void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu, const Mode rMode ); diff --git a/framework/inc/uielement/langselectionstatusbarcontroller.hxx b/framework/inc/uielement/langselectionstatusbarcontroller.hxx index 0b9df06c8877..e74fe9bb729b 100644 --- a/framework/inc/uielement/langselectionstatusbarcontroller.hxx +++ b/framework/inc/uielement/langselectionstatusbarcontroller.hxx @@ -38,9 +38,15 @@ #include #include #include +#include #include "helper/mischelper.hxx" +#include + +class SvtLanguageTable; + + // component helper namespace namespace framework { @@ -89,12 +95,11 @@ class LangSelectionStatusbarController : public svt::StatusbarController void operator =(LangSelectionStatusbarController &); // not defined - sal_Bool m_bShowMenu; - sal_Int16 m_nScriptType; - ::rtl::OUString m_aCurrentLanguage; - ::rtl::OUString m_aCurLang; - ::rtl::OUString m_aKeyboardLang; - ::rtl::OUString m_aGuessedText; + sal_Bool m_bShowMenu; // if the menu is to be displayed or not (depending on the selected object/text) + sal_Int16 m_nScriptType; // the flags for the different script types available in the selection, LATIN = 0x0001, ASIAN = 0x0002, COMPLEX = 0x0004 + ::rtl::OUString m_aCurLang; // the language of the current selection, "*" if there are more than one languages + ::rtl::OUString m_aKeyboardLang; // the keyboard language + ::rtl::OUString m_aGuessedTextLang; // the 'guessed' language for the selection, "" if none could be guessed LanguageGuessingHelper m_aLangGuessHelper; void LangMenu() throw (::com::sun::star::uno::RuntimeException); diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src index 0947abbe9288..3d4a817c85b7 100644 --- a/framework/source/classes/resource.src +++ b/framework/source/classes/resource.src @@ -330,6 +330,11 @@ String STR_LANGSTATUS_NONE Text [ en-US ] = "None (Do not check spelling)" ; Text [ x-comment ] = " "; }; +String STR_RESET_TO_DEFAULT_LANGUAGE +{ + Text [ en-US ] = "Reset to Default Language" ; + Text [ x-comment ] = " "; +}; String STR_LANGSTATUS_MORE { Text [ en-US ] = "More..." ; diff --git a/framework/source/helper/mischelper.cxx b/framework/source/helper/mischelper.cxx index 8e0f79b2607c..8d85873a92e9 100644 --- a/framework/source/helper/mischelper.cxx +++ b/framework/source/helper/mischelper.cxx @@ -32,21 +32,29 @@ #include "precompiled_framework.hxx" #include -#include -#include +#include +#include +#include #include +#include +#include +#include +#include #include #include #include using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::container; -using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::frame; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::container; +using namespace ::com::sun::star::lang; + +using ::rtl::OUString; + namespace framework { @@ -71,74 +79,162 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues return m_xLanguageGuesser; } -::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL - ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory - ,::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xUICommandLabels - ,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame - ,::rtl::OUString& _rModuleIdentifier - ,sal_Bool& _rIni - ,const sal_Char* _pName) -{ - ::rtl::OUString aLabel; - - // Retrieve popup menu labels - if ( !_xUICommandLabels.is() ) - { - try - { - if ( !_rIni ) - { - _rIni = sal_True; - Reference< XModuleManager > xModuleManager( _xServiceFactory->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW ); - - try - { - _rModuleIdentifier = xModuleManager->identify( _xFrame ); - } - catch( Exception& ) - { - } - } - - Reference< XNameAccess > xNameAccess( _xServiceFactory->createInstance( SERVICENAME_UICOMMANDDESCRIPTION ), UNO_QUERY ); - if ( xNameAccess.is() ) - { - xNameAccess->getByName( _rModuleIdentifier ) >>= _xUICommandLabels; - } - } - catch ( Exception& ) - { - } - } - - if ( _xUICommandLabels.is() ) - { - try - { - if ( aCmdURL.getLength() > 0 ) - { - rtl::OUString aStr; - Sequence< PropertyValue > aPropSeq; - if ( _xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq ) - { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) - { - if ( aPropSeq[i].Name.equalsAscii( _pName/*"Label"*/ )) - { - aPropSeq[i].Value >>= aStr; - break; - } - } - } - aLabel = aStr; - } - } - catch ( com::sun::star::uno::Exception& ) - { - } - } - - return aLabel; +//////////////////////////////////////////////////////////// + +::rtl::OUString RetrieveLabelFromCommand( + const ::rtl::OUString& aCmdURL, + const uno::Reference< lang::XMultiServiceFactory >& _xServiceFactory, + uno::Reference< container::XNameAccess >& _xUICommandLabels, + const uno::Reference< frame::XFrame >& _xFrame, + ::rtl::OUString& _rModuleIdentifier, + sal_Bool& _rIni, + const sal_Char* _pName) +{ + ::rtl::OUString aLabel; + + // Retrieve popup menu labels + if ( !_xUICommandLabels.is() ) + { + try + { + if ( !_rIni ) + { + _rIni = sal_True; + Reference< XModuleManager > xModuleManager( _xServiceFactory->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW ); + + try + { + _rModuleIdentifier = xModuleManager->identify( _xFrame ); + } + catch( Exception& ) + { + } + } + + Reference< XNameAccess > xNameAccess( _xServiceFactory->createInstance( SERVICENAME_UICOMMANDDESCRIPTION ), UNO_QUERY ); + if ( xNameAccess.is() ) + { + xNameAccess->getByName( _rModuleIdentifier ) >>= _xUICommandLabels; + } + } + catch ( Exception& ) + { + } + } + + if ( _xUICommandLabels.is() ) + { + try + { + if ( aCmdURL.getLength() > 0 ) + { + rtl::OUString aStr; + Sequence< PropertyValue > aPropSeq; + if ( _xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq ) + { + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if ( aPropSeq[i].Name.equalsAscii( _pName/*"Label"*/ )) + { + aPropSeq[i].Value >>= aStr; + break; + } + } + } + aLabel = aStr; + } + } + catch ( com::sun::star::uno::Exception& ) + { + } + } + + return aLabel; +} + +//////////////////////////////////////////////////////////// + +void FillLangItems( std::set< OUString > &rLangItems, + const SvtLanguageTable & rLanguageTable, + const uno::Reference< frame::XFrame > & rxFrame, + const LanguageGuessingHelper & rLangGuessHelper, + sal_Int16 nScriptType, + const OUString & rCurLang, + const OUString & rKeyboardLang, + const OUString & rGuessedTextLang ) +{ + rLangItems.clear(); + + //1--add current language + if( rCurLang != OUString() && + LANGUAGE_DONTKNOW != rLanguageTable.GetType( rCurLang )) + rLangItems.insert( rCurLang ); + + //2--System + const AllSettings& rAllSettings = Application::GetSettings(); + LanguageType rSystemLanguage = rAllSettings.GetLanguage(); + if( rSystemLanguage != LANGUAGE_DONTKNOW ) + { + if ( IsScriptTypeMatchingToLanguage( nScriptType, rSystemLanguage )) + rLangItems.insert( OUString( rLanguageTable.GetString( rSystemLanguage )) ); + } + + //3--UI + LanguageType rUILanguage = rAllSettings.GetUILanguage(); + if( rUILanguage != LANGUAGE_DONTKNOW ) + { + if ( IsScriptTypeMatchingToLanguage( nScriptType, rUILanguage )) + rLangItems.insert( OUString( rLanguageTable.GetString( rUILanguage )) ); + } + + //4--guessed language + uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( rLangGuessHelper.GetGuesser() ); + if ( xLangGuesser.is() && rGuessedTextLang.getLength() > 0) + { + ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( rGuessedTextLang, 0, rGuessedTextLang.getLength()) ); + LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale ); + if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM + && IsScriptTypeMatchingToLanguage( nScriptType, nLang )) + rLangItems.insert( rLanguageTable.GetString( nLang )); + } + + //5--keyboard language + if( rKeyboardLang != OUString()) + { + if ( IsScriptTypeMatchingToLanguage( nScriptType, rLanguageTable.GetType( rKeyboardLang ))) + rLangItems.insert( rKeyboardLang ); + } + + //6--all languages used in current document + Reference< com::sun::star::frame::XModel > xModel; + if ( rxFrame.is() ) + { + Reference< com::sun::star::frame::XController > xController( rxFrame->getController(), UNO_QUERY ); + if ( xController.is() ) + xModel = xController->getModel(); + } + Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, UNO_QUERY ); + /*the description of nScriptType + LATIN : 0x001 + ASIAN : 0x002 + COMPLEX: 0x004 + */ + const sal_Int16 nMaxCount = 7; + if ( xDocumentLanguages.is() ) + { + Sequence< Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount )); + if ( rLocales.getLength() > 0 ) + { + for ( USHORT i = 0; i < rLocales.getLength(); ++i ) + { + if ( rLangItems.size() == static_cast< size_t >(nMaxCount) ) + break; + const Locale& rLocale=rLocales[i]; + if( IsScriptTypeMatchingToLanguage( nScriptType, rLanguageTable.GetType( rLocale.Language ))) + rLangItems.insert( OUString( rLocale.Language ) ); + } + } + } } } // namespace framework diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 555682677e33..8d5e5b6ddfce 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -30,6 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" + #include //_________________________________________________________________________________________________________________ @@ -66,7 +67,7 @@ #include #include #include -#include + #include #include #include @@ -80,6 +81,9 @@ #include "helper/mischelper.hxx" +#include +#include + //_________________________________________________________________________________________________________________ // Defines //_________________________________________________________________________________________________________________ @@ -91,6 +95,7 @@ using namespace com::sun::star::frame; using namespace com::sun::star::beans; using namespace com::sun::star::util; +using ::rtl::OUString; namespace framework { @@ -105,8 +110,8 @@ DEFINE_INIT_SERVICE ( LanguageSelectionMenuController, {} LanguageSelectionMenuController::LanguageSelectionMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : PopupMenuControllerBase( xServiceManager ), - m_bShowMenu( sal_True ) - ,m_aLangGuessHelper(xServiceManager) + m_bShowMenu( sal_True ), + m_aLangGuessHelper(xServiceManager) { } @@ -139,25 +144,21 @@ void SAL_CALL LanguageSelectionMenuController::statusChanged( const FeatureState return; m_bShowMenu = sal_True; - m_nScriptType=7;//set the default value + m_nScriptType = LS_SCRIPT_LATIN | LS_SCRIPT_ASIAN | LS_SCRIPT_COMPLEX; //set the default value - rtl::OUString aStrValue; - Sequence< ::rtl::OUString > aSeq; + OUString aStrValue; + Sequence< OUString > aSeq; - if ( Event.State >>= aStrValue ) - { - m_aCurrentLanguage=aStrValue; - } - else if ( Event.State >>= aSeq ) + if ( Event.State >>= aSeq ) { if ( aSeq.getLength() == 4 ) { // Retrieve all other values from the sequence and // store it members! - m_aCurLang=aSeq[0]; - m_nScriptType= static_cast< sal_Int16 >(aSeq[1].toInt32()); - m_aKeyboardLang=aSeq[2]; - m_aGuessedText=aSeq[3]; + m_aCurLang = aSeq[0]; + m_nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32()); + m_aKeyboardLang = aSeq[2]; + m_aGuessedTextLang = aSeq[3]; } } else if ( !Event.State.hasValue() ) @@ -188,14 +189,14 @@ void LanguageSelectionMenuController::impl_select(const Reference< XDispatch >& { Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); if ( xDispatchProvider.is() ) - xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); } if ( xDispatch.is() ) { Sequence aArgs; if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# - UiEventLogHelper(::rtl::OUString::createFromAscii("LanguageSelectionMenuController")).log(m_xServiceManager, m_xFrame, aTargetURL, aArgs); + UiEventLogHelper( OUString::createFromAscii("LanguageSelectionMenuController")).log( m_xServiceManager, m_xFrame, aTargetURL, aArgs ); xDispatch->dispatch( aTargetURL, aArgs ); } } @@ -210,22 +211,22 @@ void LanguageSelectionMenuController::impl_setPopupMenu() // Register for language updates aTargetURL.Complete = m_aLangStatusCommandURL; m_xURLTransformer->parseStrict( aTargetURL ); - m_xLanguageDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + m_xLanguageDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); // Register for setting languages and opening language dialog aTargetURL.Complete = m_aMenuCommandURL_Lang; m_xURLTransformer->parseStrict( aTargetURL ); - m_xMenuDispatch_Lang = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + m_xMenuDispatch_Lang = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); // Register for opening character dialog aTargetURL.Complete = m_aMenuCommandURL_Font; m_xURLTransformer->parseStrict( aTargetURL ); - m_xMenuDispatch_Font = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + m_xMenuDispatch_Font = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); // Register for opening character dialog with preselected paragraph aTargetURL.Complete = m_aMenuCommandURL_CharDlgForParagraph; m_xURLTransformer->parseStrict( aTargetURL ); - m_xMenuDispatch_CharDlgForParagraph = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + m_xMenuDispatch_CharDlgForParagraph = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); } void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopupMenu , const Mode eMode ) @@ -247,137 +248,77 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup String aCmd_Language; if( eMode == MODE_SetLanguageSelectionMenu ) { - aCmd_Dialog+=String::CreateFromAscii(".uno:FontDialog?Language:string=*"); - aCmd_Language+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Current_"); + aCmd_Dialog.AppendAscii(".uno:FontDialog?Language:string=*"); + aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Current_"); } else if ( eMode == MODE_SetLanguageParagraphMenu ) { - aCmd_Dialog+=String::CreateFromAscii(".uno:FontDialogForParagraph"); - aCmd_Language+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Paragraph_"); + aCmd_Dialog.AppendAscii(".uno:FontDialogForParagraph"); + aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Paragraph_"); } else if ( eMode == MODE_SetLanguageAllTextMenu ) { - aCmd_Dialog+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=*"); - aCmd_Language+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Default_"); + aCmd_Dialog.AppendAscii(".uno:LanguageStatus?Language:string=*"); + aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Default_"); } - //Reference< awt::XMenuExtended > m_xMenuExtended( m_xPopupMenu, UNO_QUERY ); - std::map< ::rtl::OUString, ::rtl::OUString > LangItems; - - SvtLanguageTable aLanguageTable; - USHORT nItemId = 1; - - //1--add current language - if(m_aCurLang.getLength()) + SvtLanguageTable aLanguageTable; + + // get languages to be displayed in the menu + std::set< OUString > aLangItems; + FillLangItems( aLangItems, aLanguageTable, m_xFrame, m_aLangGuessHelper, + m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedTextLang ); + + // + // now add menu entries + // the different menues purpose will be handled by the different string + // for aCmd_Dialog and aCmd_Language + // + + sal_Int16 nItemId = 1; // in this control the item id is not important for executing the command + const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection + const OUString sEmpty; // 'no language found' from language guessing + std::map< sal_Int16, OUString > aLangMap; + std::set< OUString >::const_iterator it; + for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { - LangItems[m_aCurLang]=m_aCurLang; - } - - SvtLanguageTable aLangTable; - //2--System - const AllSettings& rAllSettings=Application::GetSettings(); - LanguageType rSystemLanguage = rAllSettings.GetLanguage(); - if(rSystemLanguage!=LANGUAGE_DONTKNOW) - { - if (IsScriptTypeMatchingToLanguage(m_nScriptType,rSystemLanguage )) - LangItems[::rtl::OUString(aLangTable.GetString(rSystemLanguage))]=::rtl::OUString(aLangTable.GetString(rSystemLanguage)); - } - - //3--UI - LanguageType rUILanguage = rAllSettings.GetUILanguage(); - if(rUILanguage!=LANGUAGE_DONTKNOW) - { - if (IsScriptTypeMatchingToLanguage(m_nScriptType, rUILanguage )) - LangItems[::rtl::OUString(aLangTable.GetString(rUILanguage))]=::rtl::OUString(aLangTable.GetString(rUILanguage)); - } - - //4--guessed language - uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( m_aLangGuessHelper.GetGuesser() ); - if (xLangGuesser.is() && m_aGuessedText.getLength() > 0) - { - ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( m_aGuessedText, 0, m_aGuessedText.getLength()) ); - LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale ); - if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM - && IsScriptTypeMatchingToLanguage( m_nScriptType, nLang )) - LangItems[aLangTable.GetString(nLang)]=aLangTable.GetString(nLang); - } - - //5--keyboard language - if(m_aKeyboardLang!=::rtl::OUString::createFromAscii("")) - { - if (IsScriptTypeMatchingToLanguage(m_nScriptType, aLanguageTable.GetType(m_aKeyboardLang))) - LangItems[m_aKeyboardLang] = m_aKeyboardLang; - } - - //6--all languages used in current document - Reference< com::sun::star::frame::XModel > xModel; - if ( m_xFrame.is() ) - { - Reference< com::sun::star::frame::XController > xController( m_xFrame->getController(), UNO_QUERY ); - if ( xController.is() ) - xModel = xController->getModel(); - } - Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, UNO_QUERY ); - /*the description of m_nScriptType - LATIN : 1 - ASIAN : 2 - COMPLEX:4 - LATIN + ASIAN : 3 - LATIN + COMPLEX : 5 - ASIAN + COMPLEX : 6 - LATIN + ASIAN + COMPLEX : 7 - */ - - sal_Int16 nCount=7; - if(xDocumentLanguages.is()) - { - Sequence< Locale > rLocales(xDocumentLanguages->getDocumentLanguages(m_nScriptType,nCount)); - if(rLocales.getLength()>0) - { - for(USHORT i = 0; i LangTable; - - const ::rtl::OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); - for(std::map< ::rtl::OUString, ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it) - { - if(it->first != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&& - it->first != sAsterix && - it->first.getLength()) + const OUString & rStr( *it ); + if (rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&& + rStr != sAsterix && + rStr != sEmpty) { - ++nItemId; - pPopupMenu->InsertItem( nItemId,it->first); - LangTable[nItemId] = it->first; - if(it->first == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) + pPopupMenu->InsertItem( nItemId, rStr ); + aCmd = aCmd_Language; + aCmd += String( rStr ); + pPopupMenu->SetItemCommand( nItemId, aCmd ); + if (rStr == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) { //make a sign for the current language - pPopupMenu->CheckItem(nItemId,TRUE); + pPopupMenu->CheckItem( nItemId, TRUE ); } - aCmd=aCmd_Language; - aCmd+=(String)it->first; - pPopupMenu->SetItemCommand(nItemId,aCmd); + aLangMap[ nItemId ] = rStr; + ++nItemId; } } - //7--none - nItemId++; + // entry for LANGUAGE_NONE + ++nItemId; pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )) ); aCmd=aCmd_Language; - aCmd+=String::CreateFromAscii("LANGUAGE_NONE"); - pPopupMenu->SetItemCommand(nItemId,aCmd); + aCmd.AppendAscii("LANGUAGE_NONE"); + pPopupMenu->SetItemCommand( nItemId, aCmd ); + + // entry for 'Reset to default language' + ++nItemId; + pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_RESET_TO_DEFAULT_LANGUAGE )) ); + aCmd=aCmd_Language; + aCmd.AppendAscii("RESET_LANGUAGES"); + pPopupMenu->SetItemCommand( nItemId, aCmd ); - //More... - nItemId++; + // entry for opening the Format/Character dialog + ++nItemId; pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_MORE ))); - pPopupMenu->SetItemCommand(nItemId,aCmd_Dialog); + pPopupMenu->SetItemCommand( nItemId, aCmd_Dialog ); } @@ -427,10 +368,10 @@ void SAL_CALL LanguageSelectionMenuController::initialize( const Sequence< Any > if ( m_bInitialized ) { - m_aLangStatusCommandURL = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LanguageStatus" )); + m_aLangStatusCommandURL = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LanguageStatus" )); m_aMenuCommandURL_Lang = m_aLangStatusCommandURL; - m_aMenuCommandURL_Font = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialog" )); - m_aMenuCommandURL_CharDlgForParagraph = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialogForParagraph" )); + m_aMenuCommandURL_Font = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialog" )); + m_aMenuCommandURL_CharDlgForParagraph = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialogForParagraph" )); } } } diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index bccd553b57d3..3edc7466942a 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -30,6 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" + #include #include #include @@ -56,8 +57,6 @@ #include #include -#include -#include #include #ifndef __FRAMEWORK_CLASSES_RESOURCE_HRC_ #include @@ -77,6 +76,9 @@ #include "helper/mischelper.hxx" +#include +#include + using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -85,9 +87,14 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::document; +using ::rtl::OUString; + + namespace framework { +//////////////////////////////////////////////////////////// + DEFINE_XSERVICEINFO_MULTISERVICE ( LangSelectionStatusbarController , OWeakObject , SERVICENAME_STATUSBARCONTROLLER , @@ -97,10 +104,10 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( LangSelectionStatusbarController DEFINE_INIT_SERVICE ( LangSelectionStatusbarController, {} ) LangSelectionStatusbarController::LangSelectionStatusbarController( const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) : - svt::StatusbarController( xServiceManager, uno::Reference< frame::XFrame >(), rtl::OUString(), 0 ), + svt::StatusbarController( xServiceManager, uno::Reference< frame::XFrame >(), OUString(), 0 ), m_bShowMenu( sal_True ), - m_nScriptType( 7 ) - ,m_aLangGuessHelper(xServiceManager) + m_nScriptType( LS_SCRIPT_LATIN | LS_SCRIPT_ASIAN | LS_SCRIPT_COMPLEX ), + m_aLangGuessHelper( xServiceManager ) { } @@ -181,216 +188,157 @@ throw (::com::sun::star::uno::RuntimeException) return sal_False; } -void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::RuntimeException) +void LangSelectionStatusbarController::LangMenu() +throw (::com::sun::star::uno::RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "LangSelectionStatusbarController::LangMenu" ); if (!m_bShowMenu) return; //add context menu - const static ::rtl::OUString s_sPopupMenu(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.PopupMenu")); + const static OUString s_sPopupMenu(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.PopupMenu")); Reference< awt::XPopupMenu > xPopupMenu( m_xServiceManager->createInstance( s_sPopupMenu ), UNO_QUERY ); //sub menu that contains all items except the last two items: Separator + Set Language for Paragraph Reference< awt::XPopupMenu > subPopupMenu(m_xServiceManager->createInstance( s_sPopupMenu ), UNO_QUERY ); - std::set< ::rtl::OUString > LangItems; - - SvtLanguageTable aLanguageTable; - USHORT nItemId=1; - - //1--add current language - if( m_aCurLang != ::rtl::OUString( ) && - LANGUAGE_DONTKNOW != aLanguageTable.GetType( m_aCurLang )) - LangItems.insert( m_aCurLang ); - - //2--System - SvtLanguageTable aLangTable; - const AllSettings& rAllSettings = Application::GetSettings(); - LanguageType rSystemLanguage = rAllSettings.GetLanguage(); - if( rSystemLanguage != LANGUAGE_DONTKNOW ) - { - if ( IsScriptTypeMatchingToLanguage( m_nScriptType, rSystemLanguage )) - LangItems.insert( ::rtl::OUString( aLangTable.GetString( rSystemLanguage )) ); - } - - //3--UI - LanguageType rUILanguage = rAllSettings.GetUILanguage(); - if( rUILanguage != LANGUAGE_DONTKNOW ) - { - if ( IsScriptTypeMatchingToLanguage( m_nScriptType, rUILanguage )) - LangItems.insert( ::rtl::OUString( aLangTable.GetString( rUILanguage )) ); - } - - //4--guessed language - uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( m_aLangGuessHelper.GetGuesser() ); - if ( xLangGuesser.is() && m_aGuessedText.getLength() > 0) - { - ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( m_aGuessedText, 0, m_aGuessedText.getLength()) ); - LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale ); - if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM - && IsScriptTypeMatchingToLanguage( m_nScriptType, nLang )) - LangItems.insert( aLangTable.GetString( nLang )); - } - - //5--keyboard language - if( m_aKeyboardLang != ::rtl::OUString::createFromAscii( "" )) + SvtLanguageTable aLanguageTable; + + // get languages to be displayed in the menu + std::set< OUString > aLangItems; + FillLangItems( aLangItems, aLanguageTable, m_xFrame, m_aLangGuessHelper, + m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedTextLang ); + + // + // add first few entries to main menu + // + sal_Int16 nItemId = static_cast< sal_Int16 >(MID_LANG_SEL_1); + const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection + const OUString sEmpty; // 'no language found' from language guessing + std::map< sal_Int16, OUString > aLangMap; + std::set< OUString >::const_iterator it; + for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { - if ( IsScriptTypeMatchingToLanguage( m_nScriptType, aLanguageTable.GetType( m_aKeyboardLang ))) - LangItems.insert( m_aKeyboardLang ); - } - - //6--all languages used in current document - Reference< com::sun::star::frame::XModel > xModel; - if ( m_xFrame.is() ) - { - Reference< com::sun::star::frame::XController > xController( m_xFrame->getController(), UNO_QUERY ); - if ( xController.is() ) - xModel = xController->getModel(); - } - Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, UNO_QUERY ); - /*the description of m_nScriptType - LATIN : 1 - ASIAN : 2 - COMPLEX:4 - LATIN + ASIAN : 3 - LATIN + COMPLEX : 5 - ASIAN + COMPLEX : 6 - LATIN + ASIAN + COMPLEX : 7 - */ - - sal_Int16 nCount=7; - if ( xDocumentLanguages.is() ) - { - Sequence< Locale > rLocales( xDocumentLanguages->getDocumentLanguages( m_nScriptType, nCount )); - if ( rLocales.getLength() > 0 ) - { - for ( USHORT i = 0; i LangTable; - - for( std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it ) - { - if ( *it != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&& - *it != ::rtl::OUString::createFromAscii( "*" ) && - *it != ::rtl::OUString::createFromAscii( "" )) + const OUString & rStr( *it ); + if ( rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) ) && + rStr != sAsterix && + rStr != sEmpty) { - //nItemId = xPopupMenu->getItemCount()+1; - nItemId++; - xPopupMenu->insertItem( nItemId, *it, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); - LangTable[nItemId]=*it; - if( *it == m_aCurLang ) + DBG_ASSERT( MID_LANG_SEL_1 <= nItemId && nItemId <= MID_LANG_SEL_9, + "nItemId outside of expected range!" ); + xPopupMenu->insertItem( nItemId, rStr, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + if ( rStr == m_aCurLang ) { //make a sign for the current language xPopupMenu->checkItem( nItemId, TRUE ); } + aLangMap[ nItemId ] = rStr; + ++nItemId; } } - - //7--none - nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); - //More... - nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); - - for( ::std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it ) + xPopupMenu->insertItem( MID_LANG_SEL_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_NONE ); + xPopupMenu->insertItem( MID_LANG_SEL_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_RESET ); + xPopupMenu->insertItem( MID_LANG_SEL_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_MORE ); + + // + // add entries to submenu ('set language for paragraph') + // + nItemId = static_cast< sal_Int16 >(MID_LANG_PARA_1); + for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { - if( *it != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&& - *it != ::rtl::OUString::createFromAscii( "*" ) && - *it != ::rtl::OUString::createFromAscii( "" )) + const OUString & rStr( *it ); + if( rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&& + rStr != OUString::createFromAscii( "*" ) && + rStr != OUString::createFromAscii( "" )) { - nItemId++; - subPopupMenu->insertItem( nItemId, *it, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); - LangTable[nItemId]=*it; + DBG_ASSERT( MID_LANG_PARA_1 <= nItemId && nItemId <= MID_LANG_PARA_9, + "nItemId outside of expected range!" ); + subPopupMenu->insertItem( nItemId, rStr, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + aLangMap[nItemId] = rStr; + ++nItemId; } } - //7--none - nItemId++; - subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); - //More - nItemId++; - subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + subPopupMenu->insertItem( MID_LANG_PARA_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_NONE ); + subPopupMenu->insertItem( MID_LANG_PARA_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_RESET ); + subPopupMenu->insertItem( MID_LANG_PARA_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_MORE ); - nItemId++; - xPopupMenu->insertSeparator(nItemId); + // + // add last two entries to main menu + // + xPopupMenu->insertSeparator( MID_LANG_PARA_SEPERATOR ); + xPopupMenu->insertItem( MID_LANG_PARA_STRING, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_STRING ); + xPopupMenu->setPopupMenu( MID_LANG_PARA_STRING, subPopupMenu ); - nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); - xPopupMenu->setPopupMenu( nItemId, subPopupMenu ); - //display the popup menu and execute every command + // + // now display the popup menu and execute every command ... + // Reference< awt::XWindowPeer > xParent( m_xParentWindow, UNO_QUERY ); - com::sun::star::awt::Rectangle mRectangle; + com::sun::star::awt::Rectangle aRectangle; Window* pWindow = VCLUnoHelper::GetWindow( m_xParentWindow ); - const Point mMousePos = pWindow->GetPointerPosPixel(); - mRectangle.X = mMousePos.X(); - mRectangle.Y = mMousePos.Y(); - sal_Int16 nId = xPopupMenu->execute( xParent, mRectangle, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16 ); - //click "More..." + const Point aMousePos = pWindow->GetPointerPosPixel(); + aRectangle.X = aMousePos.X(); + aRectangle.Y = aMousePos.Y(); + sal_Int16 nId = xPopupMenu->execute( xParent, aRectangle, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16 ); if ( m_xFrame.is() ) { uno::Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); util::URL aURL; - if ( nId < nItemId-3-subPopupMenu->getItemCount() ) + if (MID_LANG_SEL_1 <= nId && nId <= MID_LANG_SEL_9) { - //1..7 //set selected language as current language for selection - String SelectedLang = LangTable[nId]; - aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Current_"); - aURL.Complete+=SelectedLang; + String aSelectedLang = aLangMap[nId]; + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Current_"); + aURL.Complete += aSelectedLang; } - else if ( nId == nItemId-3-subPopupMenu->getItemCount() ) + else if (nId == MID_LANG_SEL_NONE) { - //8 //set None as current language for selection - aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE"); + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE"); + } + else if (nId == MID_LANG_SEL_RESET) + { + // reset language attributes for selection + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Current_RESET_LANGUAGES"); } - else if ( nId == nItemId-2-subPopupMenu->getItemCount() ) + else if (nId == MID_LANG_SEL_MORE) { - //9 (more)... //open the dialog "format/character" for current selection - aURL.Complete+=String::CreateFromAscii(".uno:FontDialog?Language:string=*"); + aURL.Complete += OUString::createFromAscii(".uno:FontDialog?Language:string=*"); } - else if ( nId < nItemId-3 && nId>nItemId-2-subPopupMenu->getItemCount() ) + else if (MID_LANG_PARA_1 <= nId && nId <= MID_LANG_PARA_9) { - //1..7 para //set selected language for current paragraph - String SelectedLang = LangTable[nId]; - aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Paragraph_"); - aURL.Complete+=SelectedLang; + String aSelectedLang = aLangMap[nId]; + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Paragraph_"); + aURL.Complete += aSelectedLang; } - else if ( nId==nItemId-3 ) + else if (nId == MID_LANG_PARA_NONE) { - //8 para //set None as language for current paragraph - aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE"); + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE"); } - else if ( nId==nItemId-2 ) + else if (nId == MID_LANG_PARA_RESET) + { + // reset language attributes for paragraph + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES"); + } + else if (nId == MID_LANG_PARA_MORE) { - //9 (more) para... //open the dialog "format/character" for current paragraph - aURL.Complete+=String::CreateFromAscii(".uno:FontDialogForParagraph"); + aURL.Complete += OUString::createFromAscii(".uno:FontDialogForParagraph"); } - uno::Reference< util::XURLTransformer > xURLTransformer( m_xServiceManager->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY ); + uno::Reference< util::XURLTransformer > xURLTransformer( m_xServiceManager->createInstance( OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY ); xURLTransformer->parseStrict( aURL ); - uno::Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL,::rtl::OUString(),0); + uno::Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL, OUString(), 0); if( xDispatch.is() ) { uno::Sequence< beans::PropertyValue > aPV; if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# - UiEventLogHelper(::rtl::OUString::createFromAscii("ButtonToolbarController")).log(m_xServiceManager, m_xFrame, aURL, aPV); + UiEventLogHelper( OUString::createFromAscii("ButtonToolbarController")).log(m_xServiceManager, m_xFrame, aURL, aPV); xDispatch->dispatch( aURL, aPV); } } @@ -439,6 +387,13 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL LangSelectionStatusbarController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException ) { + // This function will be called when observed data changes, + // for example the selection or keyboard language. + // - It displays the language in use in the status bar + // - and it stores the relevant data for creating the menu + // at some later point in the member variables + // m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedText + RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "LangSelectionStatusbarController::statusChanged" ); vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); @@ -447,25 +402,22 @@ throw ( RuntimeException ) m_bShowMenu = sal_True; - m_nScriptType=7;//set the default value + m_nScriptType = LS_SCRIPT_LATIN | LS_SCRIPT_ASIAN | LS_SCRIPT_COMPLEX; //set the default value Window* pWindow = VCLUnoHelper::GetWindow( m_xParentWindow ); if ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR && m_nID != 0 ) { - rtl::OUString aStrValue; - Sequence< ::rtl::OUString > aSeq; + OUString aStrValue; + Sequence< OUString > aSeq; StatusBar* pStatusBar = (StatusBar *)pWindow; if ( Event.State >>= aStrValue ) - { pStatusBar->SetItemText( m_nID, aStrValue ); - m_aCurrentLanguage = aStrValue; - } else if ( Event.State >>= aSeq ) { if ( aSeq.getLength() == 4 ) { const String aMultipleLangText( FwkResId( STR_LANGSTATUS_MULTIPLE_LANGUAGES ) ); - ::rtl::OUString aStatusText = aSeq[0]; + OUString aStatusText = aSeq[0]; if ( 0 == aStatusText.compareToAscii( "*" )) aStatusText = aMultipleLangText; pStatusBar->SetItemText( m_nID, aStatusText ); @@ -475,7 +427,7 @@ throw ( RuntimeException ) m_aCurLang = aSeq[0]; m_nScriptType = static_cast< sal_Int16 >( aSeq[1].toInt32() ); m_aKeyboardLang = aSeq[2]; - m_aGuessedText = aSeq[3]; + m_aGuessedTextLang = aSeq[3]; } } else if ( !Event.State.hasValue() ) diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index 60a44dba706f..a508f5d29a92 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -119,6 +119,8 @@ SHL1STDLIBS= \ $(UNOTOOLSLIB) \ $(CPPUHELPERLIB) \ $(TOOLSLIB) \ + $(SVTOOLLIB) \ + $(I18NISOLANGLIB) \ $(VOSLIB) \ $(VCLLIB) \ $(TKLIB) \ @@ -210,7 +212,6 @@ SHL3STDLIBS= \ $(SVTOOLLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(COMPHELPERLIB) \ -- cgit v1.2.3 From 4d8fe0ad149fe01976f2a23d598cfaf5eafbcc82 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 19 Oct 2009 08:12:25 +0000 Subject: #106019# 'reset languages' menu entry --- sw/sdi/swslots.src | 1462 +----------------------------------- sw/source/ui/inc/langhelper.hxx | 22 +- sw/source/ui/inc/olmenu.hxx | 11 +- sw/source/ui/lingu/olmenu.cxx | 734 ++++++++---------- sw/source/ui/lingu/olmenu.hrc | 82 +- sw/source/ui/lingu/olmenu.src | 17 +- sw/source/ui/shells/langhelper.cxx | 256 ++++--- sw/source/ui/shells/textsh1.cxx | 9 +- 8 files changed, 574 insertions(+), 2019 deletions(-) diff --git a/sw/sdi/swslots.src b/sw/sdi/swslots.src index d62d1da6b35b..f094994b2c2a 100644 --- a/sw/sdi/swslots.src +++ b/sw/sdi/swslots.src @@ -30,1466 +30,6 @@ #include "cmdid.h" #include "svx/svxids.hrc" #include "globals.hrc" -SfxSlotInfo FN_ABSTRACT_NEWDOC -{ - Slotname [ en-US ] = "Document From Abstract"; -}; -SfxSlotInfo FN_ABSTRACT_STARIMPRESS -{ - Slotname [ en-US ] = "Presentation from Abstract"; -}; -SfxSlotInfo FN_ADD_UNKNOWN -{ - Slotname [ en-US ] = "Add Unknown Words"; -}; -SfxSlotInfo FN_AUTO_CORRECT -{ - Slotname [ en-US ] = "AutoCorrect"; -}; -SfxSlotInfo FN_AUTOFORMAT_APPLY -{ - Slotname [ en-US ] = "Apply AutoFormat Options"; -}; -SfxSlotInfo FN_AUTOFORMAT_AUTO -{ - Slotname [ en-US ] = "AutoFormat While Typing"; -}; -SfxSlotInfo FN_AUTOFORMAT_REDLINE_APPLY -{ - Slotname [ en-US ] = "Apply AutoFormat Options and confirm Changes"; -}; -SfxSlotInfo FN_BACKSPACE -{ - Slotname [ en-US ] = "Backspace"; -}; -SfxSlotInfo FN_CALC_TABLE -{ - Slotname [ en-US ] = "Calculate Table"; -}; -SfxSlotInfo FN_CALCULATE -{ - Slotname [ en-US ] = "Calculate Selection"; -}; -SfxSlotInfo FN_CHANGE_DBFIELD -{ - Slotname [ en-US ] = "Change Database"; -}; -SfxSlotInfo FN_CHANGE_PAGENUM -{ - Slotname [ en-US ] = "Page Number"; -}; -SfxSlotInfo FN_CHAR_LEFT -{ - Slotname [ en-US ] = "To Character Left"; -}; -SfxSlotInfo FN_CHAR_LEFT_SEL -{ - Slotname [ en-US ] = "Select Character Left"; -}; -SfxSlotInfo FN_CHAR_RIGHT -{ - Slotname [ en-US ] = "Go Right"; -}; -SfxSlotInfo FN_CHAR_RIGHT_SEL -{ - Slotname [ en-US ] = "Select Character Right"; -}; -SfxSlotInfo FN_CNTNT_TO_NEXT_FRAME -{ - Slotname [ en-US ] = "To Next Frame"; -}; -SfxSlotInfo FN_CONVERT_TEXT_TABLE -{ - Slotname [ en-US ] = "Convert Table/Text"; -}; -SfxSlotInfo FN_DEC_INDENT_OFFSET -{ - Slotname [ en-US ] = "Decrement Indent Value"; -}; -SfxSlotInfo FN_DELETE_BACK_LINE -{ - Slotname [ en-US ] = "Delete to Start of Line"; -}; -SfxSlotInfo FN_DELETE_BACK_PARA -{ - Slotname [ en-US ] = "Delete to Start of Paragraph"; -}; -SfxSlotInfo FN_DELETE_BACK_SENT -{ - Slotname [ en-US ] = "Delete to Start of Sentence"; -}; -SfxSlotInfo FN_DELETE_BACK_WORD -{ - Slotname [ en-US ] = "Delete to Start of Word"; -}; -SfxSlotInfo FN_DELETE_LINE -{ - Slotname [ en-US ] = "Delete to End of Line"; -}; -SfxSlotInfo FN_DELETE_PARA -{ - Slotname [ en-US ] = "Delete to End of Paragraph"; -}; -SfxSlotInfo FN_DELETE_SENT -{ - Slotname [ en-US ] = "Delete to End of Sentence"; -}; -SfxSlotInfo FN_DELETE_WHOLE_LINE -{ - Slotname [ en-US ] = "Delete Row"; -}; -SfxSlotInfo FN_DELETE_WORD -{ - Slotname [ en-US ] = "Delete to End of Word"; -}; -SfxSlotInfo FN_DRAW_WRAP_DLG -{ - Slotname [ en-US ] = "Text Wrap"; -}; -SfxSlotInfo FN_DRAWTEXT_ATTR_DLG -{ - Slotname [ en-US ] = "Text Attributes"; -}; -SfxSlotInfo FN_EDIT_FIELD -{ - Slotname [ en-US ] = "Fields"; -}; -SfxSlotInfo FN_EDIT_FOOTNOTE -{ - Slotname [ en-US ] = "Footnote"; -}; -SfxSlotInfo FN_EDIT_FORMULA -{ - Slotname [ en-US ] = "Formula Bar"; -}; -SfxSlotInfo FN_EDIT_IDX_ENTRY_DLG -{ - Slotname [ en-US ] = "Index Entry"; -}; -SfxSlotInfo FN_EDIT_LINK_DLG -{ - Slotname [ en-US ] = "Links"; -}; -SfxSlotInfo FN_EDIT_REGION -{ - Slotname [ en-US ] = "Sections"; -}; -SfxSlotInfo FN_END_DOC_DIRECT -{ - Slotname [ en-US ] = "Directly to Document End"; -}; -SfxSlotInfo FN_END_OF_COLUMN -{ - Slotname [ en-US ] = "To Column End"; -}; -SfxSlotInfo FN_END_OF_DOCUMENT -{ - Slotname [ en-US ] = "To Document End"; -}; -SfxSlotInfo FN_END_OF_DOCUMENT_SEL -{ - Slotname [ en-US ] = "Select to Document End"; -}; -SfxSlotInfo FN_END_OF_LINE -{ - Slotname [ en-US ] = "To End of Line"; -}; -SfxSlotInfo FN_END_OF_LINE_SEL -{ - Slotname [ en-US ] = "Select to End of Line"; -}; -SfxSlotInfo FN_END_OF_NEXT_COLUMN -{ - Slotname [ en-US ] = "To End of Next Column"; -}; -SfxSlotInfo FN_END_OF_NEXT_PAGE -{ - Slotname [ en-US ] = "To End of Next Page"; -}; -SfxSlotInfo FN_END_OF_NEXT_PAGE_SEL -{ - Slotname [ en-US ] = "Select to End of Next Page"; -}; -SfxSlotInfo FN_END_OF_PAGE -{ - Slotname [ en-US ] = "To Page End"; -}; -SfxSlotInfo FN_END_OF_PAGE_SEL -{ - Slotname [ en-US ] = "Select to Page End"; -}; -SfxSlotInfo FN_END_OF_PARA -{ - Slotname [ en-US ] = "To Paragraph End"; -}; -SfxSlotInfo FN_END_OF_PARA_SEL -{ - Slotname [ en-US ] = "Select to Paragraph End"; -}; -SfxSlotInfo FN_END_OF_PREV_COLUMN -{ - Slotname [ en-US ] = "To Previous Column"; -}; -SfxSlotInfo FN_END_OF_PREV_PAGE -{ - Slotname [ en-US ] = "To End of Previous Page"; -}; -SfxSlotInfo FN_END_OF_PREV_PAGE_SEL -{ - Slotname [ en-US ] = "Select to End of Previous Page"; -}; -SfxSlotInfo FN_END_TABLE -{ - Slotname [ en-US ] = "To Table End"; -}; -SfxSlotInfo FN_ENVELOP -{ - Slotname [ en-US ] = "Insert Envelope"; -}; -SfxSlotInfo FN_ESCAPE -{ - Slotname [ en-US ] = "Cancel"; -}; -SfxSlotInfo FN_EXECUTE_MACROFIELD -{ - Slotname [ en-US ] = "Run Macro Field"; -}; -SfxSlotInfo FN_EXPAND_GLOSSARY -{ - Slotname [ en-US ] = "Run AutoText Entry"; -}; -SfxSlotInfo FN_FLIP_HORZ_GRAFIC -{ - Slotname [ en-US ] = "Flip Vertically"; -}; -SfxSlotInfo FN_FLIP_VERT_GRAFIC -{ - Slotname [ en-US ] = "Flip Horizontally"; -}; -SfxSlotInfo FN_FOOTNOTE_TO_ANCHOR -{ - Slotname [ en-US ] = "To Footnote Anchor"; -}; -SfxSlotInfo FN_FORMAT_BACKGROUND_DLG -{ - Slotname [ en-US ] = "Background"; -}; -SfxSlotInfo FN_FORMAT_BORDER_DLG -{ - Slotname [ en-US ] = "Borders"; -}; -SfxSlotInfo FN_FORMAT_DROPCAPS -{ - Slotname [ en-US ] = "Drop Caps"; -}; -SfxSlotInfo FN_FORMAT_FOOTNOTE_DLG -{ - Slotname [ en-US ] = "Footnotes"; -}; -SfxSlotInfo FN_FORMAT_FRAME_DLG -{ - Slotname [ en-US ] = "Frame Properties"; -}; -SfxSlotInfo FN_FORMAT_GRAFIC_DLG -{ - Slotname [ en-US ] = "Edit Graphics"; -}; -SfxSlotInfo FN_FORMAT_PAGE_COLUMN_DLG -{ - Slotname [ en-US ] = "Page Columns"; -}; -SfxSlotInfo FN_FORMAT_PAGE_DLG -{ - Slotname [ en-US ] = "Page Settings"; -}; -SfxSlotInfo FN_FORMAT_RESET -{ - Slotname [ en-US ] = "Reset Font Attributes"; -}; -SfxSlotInfo FN_FORMAT_TABLE_DLG -{ - Slotname [ en-US ] = "Edit Table"; -}; -SfxSlotInfo FN_FRAME_ALIGN_HORZ_CENTER -{ - Slotname [ en-US ] = "Center Horizontal"; -}; -SfxSlotInfo FN_FRAME_ALIGN_HORZ_LEFT -{ - Slotname [ en-US ] = "Align Left"; -}; -SfxSlotInfo FN_FRAME_ALIGN_HORZ_RIGHT -{ - Slotname [ en-US ] = "Align Right"; -}; -SfxSlotInfo FN_FRAME_ALIGN_VERT_BOTTOM -{ - Slotname [ en-US ] = "Align Bottom"; -}; -SfxSlotInfo FN_FRAME_ALIGN_VERT_CENTER -{ - Slotname [ en-US ] = "Align Vertical Center"; -}; -SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_BOTTOM -{ - Slotname [ en-US ] = "Align to Bottom of Character"; -}; -SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_CENTER -{ - Slotname [ en-US ] = "Align to Vertical Center of Character"; -}; -SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_TOP -{ - Slotname [ en-US ] = "Align to Top of Character"; -}; -SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_BOTTOM -{ - Slotname [ en-US ] = "Align to Bottom of Line"; -}; -SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_CENTER -{ - Slotname [ en-US ] = "Align to Vertical Center of Line"; -}; -SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_TOP -{ - Slotname [ en-US ] = "Align to Top of Line"; -}; -SfxSlotInfo FN_FRAME_ALIGN_VERT_TOP -{ - Slotname [ en-US ] = "Align Top"; -}; -SfxSlotInfo FN_FRAME_CHAIN -{ - Slotname [ en-US ] = "Link Frames"; -}; -SfxSlotInfo FN_FRAME_DOWN -{ - Slotname [ en-US ] = "Send Backward"; -}; -SfxSlotInfo FN_FRAME_MIRROR_ON_EVEN_PAGES -{ - Slotname [ en-US ] = "Mirror Object on Even Pages"; -}; -SfxSlotInfo FN_FRAME_NOWRAP -{ - Slotname [ en-US ] = "Wrap Off"; -}; -SfxSlotInfo FN_FRAME_TO_ANCHOR -{ - Slotname [ en-US ] = "Set Cursor To Anchor"; -}; -SfxSlotInfo FN_FRAME_UNCHAIN -{ - Slotname [ en-US ] = "Unlink Frames"; -}; -SfxSlotInfo FN_FRAME_UP -{ - Slotname [ en-US ] = "Bring Forward"; -}; -SfxSlotInfo FN_FRAME_WRAP -{ - Slotname [ en-US ] = "Wrap On"; -}; -SfxSlotInfo FN_FRAME_WRAP_CONTOUR -{ - Slotname [ en-US ] = "Wrap Contour On"; -}; -SfxSlotInfo FN_FRAME_WRAP_IDEAL -{ - Slotname [ en-US ] = "Wrap Optimal"; -}; -SfxSlotInfo FN_FRAME_WRAP_LEFT -{ - Slotname [ en-US ] = "Wrap Left"; -}; -SfxSlotInfo FN_FRAME_WRAP_RIGHT -{ - Slotname [ en-US ] = "Wrap Right"; -}; -SfxSlotInfo FN_FRAME_WRAPTHRU -{ - Slotname [ en-US ] = "Wrap Through"; -}; -SfxSlotInfo FN_FRAME_WRAPTHRU_TRANSP -{ - Slotname [ en-US ] = "Wrap Transparent"; -}; -SfxSlotInfo FN_GLOSSARY_DLG -{ - Slotname [ en-US ] = "Edit AutoText"; -}; -SfxSlotInfo FN_GOTO_NEXT_INPUTFLD -{ - Slotname [ en-US ] = "To Next Input Field"; -}; -SfxSlotInfo FN_GOTO_NEXT_MARK -{ - Slotname [ en-US ] = "To Next Placeholder"; -}; -SfxSlotInfo FN_GOTO_NEXT_OBJ -{ - Slotname [ en-US ] = "To Next Object"; -}; -SfxSlotInfo FN_GOTO_NEXT_REGION -{ - Slotname [ en-US ] = "To Next Section"; -}; -SfxSlotInfo FN_GOTO_PREV_INPUTFLD -{ - Slotname [ en-US ] = "To Previous Input Field"; -}; -SfxSlotInfo FN_GOTO_PREV_MARK -{ - Slotname [ en-US ] = "To Previous Placeholder"; -}; -SfxSlotInfo FN_GOTO_PREV_OBJ -{ - Slotname [ en-US ] = "To Previous Object"; -}; -SfxSlotInfo FN_GOTO_PREV_REGION -{ - Slotname [ en-US ] = "To Previous Section"; -}; -SfxSlotInfo FN_GOTO_REFERENCE -{ - Slotname [ en-US ] = "To Reference"; -}; -SfxSlotInfo FN_GRAPHIC_MIRROR_ON_EVEN_PAGES -{ - Slotname [ en-US ] = "Flip Graphics on Even Pages"; -}; -SfxSlotInfo FN_GROW_FONT_SIZE -{ - Slotname [ en-US ] = "Increase Font"; -}; -SfxSlotInfo FN_HSCROLLBAR -{ - Slotname [ en-US ] = "Scroll Horizontal"; -}; -SfxSlotInfo FN_HYPHENATE_OPT_DLG -{ - Slotname [ en-US ] = "Hyphenation"; -}; -SfxSlotInfo FN_IDX_MARK_TO_IDX -{ - Slotname [ en-US ] = "Index Mark to Index"; -}; -SfxSlotInfo FN_INC_INDENT_OFFSET -{ - Slotname [ en-US ] = "Increment Indent Value"; -}; -SfxSlotInfo FN_INSERT_BOOKMARK -{ - Slotname [ en-US ] = "Insert Bookmark"; -}; -SfxSlotInfo FN_INSERT_BREAK -{ - Slotname [ en-US ] = "Insert Paragraph"; -}; -SfxSlotInfo FN_INSERT_BREAK_DLG -{ - Slotname [ en-US ] = "Insert Manual Break"; -}; -SfxSlotInfo FN_INSERT_CAPTION -{ - Slotname [ en-US ] = "Insert Caption"; -}; -SfxSlotInfo FN_INSERT_COLUMN_BREAK -{ - Slotname [ en-US ] = "Insert Column Break"; -}; -SfxSlotInfo FN_INSERT_CTRL -{ - Slotname [ en-US ] = "Insert"; -}; -SfxSlotInfo FN_INSERT_ENDNOTE -{ - Slotname [ en-US ] = "Insert Endnote Directly"; -}; -SfxSlotInfo FN_INSERT_FIELD -{ - Slotname [ en-US ] = "Fields Dialog"; -}; -SfxSlotInfo FN_INSERT_FIELD_CTRL -{ - Slotname [ en-US ] = "Insert Fields"; -}; -SfxSlotInfo FN_INSERT_FLD_AUTHOR -{ - Slotname [ en-US ] = "Insert Author Field"; -}; -SfxSlotInfo FN_INSERT_FLD_DATE -{ - Slotname [ en-US ] = "Insert Date"; -}; -SfxSlotInfo FN_INSERT_FLD_PGCOUNT -{ - Slotname [ en-US ] = "Insert Page Count"; -}; -SfxSlotInfo FN_INSERT_FLD_PGNUMBER -{ - Slotname [ en-US ] = "Insert Page Number"; -}; -SfxSlotInfo FN_INSERT_FLD_TIME -{ - Slotname [ en-US ] = "Insert Time"; -}; -SfxSlotInfo FN_INSERT_FLD_TITLE -{ - Slotname [ en-US ] = "Insert Document Title"; -}; -SfxSlotInfo FN_INSERT_FLD_TOPIC -{ - Slotname [ en-US ] = "Insert Subject"; -}; -SfxSlotInfo FN_INSERT_FOOTNOTE -{ - Slotname [ en-US ] = "Insert Footnote Directly"; -}; -SfxSlotInfo FN_INSERT_FOOTNOTE_DLG -{ - Slotname [ en-US ] = "Insert Footnote"; -}; -SfxSlotInfo FN_INSERT_FRAME -{ - Slotname [ en-US ] = "Insert Frame"; -}; -SfxSlotInfo FN_INSERT_FRAME_INTERACT_NOCOL -{ - Slotname [ en-US ] = "Insert single-column frame manually"; -}; -SfxSlotInfo FN_INSERT_FRAME_INTERACT -{ - Slotname [ en-US ] = "Insert Frame Manually"; -}; -SfxSlotInfo FN_INSERT_HARD_SPACE -{ - Slotname [ en-US ] = "Insert Non-breaking Space"; -}; -SfxSlotInfo FN_INSERT_HARDHYPHEN -{ - Slotname [ en-US ] = "Insert Non-breaking Hyphen"; -}; -SfxSlotInfo FN_INSERT_HRULER -{ - Slotname [ en-US ] = "Insert Horizontal Ruler"; -}; -SfxSlotInfo FN_INSERT_HYPERLINK -{ - Slotname [ en-US ] = "Insert Hyperlink"; -}; -SfxSlotInfo FN_INSERT_IDX_ENTRY_DLG -{ - Slotname [ en-US ] = "Insert Index Marker"; -}; -SfxSlotInfo FN_INSERT_LINEBREAK -{ - Slotname [ en-US ] = "Insert Manual Row Break"; -}; -SfxSlotInfo FN_INSERT_OBJ_CTRL -{ - Slotname [ en-US ] = "Insert Object"; -}; -SfxSlotInfo FN_INSERT_OBJECT_DLG -{ - Slotname [ en-US ] = "Insert Other Objects"; -}; -SfxSlotInfo FN_INSERT_PAGEBREAK -{ - Slotname [ en-US ] = "Insert Manual Page Break"; -}; -SfxSlotInfo FN_INSERT_PAGEFOOTER -{ - Slotname [ en-US ] = "Insert Footer"; -}; -SfxSlotInfo FN_INSERT_PAGEHEADER -{ - Slotname [ en-US ] = "Insert Header"; -}; -SfxSlotInfo FN_INSERT_REF_FIELD -{ - Slotname [ en-US ] = "Insert Field Reference"; -}; -SfxSlotInfo FN_INSERT_REGION -{ - Slotname [ en-US ] = "Insert Section"; -}; -SfxSlotInfo FN_INSERT_SMA -{ - Slotname [ en-US ] = "Insert %PRODUCTNAME Math object"; -}; -SfxSlotInfo FN_INSERT_SOFT_HYPHEN -{ - Slotname [ en-US ] = "Insert Optional Hyphen"; -}; -SfxSlotInfo FN_INSERT_SYMBOL -{ - Slotname [ en-US ] = "Insert Special Character "; -}; -SfxSlotInfo FN_INSERT_TABLE -{ - Slotname [ en-US ] = "Insert Table"; -}; -SfxSlotInfo FN_JAVAEDIT -{ - Slotname [ en-US ] = "Insert Script"; -}; -SfxSlotInfo FN_LABEL -{ - Slotname [ en-US ] = "Insert Labels"; -}; -SfxSlotInfo FN_BUSINESS_CARD -{ - Slotname [ en-US ] = "Insert business cards"; -}; -SfxSlotInfo FN_LINE_DOWN -{ - Slotname [ en-US ] = "To Line Below"; -}; -SfxSlotInfo FN_LINE_DOWN_SEL -{ - Slotname [ en-US ] = "Select Down"; -}; -SfxSlotInfo FN_LINE_NUMBERING_DLG -{ - Slotname [ en-US ] = "Set Line Numbering"; -}; -SfxSlotInfo FN_LINE_UP -{ - Slotname [ en-US ] = "To Top Line"; -}; -SfxSlotInfo FN_LINE_UP_SEL -{ - Slotname [ en-US ] = "Select to Top Line"; -}; -SfxSlotInfo FN_NAVIGATION_PI_GOTO_PAGE -{ - Slotname [ en-US ] = "To Page"; -}; -SfxSlotInfo FN_NEW_GLOBAL_DOC -{ - Slotname [ en-US ] = "Create Master Document"; -}; -SfxSlotInfo FN_NEW_HTML_DOC -{ - Slotname [ en-US ] = "Create HTML Document"; -}; -SfxSlotInfo FN_NEXT_BOOKMARK -{ - Slotname [ en-US ] = "To Next Bookmark"; -}; -SfxSlotInfo FN_NEXT_FOOTNOTE -{ - Slotname [ en-US ] = "To Next Footnote"; -}; -SfxSlotInfo FN_NEXT_PARA -{ - Slotname [ en-US ] = "To Next Paragraph"; -}; -SfxSlotInfo FN_NEXT_SENT -{ - Slotname [ en-US ] = "To Next Sentence"; -}; -SfxSlotInfo FN_NEXT_SENT_SEL -{ - Slotname [ en-US ] = "Select to Next Sentence"; -}; -SfxSlotInfo FN_NEXT_TABLE -{ - Slotname [ en-US ] = "To Next Table"; -}; -SfxSlotInfo FN_NEXT_TBLFML -{ - Slotname [ en-US ] = "Go to next table formula"; -}; -SfxSlotInfo FN_NEXT_TBLFML_ERR -{ - Slotname [ en-US ] = "Go to next faulty table formula"; -}; -SfxSlotInfo FN_NEXT_TOXMARK -{ - Slotname [ en-US ] = "Go to Next Index Mark"; -}; -SfxSlotInfo FN_NEXT_WORD -{ - Slotname [ en-US ] = "To Word Right"; -}; -SfxSlotInfo FN_NEXT_WORD_SEL -{ - Slotname [ en-US ] = "Select to Word Right"; -}; -SfxSlotInfo FN_NUM_BULLET_DOWN -{ - Slotname [ en-US ] = "Down One Level"; -}; -SfxSlotInfo FN_NUM_BULLET_MOVEDOWN -{ - Slotname [ en-US ] = "Move Down"; -}; -SfxSlotInfo FN_NUM_BULLET_MOVEUP -{ - Slotname [ en-US ] = "Move Up"; -}; -SfxSlotInfo FN_NUM_BULLET_NEXT -{ - Slotname [ en-US ] = "To Next Paragraph in Level"; -}; -SfxSlotInfo FN_NUM_BULLET_NONUM -{ - Slotname [ en-US ] = "Insert Unnumbered Entry"; -}; -SfxSlotInfo FN_NUM_BULLET_OFF -{ - Slotname [ en-US ] = "Numbering Off"; -}; -SfxSlotInfo FN_NUM_BULLET_OUTLINE_DOWN -{ - Slotname [ en-US ] = "Move Down with Subpoints"; -}; -SfxSlotInfo FN_NUM_BULLET_OUTLINE_MOVEDOWN -{ - Slotname [ en-US ] = "Move Down with Subpoints"; -}; -SfxSlotInfo FN_NUM_BULLET_OUTLINE_MOVEUP -{ - Slotname [ en-US ] = "Move Up with Subpoints"; -}; -SfxSlotInfo FN_NUM_BULLET_OUTLINE_UP -{ - Slotname [ en-US ] = "Move Up with Subpoints"; -}; -SfxSlotInfo FN_NUM_BULLET_PREV -{ - Slotname [ en-US ] = "To Previous Paragraph in Level"; -}; -SfxSlotInfo FN_NUM_BULLET_UP -{ - Slotname [ en-US ] = "Up One Level"; -}; -SfxSlotInfo FN_NUM_FORMAT_TABLE_DLG -{ - Slotname [ en-US ] = "Edit Number Format"; -}; -SfxSlotInfo FN_NUM_OR_NONUM -{ - Slotname [ en-US ] = "Numbering On/Off"; -}; -SfxSlotInfo FN_NUMBER_BULLETS -{ - Slotname [ en-US ] = "Edit Numbering"; -}; -SfxSlotInfo FN_NUMBER_CURRENCY -{ - Slotname [ en-US ] = "Number Format: Currency"; -}; -SfxSlotInfo FN_NUMBER_DATE -{ - Slotname [ en-US ] = "Number Format : Date"; -}; -SfxSlotInfo FN_NUMBER_NEWSTART -{ - Slotname [ en-US ] = "Restart Numbering"; -}; -SfxSlotInfo FN_NUMBER_PERCENT -{ - Slotname [ en-US ] = "Number Format: Percent"; -}; -SfxSlotInfo FN_NUMBER_SCIENTIFIC -{ - Slotname [ en-US ] = "Number Format: Exponential"; -}; -SfxSlotInfo FN_NUMBER_STANDARD -{ - Slotname [ en-US ] = "Number Format: Standard"; -}; -SfxSlotInfo FN_NUMBER_TIME -{ - Slotname [ en-US ] = "Number Format: Time"; -}; -SfxSlotInfo FN_NUMBER_TWODEC -{ - Slotname [ en-US ] = "Number Format: Decimal"; -}; -SfxSlotInfo FN_NUMBERING_OUTLINE_DLG -{ - Slotname [ en-US ] = "Outline Numbering"; -}; -SfxSlotInfo FN_OPTIMIZE_TABLE -{ - Slotname [ en-US ] = "Optimize"; -}; -SfxSlotInfo FN_OUTLINE_TO_CLIPBOARD -{ - Slotname [ en-US ] = "Outline to Clipboard"; -}; -SfxSlotInfo FN_OUTLINE_TO_IMPRESS -{ - Slotname [ en-US ] = "Outline to Presentation"; -}; -SfxSlotInfo FN_PAGE_STYLE_SET_COLS -{ - Slotname [ en-US ] = "Page Style: Columns"; -}; -SfxSlotInfo FN_PAGEDOWN -{ - Slotname [ en-US ] = "Next Page"; -}; -SfxSlotInfo FN_PAGEDOWN_SEL -{ - Slotname [ en-US ] = "Select to Next Page"; -}; -SfxSlotInfo FN_PAGEUP -{ - Slotname [ en-US ] = "Previous Page"; -}; -SfxSlotInfo FN_PAGEUP_SEL -{ - Slotname [ en-US ] = "Select to Previous Page"; -}; -SfxSlotInfo FN_PASTESPECIAL -{ - Slotname [ en-US ] = "Paste Special"; -}; -SfxSlotInfo FN_PASTEUNFORMATTED -{ - Slotname [ en-US ] = "Paste Unformatted Text"; -}; -SfxSlotInfo FN_POSTIT -{ - Slotname [ en-US ] = "Insert Note"; -}; -SfxSlotInfo FN_PREV_BOOKMARK -{ - Slotname [ en-US ] = "To Previous Bookmark"; -}; -SfxSlotInfo FN_PREV_FOOTNOTE -{ - Slotname [ en-US ] = "To Previous Footnote"; -}; -SfxSlotInfo FN_PREV_PARA -{ - Slotname [ en-US ] = "To Previous Paragraph"; -}; -SfxSlotInfo FN_PREV_SENT -{ - Slotname [ en-US ] = "To Previous Sentence"; -}; -SfxSlotInfo FN_PREV_SENT_SEL -{ - Slotname [ en-US ] = "Select to Previous Sentence"; -}; -SfxSlotInfo FN_PREV_TABLE -{ - Slotname [ en-US ] = "To Previous Table"; -}; -SfxSlotInfo FN_PREV_TBLFML -{ - Slotname [ en-US ] = "Go to previous table formula"; -}; -SfxSlotInfo FN_PREV_TBLFML_ERR -{ - Slotname [ en-US ] = "Go to previous faulty table formula"; -}; -SfxSlotInfo FN_PREV_TOXMARK -{ - Slotname [ en-US ] = "Go to Previous Index Mark"; -}; -SfxSlotInfo FN_PREV_WORD -{ - Slotname [ en-US ] = "To Word Left"; -}; -SfxSlotInfo FN_PREV_WORD_SEL -{ - Slotname [ en-US ] = "Select to Begin of Word"; -}; -SfxSlotInfo FN_PREVIEW_PRINT_OPTIONS -{ - Slotname [ en-US ] = "Print options page view"; -}; -SfxSlotInfo FN_PREVIEW_ZOOM -{ - Slotname [ en-US ] = "Preview Zoom"; -}; -SfxSlotInfo FN_PRINT_LAYOUT -{ - Slotname [ en-US ] = "Print Layout On/Off"; -}; -SfxSlotInfo FN_PRINT_PAGEPREVIEW -{ - Slotname [ en-US ] = "Print page view"; -}; -SfxSlotInfo FN_MAILMERGE_WIZARD -{ - SlotName[ en-US ] = "Mail Merge Wizard"; -}; -SfxSlotInfo FN_QRY_MERGE -{ - Slotname [ en-US ] = "Prepare Mail Merge"; -}; -SfxSlotInfo FN_REDLINE_ACCEPT -{ - Slotname [ en-US ] = "Accept or Reject Changes"; -}; -SfxSlotInfo FN_REDLINE_COMMENT -{ - Slotname [ en-US ] = "Insert Comment"; -}; -SfxSlotInfo FN_REDLINE_ON -{ - Slotname [ en-US ] = "Switch on Review"; -}; -SfxSlotInfo FN_REDLINE_PROTECT -{ - Slotname [ en-US ] = "Protect Record of Changes"; -}; -SfxSlotInfo FN_REDLINE_SHOW -{ - Slotname [ en-US ] = "Highlight Changes"; -}; -SfxSlotInfo FN_REFRESH_VIEW -{ - Slotname [ en-US ] = "Restore View"; -}; -SfxSlotInfo FN_REPAGINATE -{ - Slotname [ en-US ] = "Repaginate"; -}; -SfxSlotInfo FN_REPEAT_SEARCH -{ - Slotname [ en-US ] = "Repeat Search"; -}; -SfxSlotInfo FN_RULER -{ - Slotname [ en-US ] = "Ruler On/Off"; -}; -SfxSlotInfo FN_SELECT_PARA -{ - Slotname [ en-US ] = "Select Paragraph"; -}; -SfxSlotInfo FN_SELECT_WORD -{ - Slotname [ en-US ] = "Select Word"; -}; -SfxSlotInfo FN_SET_ADD_MODE -{ - Slotname [ en-US ] = "MultiSelection On"; -}; -SfxSlotInfo FN_SET_EXT_MODE -{ - Slotname [ en-US ] = "Extended Selection On"; -}; -SfxSlotInfo FN_SET_PAGE_STYLE -{ - Slotname [ en-US ] = "Apply Page Style"; -}; -SfxSlotInfo FN_SET_SUB_SCRIPT -{ - Slotname [ en-US ] = "Subscript"; -}; -SfxSlotInfo FN_SET_SUPER_SCRIPT -{ - Slotname [ en-US ] = "Superscript"; -}; -SfxSlotInfo FN_SHADOWCURSOR -{ - Slotname [ en-US ] = "Direct Cursor On/Off"; -}; -SfxSlotInfo FN_SHIFT_BACKSPACE -{ - Slotname [ en-US ] = "Backspace"; -}; -SfxSlotInfo FN_SHOW_MULTIPLE_PAGES -{ - Slotname [ en-US ] = "Page Preview: Multiple Pages"; -}; -SfxSlotInfo FN_SHOW_TWO_PAGES -{ - Slotname [ en-US ] = "Page Preview: Two Pages"; -}; -SfxSlotInfo FN_SHOW_BOOKVIEW -{ - SlotName[ en-US ] = "Book Preview"; -}; -SfxSlotInfo FN_SHRINK_FONT_SIZE -{ - Slotname [ en-US ] = "Reduce Font"; -}; -SfxSlotInfo FN_SORTING_DLG -{ - Slotname [ en-US ] = "Sort"; -}; -SfxSlotInfo FN_START_DOC_DIRECT -{ - Slotname [ en-US ] = "Directly to Document Begin"; -}; -SfxSlotInfo FN_START_OF_COLUMN -{ - Slotname [ en-US ] = "To Column Begin"; -}; -SfxSlotInfo FN_START_OF_DOCUMENT -{ - Slotname [ en-US ] = "To Document Begin"; -}; -SfxSlotInfo FN_START_OF_DOCUMENT_SEL -{ - Slotname [ en-US ] = "Select to Document Begin"; -}; -SfxSlotInfo FN_START_OF_LINE -{ - Slotname [ en-US ] = "To Line Begin"; -}; -SfxSlotInfo FN_START_OF_LINE_SEL -{ - Slotname [ en-US ] = "Select to Begin of Line"; -}; -SfxSlotInfo FN_START_OF_NEXT_COLUMN -{ - Slotname [ en-US ] = "To Begin of Next Column"; -}; -SfxSlotInfo FN_START_OF_NEXT_PAGE -{ - Slotname [ en-US ] = "To Begin of Next Page"; -}; -SfxSlotInfo FN_START_OF_NEXT_PAGE_SEL -{ - Slotname [ en-US ] = "Select to Begin of Next Page"; -}; -SfxSlotInfo FN_START_OF_PAGE -{ - Slotname [ en-US ] = "To Page Begin"; -}; -SfxSlotInfo FN_START_OF_PAGE_SEL -{ - Slotname [ en-US ] = "Select to Page Begin"; -}; -SfxSlotInfo FN_START_OF_PARA -{ - Slotname [ en-US ] = "To Paragraph Begin"; -}; -SfxSlotInfo FN_START_OF_PARA_SEL -{ - Slotname [ en-US ] = "Select to Paragraph Begin"; -}; -SfxSlotInfo FN_START_OF_PREV_COLUMN -{ - Slotname [ en-US ] = "To Begin of Previous Column"; -}; -SfxSlotInfo FN_START_OF_PREV_PAGE -{ - Slotname [ en-US ] = "To Begin of Previous Page"; -}; -SfxSlotInfo FN_START_OF_PREV_PAGE_SEL -{ - Slotname [ en-US ] = "Select to Begin of Previous Page"; -}; -SfxSlotInfo FN_START_TABLE -{ - Slotname [ en-US ] = "To Table Begin"; -}; -SfxSlotInfo FN_STAT_PAGE -{ - Slotname [ en-US ] = "Page Number"; -}; -SfxSlotInfo FN_STAT_SELMODE -{ - Slotname [ en-US ] = "Selection Mode"; -}; -SfxSlotInfo FN_STAT_TEMPLATE -{ - Slotname [ en-US ] = "Page Style"; -}; -SfxSlotInfo FN_TABLE_ADJUST_CELLS -{ - Slotname [ en-US ] = "Optimal Column Width"; -}; -SfxSlotInfo FN_TABLE_AUTOSUM -{ - Slotname [ en-US ] = "Sum"; -}; -SfxSlotInfo FN_TABLE_BALANCE_CELLS -{ - Slotname [ en-US ] = "Space Columns Equally"; -}; -SfxSlotInfo FN_TABLE_BALANCE_ROWS -{ - Slotname [ en-US ] = "Space Rows Equally "; -}; -SfxSlotInfo FN_TABLE_DELETE_COL -{ - Slotname [ en-US ] = "Delete Column"; -}; -SfxSlotInfo FN_TABLE_DELETE_ROW -{ - Slotname [ en-US ] = "Delete Row"; -}; -SfxSlotInfo FN_TABLE_INSERT_COL -{ - Slotname [ en-US ] = "Insert Column"; -}; -SfxSlotInfo FN_TABLE_INSERT_ROW -{ - Slotname [ en-US ] = "Insert Row"; -}; -SfxSlotInfo FN_TABLE_MERGE_CELLS -{ - Slotname [ en-US ] = "Merge Cells"; -}; -SfxSlotInfo FN_TABLE_MERGE_TABLE -{ - Slotname [ en-US ] = "Merge Table"; -}; -SfxSlotInfo FN_FORMAT_APPLY_HEAD1 -{ - Slotname [ en-US ] = "Apply Style Heading 1"; -}; -SfxSlotInfo FN_FORMAT_APPLY_HEAD2 -{ - Slotname [ en-US ] = "Apply Style Heading 2"; -}; -SfxSlotInfo FN_FORMAT_APPLY_HEAD3 -{ - Slotname [ en-US ] = "Apply Style Heading 3"; -}; -SfxSlotInfo FN_FORMAT_APPLY_DEFAULT -{ - Slotname [ en-US ] = "Apply Style Default"; -}; -SfxSlotInfo FN_FORMAT_APPLY_TEXTBODY -{ - Slotname [ en-US ] = "Apply Style Textbody"; -}; -SfxSlotInfo FN_TABLE_MODE_FIX -{ - Slotname [ en-US ] = "Table: Fixed"; -}; -SfxSlotInfo FN_TABLE_MODE_FIX_PROP -{ - Slotname [ en-US ] = "Table: Fixed, Proportional"; -}; -SfxSlotInfo FN_TABLE_MODE_VARIABLE -{ - Slotname [ en-US ] = "Table: Variable"; -}; -SfxSlotInfo FN_TABLE_OPTIMAL_HEIGHT -{ - Slotname [ en-US ] = "Optimal Row Height"; -}; -SfxSlotInfo FN_TABLE_SELECT_ALL -{ - Slotname [ en-US ] = "Select Table"; -}; -SfxSlotInfo FN_TABLE_SELECT_COL -{ - Slotname [ en-US ] = "Select Column"; -}; -SfxSlotInfo FN_TABLE_SELECT_ROW -{ - Slotname [ en-US ] = "Select Rows"; -}; -SfxSlotInfo FN_TABLE_SET_READ_ONLY_CELLS -{ - Slotname [ en-US ] = "Protect Cells"; -}; -SfxSlotInfo FN_TABLE_SET_ROW_HEIGHT -{ - Slotname [ en-US ] = "Row Height"; -}; -SfxSlotInfo FN_TABLE_SPLIT_CELLS -{ - Slotname [ en-US ] = "Split Cells"; -}; -SfxSlotInfo FN_TABLE_SPLIT_TABLE -{ - Slotname [ en-US ] = "Split Table"; -}; -SfxSlotInfo FN_TABLE_UNSET_READ_ONLY -{ - Slotname [ en-US ] = "Unprotect sheet"; -}; -SfxSlotInfo FN_TABLE_UNSET_READ_ONLY_CELLS -{ - Slotname [ en-US ] = "Unprotect cells"; -}; -SfxSlotInfo FN_TABLE_VERT_BOTTOM -{ - Slotname [ en-US ] = "Bottom"; -}; -SfxSlotInfo FN_TABLE_VERT_CENTER -{ - Slotname [ en-US ] = "Center ( vertical )"; -}; -SfxSlotInfo FN_TABLE_VERT_NONE -{ - Slotname [ en-US ] = "Top"; -}; -SfxSlotInfo FN_THESAURUS_DLG -{ - Slotname [ en-US ] = "Thesaurus"; -}; -SfxSlotInfo FN_TO_FOOTER -{ - Slotname [ en-US ] = "To Footer"; -}; -SfxSlotInfo FN_TO_HEADER -{ - Slotname [ en-US ] = "To Header"; -}; -SfxSlotInfo FN_TOOL_ANKER -{ - Slotname [ en-US ] = "Change Anchor"; -}; -SfxSlotInfo FN_TOOL_ANKER_AT_CHAR -{ - Slotname [ en-US ] = "Anchor to Character"; -}; -SfxSlotInfo FN_TOOL_ANKER_CHAR -{ - Slotname [ en-US ] = "Anchor as Character"; -}; -SfxSlotInfo FN_TOOL_ANKER_FRAME -{ - Slotname [ en-US ] = "Anchor To Frame"; -}; -SfxSlotInfo FN_TOOL_ANKER_PAGE -{ - Slotname [ en-US ] = "Anchor To Page"; -}; -SfxSlotInfo FN_TOOL_ANKER_PARAGRAPH -{ - Slotname [ en-US ] = "Anchor To Paragraph"; -}; -SfxSlotInfo FN_TOOL_GROUP -{ - Slotname [ en-US ] = "Group"; -}; -SfxSlotInfo FN_TOOL_HIERARCHIE -{ - Slotname [ en-US ] = "Change Position"; -}; -SfxSlotInfo FN_TOOL_UNGROUP -{ - Slotname [ en-US ] = "Ungroup"; -}; -SfxSlotInfo FN_UNDERLINE_DOUBLE -{ - Slotname [ en-US ] = "Double Underline "; -}; -SfxSlotInfo FN_UPDATE_ALL -{ - Slotname [ en-US ] = "Update All"; -}; -SfxSlotInfo FN_UPDATE_ALL_LINKS -{ - Slotname [ en-US ] = "Update All Links"; -}; -SfxSlotInfo FN_UPDATE_CUR_TOX -{ - Slotname [ en-US ] = "Update Index"; -}; -SfxSlotInfo FN_EDIT_CURRENT_TOX -{ - Slotname [ en-US ] = "Edit index"; -}; -SfxSlotInfo FN_UPDATE_FIELDS -{ - Slotname [ en-US ] = "Update Fields"; -}; -SfxSlotInfo FN_UPDATE_INPUTFIELDS -{ - Slotname [ en-US ] = "Update Input Fields"; -}; -SfxSlotInfo FN_UPDATE_TOX -{ - Slotname [ en-US ] = "Update Indexes"; -}; -SfxSlotInfo FN_VIEW_BOUNDS -{ - Slotname [ en-US ] = "Text Limits"; -}; -SfxSlotInfo FN_VIEW_FIELDNAME -{ - Slotname [ en-US ] = "Field Names On/Off"; -}; -SfxSlotInfo FN_VIEW_FIELDS -{ - Slotname [ en-US ] = "Fields"; -}; -SfxSlotInfo FN_VIEW_GRAPHIC -{ - Slotname [ en-US ] = "Graphics On/Off"; -}; -SfxSlotInfo FN_VIEW_HIDDEN_PARA -{ - Slotname [ en-US ] = "Hidden Paragraphs"; -}; -SfxSlotInfo FN_VIEW_MARKS -{ - Slotname [ en-US ] = "Field Shadings"; -}; -SfxSlotInfo FN_VIEW_META_CHARS -{ - Slotname [ en-US ] = "Nonprinting Characters On/Off"; -}; -SfxSlotInfo FN_VIEW_TABLEGRID -{ - Slotname [ en-US ] = "Table Limits"; -}; -SfxSlotInfo FN_VLINEAL -{ - Slotname [ en-US ] = "Vertical Ruler"; -}; -SfxSlotInfo FN_VSCROLLBAR -{ - Slotname [ en-US ] = "Vertical Scroll Bar"; -}; -SfxSlotInfo FN_WRAP_ANCHOR_ONLY -{ - Slotname [ en-US ] = "Wrap First Paragraph"; -}; -SfxSlotInfo SID_ATTR_CHAR_COLOR_BACKGROUND -{ - Slotname [ en-US ] = "Highlighting"; -}; -SfxSlotInfo SID_ATTR_CHAR_COLOR_BACKGROUND_EXT -{ - Slotname [ en-US ] = "Highlight Fill"; -}; -SfxSlotInfo SID_ATTR_CHAR_COLOR_EXT -{ - Slotname [ en-US ] = "Font Color Fill"; -}; -SfxSlotInfo SID_ATTR_CHAR_COLOR2 -{ - Slotname [ en-US ] = "Font Color"; -}; -SfxSlotInfo SID_TEMPLATE_LOAD -{ - Slotname [ en-US ] = "Load Styles"; -}; -SfxSlotInfo FN_FORMAT_COLUMN -{ - Slotname [ en-US ] = "Columns"; -}; -SfxSlotInfo FN_INSERT_MULTI_TOX -{ - - Slotname [ en-US ] = "Insert Index"; -}; -SfxSlotInfo FN_INSERT_AUTH_ENTRY_DLG -{ - Slotname [ en-US ] = "Insert Bibliography Entry"; -}; - -SfxSlotInfo FN_EDIT_AUTH_ENTRY_DLG -{ - Slotname [ en-US ] = "Edit Bibliography Entry"; -}; - -SfxSlotInfo FN_REMOVE_CUR_TOX -{ - Slotname [ en-US ] = "Delete index"; -}; -SfxSlotInfo FN_EDIT_HYPERLINK -{ - Slotname [ en-US ] = "Edit hyperlink"; -}; -SfxSlotInfo FN_SET_MODOPT_TBLNUMFMT -{ - Slotname [ en-US ] = "Number Recognition"; -}; -SfxSlotInfo FN_UPDATE_CHARTS -{ - Slotname [ en-US ] = "Update Charts"; -}; -SfxSlotInfo FN_NAME_SHAPE -{ - Slotname [ en-US ] = "Name..."; -}; -// #i68101# -SfxSlotInfo FN_TITLE_DESCRIPTION_SHAPE -{ - Slotname [ en-US ] = "Description..."; -}; -SfxSlotInfo FN_CLOSE_PAGEPREVIEW -{ - Slotname [ en-US ] = "Close Preview"; -}; - -SfxSlotInfo FN_TO_FOOTNOTE_AREA -{ - Slotname [ en-US ] = "Edit Footnote/Endnote"; -}; - -SfxSlotInfo FN_READONLY_SELECTION_MODE -{ - Slotname [ en-US ] = "Select Text"; -}; - -SfxSlotInfo FN_TABLE_ROW_SPLIT -{ - Slotname [ en-US ] = "Break across page and columns"; -}; -SfxSlotInfo FN_WORDCOUNT_DIALOG -{ - SlotName[ en-US ] = "Word Count"; -}; -SfxSlotInfo FN_TABLE_DELETE_TABLE -{ - SlotName [ en-US ] = "Delete table"; -}; -SfxSlotInfo FN_TABLE_SELECT_CELL -{ - SlotName [ en-US ] = "Select cell"; -}; -SfxSlotInfo FN_CONVERT_TEXT_TO_TABLE -{ - SlotName [ en-US ] = "Convert Text to Table"; -}; - -SfxSlotInfo FN_CONVERT_TABLE_TO_TEXT -{ - SlotName [ en-US ] = "Convert Table to Text"; -}; -SfxSlotInfo FN_TABLE_SORT_DIALOG -{ - SlotName [ en-US ] = "Sort"; -}; -SfxSlotInfo FN_TABLE_HEADLINE_REPEAT -{ - SlotName [ en-US ] = "Heading Rows Repeat"; -}; -SfxSlotInfo FN_XFORMS_DESIGN_MODE -{ - SlotName[ en-US ] = "Design Mode On/Off"; -}; -SfxSlotInfo FN_XFORMS_INIT -{ - SlotName[ en-US ] = "XML Form Document"; -}; -SfxSlotInfo FN_NUM_CONTINUE -{ - SlotName[ en-US ] = "Continue previous numbering"; -}; - -SfxSlotInfo FN_INSERT_RLM -{ - SlotName[ en-US ] = "Right-to-left mark"; -}; -SfxSlotInfo FN_INSERT_LRM -{ - SlotName[ en-US ] = "Left-to-right mark"; -}; -SfxSlotInfo FN_INSERT_ZWSP -{ - SlotName[ en-US ] = "No-width no break"; -}; -SfxSlotInfo FN_INSERT_ZWNBSP -{ - SlotName[ en-US ] = "No-width optional break"; -}; -SfxSlotInfo FN_VIEW_NOTES -{ - Slotname [ en-US ] = "Notes"; -}; +//! this file is supposed not to be needed anymore... lets try... diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx index 751cff109eee..bcf5de8cfc27 100755 --- a/sw/source/ui/inc/langhelper.hxx +++ b/sw/source/ui/inc/langhelper.hxx @@ -34,31 +34,37 @@ class SwWrtShell; class SwView; class EditEngine; class EditView; +class OutlinerView; class SfxItemSet; struct ESelection; namespace SwLangHelper { - extern USHORT GetLanguageStatus(OutlinerView* pOLV,SfxItemSet& rSet); - extern bool SetLanguageStatus(OutlinerView* pOLV,SfxRequest &rReq,SwView &rView,SwWrtShell &rSh); + extern USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet ); + extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh ); - extern void SetLanguage(SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet); - extern void SetLanguage(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet); - extern void SetLanguage_None(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ); - extern void SetLanguage_None(SwWrtShell &rWrtSh,bool bIsForSelection, SfxItemSet &rCoreSet ); + extern void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); +// extern void SetLanguage( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); + extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); + extern void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet ); +// extern void SetLanguage_None( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ); + extern void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ); + extern void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection ); +// extern void ResetLanguages( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection ); + extern void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection ); // document extern void SelectCurrentPara( SwWrtShell &rWrtSh ); // EditView extern void SelectPara( EditView &rEditView, const ESelection &rCurSel ); - extern String GetTextForLanguageGuessing(EditEngine* rEditEngine, ESelection aDocSelection ); + extern String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection ); extern String GetTextForLanguageGuessing( SwWrtShell &rSh ); extern LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId ); extern LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId ); - extern LanguageType GetCurrentLanguage(SfxItemSet aSet,USHORT nScriptType ); + extern LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType ); extern LanguageType GetCurrentLanguage( SwWrtShell &rSh ); } diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx index 0985c3bdc4da..c7fd1f4e71f3 100644 --- a/sw/source/ui/inc/olmenu.hxx +++ b/sw/source/ui/inc/olmenu.hxx @@ -54,23 +54,22 @@ class SwSpellPopup : public PopupMenu ::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt; ::com::sun::star::uno::Sequence< rtl::OUString > aSuggestions; - LanguageType nCheckedLanguage; + LanguageType nCheckedLanguage; LanguageType nGuessLangWord; LanguageType nGuessLangPara; - USHORT nNumLanguageTextEntries; - USHORT nNumLanguageParaEntries; - USHORT nNumLanguageDocEntries; std::map< sal_Int16, ::rtl::OUString > aLangTable_Text; std::map< sal_Int16, ::rtl::OUString > aLangTable_Paragraph; - std::map< sal_Int16, ::rtl::OUString > aLangTable_Document; +// std::map< sal_Int16, ::rtl::OUString > aLangTable_Document; bool bGrammarResults; // show grammar results? Or show spellcheck results? Image aInfo16; - USHORT fillLangPopupMenu( PopupMenu *pPopupMenu , USHORT Lang_Start, ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq,SwWrtShell* pWrtSh, USHORT nLangTable); + void fillLangPopupMenu( PopupMenu *pPopupMenu, USHORT nLangStart, + ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq, SwWrtShell* pWrtSh, + std::map< sal_Int16, ::rtl::OUString > &rLangTable ); using PopupMenu::Execute; diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 865908568cd6..41bed8ff7650 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -31,86 +31,75 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include - -#ifndef _SVSTDARR_HXX -#define _SVSTDARR_STRINGSDTOR -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include +#include #include -#include +#include #include -#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include -#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include //CheckSpellChanges -#include -#include -#include -#include -#include -#include - -// -> #111827# -#include -#include -#include -// <- #111827# - -#include -#include -#include -#include -#include -#include -#include -#include "swabstdlg.hxx" -#include "chrdlg.hrc" -#include -#include -#include -#include - -#include -#include +#include -#include +#include "SwRewriter.hxx" +#include "chrdlg.hrc" +#include "cmdid.h" +#include "comcore.hrc" +#include "crsskip.hxx" +#include "doc.hxx" +#include "docsh.hxx" //CheckSpellChanges +#include "edtwin.hxx" +#include "helpid.h" +#include "hintids.hxx" +#include "langhelper.hxx" +#include "ndtxt.hxx" +#include "olmenu.hrc" +#include "olmenu.hxx" +#include "svtools/langtab.hxx" +#include "svtools/stritem.hxx" +#include "svx/brshitem.hxx" +#include "swabstdlg.hxx" +#include "swmodule.hxx" +#include "swtypes.hxx" +#include "swundo.hxx" +#include "uitool.hxx" +#include "undobj.hxx" +#include "unomid.h" +#include "view.hxx" +#include "viewopt.hxx" +#include "wrtsh.hxx" +#include "wview.hxx" -#include +#include using namespace ::com::sun::star; using ::rtl::OUString; @@ -218,63 +207,59 @@ inline bool lcl_checkScriptType( sal_Int16 nScriptType, LanguageType nLang ) return 0 != (nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang )); } -USHORT SwSpellPopup::fillLangPopupMenu( +void SwSpellPopup::fillLangPopupMenu( PopupMenu *pPopupMenu, - USHORT Lang_Start, - uno::Sequence< ::rtl::OUString > aSeq, + USHORT nLangItemIdStart, + uno::Sequence< OUString > aSeq, SwWrtShell* pWrtSh, - USHORT nLangTable ) + std::map< sal_Int16, ::rtl::OUString > &rLangTable ) { if (!pPopupMenu) - return 0; - - //Reference< awt::XMenuExtended > m_xMenuExtended( m_xPopupMenu, UNO_QUERY ); - std::map< ::rtl::OUString, ::rtl::OUString > LangItems; + return; SvtLanguageTable aLanguageTable; - USHORT nItemId = Lang_Start; - rtl::OUString curLang = aSeq[0]; - USHORT nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32()); - rtl::OUString keyboardLang = aSeq[2]; - rtl::OUString guessLang = aSeq[3]; - - //1--add current language - if(curLang!=OUString::createFromAscii("")) - { - LangItems[curLang]=curLang; - } - SvtLanguageTable aLangTable; + // set of languages to be displayed in the sub menus + std::set< OUString > aLangItems; + + OUString aCurLang( aSeq[0] ); + USHORT nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32()); + OUString aKeyboardLang( aSeq[2] ); + OUString aGuessedTextLang( aSeq[3] ); + + if (aCurLang != OUString() && + LANGUAGE_DONTKNOW != aLanguageTable.GetType( aCurLang )) + aLangItems.insert( aCurLang ); + //2--System - const AllSettings& rAllSettings=Application::GetSettings(); + const AllSettings& rAllSettings = Application::GetSettings(); LanguageType rSystemLanguage = rAllSettings.GetLanguage(); - if(rSystemLanguage!=LANGUAGE_DONTKNOW) + if (rSystemLanguage != LANGUAGE_DONTKNOW) { - if (lcl_checkScriptType(nScriptType,rSystemLanguage )) - LangItems[OUString(aLangTable.GetString(rSystemLanguage))]=OUString(aLangTable.GetString(rSystemLanguage)); + if (lcl_checkScriptType( nScriptType, rSystemLanguage )) + aLangItems.insert( aLanguageTable.GetString(rSystemLanguage) ); } //3--UI LanguageType rUILanguage = rAllSettings.GetUILanguage(); - if(rUILanguage!=LANGUAGE_DONTKNOW) + if (rUILanguage != LANGUAGE_DONTKNOW) { if (lcl_checkScriptType(nScriptType, rUILanguage )) - LangItems[OUString(aLangTable.GetString(rUILanguage))]=OUString(aLangTable.GetString(rUILanguage)); + aLangItems.insert( aLanguageTable.GetString(rUILanguage) ); } //4--guessed language - if(guessLang!=OUString::createFromAscii("")) + if (aGuessedTextLang.getLength() > 0) { - if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(guessLang))) - LangItems[guessLang]=guessLang; + if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(aGuessedTextLang))) + aLangItems.insert( aGuessedTextLang ); } - //5--keyboard language - if(keyboardLang!=OUString::createFromAscii("")) + if (aKeyboardLang.getLength() > 0) { - if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(keyboardLang))) - LangItems[keyboardLang]=keyboardLang; + if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(aKeyboardLang))) + aLangItems.insert( aKeyboardLang ); } //6--all languages used in current document @@ -282,68 +267,57 @@ USHORT SwSpellPopup::fillLangPopupMenu( uno::Reference< com::sun::star::frame::XController > xController( pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface()->getController(), uno::UNO_QUERY ); if ( xController.is() ) xModel = xController->getModel(); - uno::Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, uno::UNO_QUERY ); - /*the description of nScriptType - LATIN : 1 - ASIAN : 2 - COMPLEX:4 - LATIN + ASIAN : 3 - LATIN + COMPLEX : 5 - ASIAN + COMPLEX : 6 - LATIN + ASIAN + COMPLEX : 7 + /*the description of nScriptType flags + LATIN : 0x0001 + ASIAN : 0x0002 + COMPLEX: 0x0004 */ - - sal_Int16 nCount=7; - if(xDocumentLanguages.is()) + const sal_Int16 nMaxCount = 7; + if (xDocumentLanguages.is()) { - uno::Sequence< lang::Locale > rLocales(xDocumentLanguages->getDocumentLanguages(nScriptType,nCount)); - if(rLocales.getLength()>0) + uno::Sequence< lang::Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount ) ); + if (rLocales.getLength() > 0) { - for(USHORT i = 0; i::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it) + + USHORT nItemId = nLangItemIdStart; + const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection + const OUString sEmpty; // 'no language found' from language guessing + std::set< OUString >::const_iterator it; + for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { - rtl::OUString aEntryTxt( it->first ); - if (aEntryTxt != rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&& - aEntryTxt != rtl::OUString::createFromAscii("*") && - aEntryTxt.getLength() > 0) + OUString aEntryTxt( *it ); + if (aEntryTxt != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&& + aEntryTxt != sAsterix && + aEntryTxt != sEmpty) { - ++nItemId; - if (nLangTable == 0) // language for selection - aLangTable_Text[nItemId] = aEntryTxt; - else if (nLangTable == 1) // language for paragraph - aLangTable_Paragraph[nItemId] = aEntryTxt; - else if (nLangTable == 2) // language for document - aLangTable_Document[nItemId] = aEntryTxt; - + DBG_ASSERT( nLangItemIdStart <= nItemId && nItemId <= nLangItemIdStart + MN_MAX_NUM_LANG, + "nItemId outside of expected range!" ); pPopupMenu->InsertItem( nItemId, aEntryTxt, MIB_RADIOCHECK ); - if (aEntryTxt == curLang) + if (aEntryTxt == aCurLang) { //make a check mark for the current language pPopupMenu->CheckItem( nItemId, TRUE ); } + rLangTable[ nItemId ] = aEntryTxt; + ++nItemId; } } - //7--none - nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK ); - - //More... - nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK ); - - return nItemId - Lang_Start; // return number of inserted entries + pPopupMenu->InsertItem( nLangItemIdStart + MN_NONE_OFFSET, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK ); + pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, String(SW_RES( STR_RESET_TO_DEFAULT_LANGUAGE )), MIB_RADIOCHECK ); + pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK ); } @@ -366,22 +340,22 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) } -::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) +OUString RetrieveLabelFromCommand( const OUString& aCmdURL ) { - ::rtl::OUString aLabel; + OUString aLabel; if ( aCmdURL.getLength() ) { try { - uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY ); if ( xNameAccess.is() ) { uno::Reference< container::XNameAccess > xUICommandLabels; - const ::rtl::OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) ); + const OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) ); uno::Any a = xNameAccess->getByName( aModule ); uno::Reference< container::XNameAccess > xUICommands; a >>= xUICommandLabels; - rtl::OUString aStr; + OUString aStr; uno::Sequence< beans::PropertyValue > aPropSeq; a = xUICommandLabels->getByName( aCmdURL ); if ( a >>= aPropSeq ) @@ -446,25 +420,28 @@ bGrammarResults(false) InsertSeparator(0); bEnable = sal_True; - for( sal_uInt16 i = 0, nPos = 1, nId = MN_AUTOCORR_START + 1; - i < nStringCount; ++i, ++nPos, ++nId ) + USHORT nAutoCorrItemId = MN_AUTOCORR_START; + USHORT nItemId = MN_SUGGESTION_START; + for (USHORT i = 0; i < nStringCount; ++i) { const String aEntry = aSuggestions[ i ]; - InsertItem( nPos, aEntry, 0, i ); - SetHelpId( nPos, HID_LINGU_REPLACE); - + InsertItem( nItemId, aEntry, 0, i ); + SetHelpId( nItemId, HID_LINGU_REPLACE); if (aSuggestionImageUrl.getLength() > 0) - SetItemImage( nPos, aImage ); + SetItemImage( nItemId, aImage ); + + pMenu->InsertItem( nAutoCorrItemId, aEntry ); + pMenu->SetHelpId( nAutoCorrItemId, HID_LINGU_AUTOCORR); - pMenu->InsertItem( nId, aEntry ); - pMenu->SetHelpId( nPos, HID_LINGU_AUTOCORR); + ++nAutoCorrItemId; + ++nItemId; } } OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) ); OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") ); - SetItemText( MN_SPELLING, aSpellingAndGrammar ); - USHORT nItemPos = GetItemPos( MN_IGNORE ); + SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar ); + USHORT nItemPos = GetItemPos( MN_IGNORE_WORD ); InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos ); SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); @@ -487,11 +464,9 @@ bGrammarResults(false) nGuessLangPara = nGuessLangWord; } - pMenu = GetPopupMenu(MN_INSERT); - - bEnable = FALSE; // enable MN_INSERT? - + pMenu = GetPopupMenu(MN_ADD_TO_DIC); pMenu->CreateAutoMnemonics(); + bEnable = FALSE; // enable MN_ADD_TO_DIC? uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() ); if (xDicList.is()) { @@ -506,6 +481,7 @@ bGrammarResults(false) const uno::Reference< linguistic2::XDictionary > *pDic = aDics.getConstArray(); USHORT nDicCount = static_cast< USHORT >(aDics.getLength()); + USHORT nItemId = MN_DICTIONARIES_START; for( USHORT i = 0; i < nDicCount; i++ ) { uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); @@ -521,8 +497,7 @@ bGrammarResults(false) { // the extra 1 is because of the (possible) external // linguistic entry above - USHORT nPos = MN_INSERT_START + i + 1; - pMenu->InsertItem( nPos, xDicTmp->getName() ); + pMenu->InsertItem( nItemId, xDicTmp->getName() ); bEnable = sal_True; uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY ); @@ -533,18 +508,20 @@ bGrammarResults(false) if (aDictionaryImageUrl.getLength() > 0) { Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) ); - pMenu->SetItemImage( nPos, aImage ); + pMenu->SetItemImage( nItemId, aImage ); } } + + ++nItemId; } } } - EnableItem( MN_INSERT, bEnable ); + EnableItem( MN_ADD_TO_DIC, bEnable ); //ADD NEW LANGUAGE MENU ITEM /////////////////////////////////////////////////////////////////////////// String aScriptTypesInUse( String::CreateFromInt32( pWrtSh->GetScriptType() ) ); - SvtLanguageTable aLangTable; + SvtLanguageTable aLanguageTable; // get keyboard language String aKeyboardLang; @@ -552,39 +529,40 @@ bGrammarResults(false) SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); nLang = rEditWin.GetInputLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) - aKeyboardLang = aLangTable.GetString( nLang ); + aKeyboardLang = aLanguageTable.GetString( nLang ); // get the language that is in use const String aMultipleLanguages = String::CreateFromAscii("*"); String aCurrentLang = aMultipleLanguages; nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh ); if (nLang != LANGUAGE_DONTKNOW) - aCurrentLang = aLangTable.GetString( nLang ); + aCurrentLang = aLanguageTable.GetString( nLang ); // build sequence for status value - uno::Sequence< ::rtl::OUString > aSeq( 4 ); + uno::Sequence< OUString > aSeq( 4 ); aSeq[0] = aCurrentLang; aSeq[1] = aScriptTypesInUse; aSeq[2] = aKeyboardLang; - aSeq[3] = aLangTable.GetString(nGuessLangWord); + aSeq[3] = aLanguageTable.GetString(nGuessLangWord); - pMenu = GetPopupMenu(MN_LANGUAGE_SELECTION); - nNumLanguageTextEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_SELECTION_START, aSeq, pWrtSh, 0 ); - EnableItem( MN_LANGUAGE_SELECTION, true ); + pMenu = GetPopupMenu(MN_SET_LANGUAGE_SELECTION); + fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, aLangTable_Text ); + EnableItem( MN_SET_LANGUAGE_SELECTION, true ); - pMenu = GetPopupMenu(MN_LANGUAGE_PARAGRAPH); - nNumLanguageParaEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, 1 ); - EnableItem( MN_LANGUAGE_PARAGRAPH, true ); + pMenu = GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH); + fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph ); + EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true ); /* - pMenu = GetPopupMenu(MN_LANGUAGE_ALL_TEXT); - nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 ); - EnableItem( MN_LANGUAGE_ALL_TEXT, true ); + pMenu = GetPopupMenu(MN_SET_LANGUAGE_ALL_TEXT); + fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, aLangTable_Document ); + EnableItem( MN_SET_LANGUAGE_ALL_TEXT, true ); */ uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(); Image rImg = ::GetImage( xFrame, - ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, + OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark() ); - SetItemImage( MN_SPELLING, rImg ); + SetItemImage( MN_SPELLING_DLG, rImg ); + ////////////////////////////////////////////////////////////////////////////////// RemoveDisabledEntries( TRUE, TRUE ); @@ -599,7 +577,7 @@ SwSpellPopup::SwSpellPopup( SwWrtShell *pWrtSh, const linguistic2::ProofreadingResult &rResult, sal_Int32 nErrorInResult, - const uno::Sequence< rtl::OUString > &rSuggestions, + const uno::Sequence< OUString > &rSuggestions, const String &rParaText ) : PopupMenu( SW_RES(MN_SPELL_POPUP) ), pSh( pWrtSh ), @@ -609,13 +587,11 @@ aInfo16( SW_RES(IMG_INFO_16) ) { nCheckedLanguage = SvxLocaleToLanguage( rResult.aLocale ); - sal_Int16 nItemId = 1; - sal_Int16 nPos = 0; + USHORT nPos = 0; OUString aMessageText( rResult.aErrors[ nErrorInResult ].aShortComment ); InsertSeparator( nPos++ ); - InsertItem( nItemId, aMessageText, MIB_NOSELECT, nPos++ ); - SetItemImage( nItemId, aInfo16 ); - ++nItemId; + InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ ); + SetItemImage( MN_SHORT_COMMENT, aInfo16 ); CreateAutoMnemonics(); @@ -632,12 +608,12 @@ aInfo16( SW_RES(IMG_INFO_16) ) aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) ); } + USHORT nItemId = MN_SUGGESTION_START; for (sal_uInt16 i = 0; i < nStringCount; ++i) { const String aEntry = aSuggestions[ i ]; InsertItem( nItemId, aEntry, 0, nPos++ ); SetHelpId( nItemId, HID_LINGU_REPLACE ); - if (aSuggestionImageUrl.getLength() > 0) SetItemImage( nItemId, aImage ); @@ -648,8 +624,8 @@ aInfo16( SW_RES(IMG_INFO_16) ) OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) ); OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") ); - SetItemText( MN_SPELLING, aSpellingAndGrammar ); - USHORT nItemPos = GetItemPos( MN_IGNORE ); + SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar ); + USHORT nItemPos = GetItemPos( MN_IGNORE_WORD ); InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos ); SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); @@ -672,13 +648,13 @@ aInfo16( SW_RES(IMG_INFO_16) ) nGuessLangPara = nGuessLangWord; } - EnableItem( MN_IGNORE, false ); - EnableItem( MN_INSERT, false ); + EnableItem( MN_IGNORE_WORD, false ); + EnableItem( MN_ADD_TO_DIC, false ); //ADD NEW LANGUAGE MENU ITEM /////////////////////////////////////////////////////////////////////////// String aScriptTypesInUse( String::CreateFromInt32( pWrtSh->GetScriptType() ) ); - SvtLanguageTable aLangTable; + SvtLanguageTable aLanguageTable; // get keyboard language String aKeyboardLang; @@ -686,39 +662,39 @@ aInfo16( SW_RES(IMG_INFO_16) ) SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); nLang = rEditWin.GetInputLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) - aKeyboardLang = aLangTable.GetString( nLang ); + aKeyboardLang = aLanguageTable.GetString( nLang ); // get the language that is in use const String aMultipleLanguages = String::CreateFromAscii("*"); String aCurrentLang = aMultipleLanguages; nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh ); if (nLang != LANGUAGE_DONTKNOW) - aCurrentLang = aLangTable.GetString( nLang ); + aCurrentLang = aLanguageTable.GetString( nLang ); // build sequence for status value - uno::Sequence< ::rtl::OUString > aSeq( 4 ); + uno::Sequence< OUString > aSeq( 4 ); aSeq[0] = aCurrentLang; aSeq[1] = aScriptTypesInUse; aSeq[2] = aKeyboardLang; - aSeq[3] = aLangTable.GetString(nGuessLangWord); + aSeq[3] = aLanguageTable.GetString(nGuessLangWord); - PopupMenu *pMenu = GetPopupMenu(MN_LANGUAGE_SELECTION); - nNumLanguageTextEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_SELECTION_START, aSeq, pWrtSh, 0 ); - EnableItem( MN_LANGUAGE_SELECTION, true ); + PopupMenu *pMenu = GetPopupMenu(MN_SET_LANGUAGE_SELECTION); + fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, aLangTable_Text ); + EnableItem( MN_SET_LANGUAGE_SELECTION, true ); - pMenu = GetPopupMenu(MN_LANGUAGE_PARAGRAPH); - nNumLanguageParaEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, 1 ); - EnableItem( MN_LANGUAGE_PARAGRAPH, true ); + pMenu = GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH); + fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph ); + EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true ); /* - pMenu = GetPopupMenu(MN_LANGUAGE_ALL_TEXT); - nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 ); - EnableItem( MN_LANGUAGE_ALL_TEXT, true ); + pMenu = GetPopupMenu(MN_SET_LANGUAGE_ALL_TEXT); + fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, aLangTable_Document ); + EnableItem( MN_SET_LANGUAGE_ALL_TEXT, true ); */ uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(); Image rImg = ::GetImage( xFrame, - ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, + OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark() ); - SetItemImage( MN_SPELLING, rImg ); + SetItemImage( MN_SPELLING_DLG, rImg ); ////////////////////////////////////////////////////////////////////////////////// @@ -741,25 +717,23 @@ sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, Window* pWin ) -----------------------------------------------------------------------*/ void SwSpellPopup::Execute( USHORT nId ) { - if (bGrammarResults && nId == 1) - return; // nothing to do since it is the error message (short comment) + if (nId == USHRT_MAX) + return; - sal_Bool bAutoCorr = sal_False; - if( nId > MN_AUTOCORR_START && nId < MN_LANGUAGE_SELECTION_START && nId != USHRT_MAX ) - { - nId -= MN_AUTOCORR_START; - bAutoCorr = sal_True; - } + if (/*bGrammarResults && */nId == MN_SHORT_COMMENT) + return; // nothing to do since it is the error message (short comment) - if( nId && nId != USHRT_MAX) + if ((MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) || + (MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END)) { - int nAltIdx = bGrammarResults ? nId - 2 : nId - 1; - if ( nAltIdx >= 0 && nAltIdx < aSuggestions.getLength() && (bGrammarResults || xSpellAlt.is()) ) + USHORT nAltIdx = (MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ? + nId - MN_SUGGESTION_START : nId - MN_AUTOCORR_START; + DBG_ASSERT( 0 <= nAltIdx && nAltIdx < aSuggestions.getLength(), "index out of range" ); + if (0 <= nAltIdx && nAltIdx < aSuggestions.getLength() && (bGrammarResults || xSpellAlt.is())) { sal_Bool bOldIns = pSh->IsInsMode(); pSh->SetInsMode( sal_True ); - DBG_ASSERT( 0 <= nAltIdx && nAltIdx <= aSuggestions.getLength(), "index out of range"); String aTmp( aSuggestions[ nAltIdx ] ); String aOrig( bGrammarResults ? OUString() : xSpellAlt->getWord() ); @@ -778,40 +752,30 @@ void SwSpellPopup::Execute( USHORT nId ) aRewriter.AddRule(UNDO_ARG1, pSh->GetCrsrDescr()); aRewriter.AddRule(UNDO_ARG2, String(SW_RES(STR_YIELDS))); - { - String aTmpStr; - - aTmpStr += String(SW_RES(STR_START_QUOTE)); - aTmpStr += aTmp; - aTmpStr += String(SW_RES(STR_END_QUOTE)); - aRewriter.AddRule(UNDO_ARG3, aTmpStr); - } + String aTmpStr( SW_RES(STR_START_QUOTE) ); + aTmpStr += aTmp; + aTmpStr += String(SW_RES(STR_END_QUOTE)); + aRewriter.AddRule(UNDO_ARG3, aTmpStr); pSh->StartUndo(UNDO_UI_REPLACE, &aRewriter); pSh->StartAction(); pSh->DelLeft(); pSh->Insert( aTmp ); + /* #102505# EndAction/EndUndo moved down since insertion of temporary auto correction is now undoable two and must reside in the same undo group.*/ - // nur aufnehmen, wenn es NICHT schon in der Autokorrektur vorhanden ist SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect(); String aOrigWord( bGrammarResults ? OUString() : xSpellAlt->getWord() ) ; - String aNewWord; - if( nId ) - aNewWord = aSuggestions[ nAltIdx ]; - else - aNewWord = aOrigWord; + String aNewWord( aSuggestions[ nAltIdx ] ); SvxPrepareAutoCorrect( aOrigWord, aNewWord ); - if( bAutoCorr ) - { + if (MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END) pACorr->PutText( aOrigWord, aNewWord, nCheckedLanguage ); - } /* #102505# EndAction/EndUndo moved down since insertion of temporary auto correction is now undoable two and @@ -821,180 +785,140 @@ void SwSpellPopup::Execute( USHORT nId ) pSh->SetInsMode( bOldIns ); } - else + } + else if (nId == MN_SPELLING_DLG) + { + if (bGrammarResults) + { + SvtLinguConfig().SetProperty( A2OU( UPN_IS_GRAMMAR_INTERACTIVE ), uno::makeAny( sal_True )); + } + pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); { - if (nId < MN_LANGUAGE_SELECTION_START) + uno::Reference xDictionaryList( SvxGetDictionaryList() ); + SvxDicListChgClamp aClamp( xDictionaryList ); + pSh->GetView().GetViewFrame()->GetDispatcher()-> + Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON ); + } + } + else if (nId == MN_IGNORE_SELECTION) + { + SwPaM *pPaM = pSh->GetCrsr(); + if (pPaM) + pSh->IgnoreGrammarErrorAt( *pPaM ); + } + else if (nId == MN_IGNORE_WORD) + { + uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY ); + linguistic::AddEntryToDic( xDictionary, + xSpellAlt->getWord(), sal_False, aEmptyStr, LANGUAGE_NONE ); + } + else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) + { + OUString aWord( xSpellAlt->getWord() ); + USHORT nDicIdx = nId - MN_DICTIONARIES_START; + DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); + + if (nDicIdx < aDics.getLength()) { - switch( nId ) + uno::Reference< linguistic2::XDictionary > xDic = aDics.getConstArray()[nDicIdx]; + INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE ); + // save modified user-dictionary if it is persistent + uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); + if (xSavDic.is()) + xSavDic->store(); + + if (DIC_ERR_NONE != nAddRes + && !xDic->getEntry( aWord ).is()) { - case MN_SPELLING: - { - if (bGrammarResults) - { - SvtLinguConfig().SetProperty( A2OU( UPN_IS_GRAMMAR_INTERACTIVE ), uno::makeAny( sal_True )); - } - pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); - { - uno::Reference xDictionaryList( SvxGetDictionaryList() ); - SvxDicListChgClamp aClamp( xDictionaryList ); - pSh->GetView().GetViewFrame()->GetDispatcher()-> - Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON ); - } - } - break; - case MN_IGNORE_SELECTION : - { - SwPaM *pPaM = pSh->GetCrsr(); - if (pPaM) - pSh->IgnoreGrammarErrorAt( *pPaM ); - } - break; - case MN_IGNORE : - { - uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY ); - linguistic::AddEntryToDic( - xDictionary, - xSpellAlt->getWord(), sal_False, - aEmptyStr, LANGUAGE_NONE ); - } - break; - case MN_INSERT: - DBG_ERROR("geht noch nicht!"); - break; - case MN_LANGUAGE_WORD: - case MN_LANGUAGE_PARA: - { - pSh->StartAction(); - - if( MN_LANGUAGE_PARA == nId ) - { - if( !pSh->IsSttPara() ) - pSh->MovePara( fnParaCurr, fnParaStart ); - pSh->SwapPam(); - if( !pSh->IsEndPara() ) - pSh->MovePara( fnParaCurr, fnParaEnd ); - } - - LanguageType nLangToUse = (MN_LANGUAGE_PARA == nId) ? nGuessLangPara : nGuessLangWord; - sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLangToUse ); - USHORT nResId = 0; - switch (nScriptType) - { - case SCRIPTTYPE_COMPLEX : nResId = RES_CHRATR_CTL_LANGUAGE; break; - case SCRIPTTYPE_ASIAN : nResId = RES_CHRATR_CJK_LANGUAGE; break; - default /*SCRIPTTYPE_LATIN*/: nResId = RES_CHRATR_LANGUAGE; break; - } - SfxItemSet aSet(pSh->GetAttrPool(), nResId, nResId ); - aSet.Put( SvxLanguageItem( nLangToUse, nResId ) ); - pSh->SetAttr( aSet ); - - pSh->EndAction(); - } - break; - default: - if(nId >= MN_INSERT_START ) - { - OUString aWord( xSpellAlt->getWord() ); - INT32 nDicIdx = nId - MN_INSERT_START - 1; - DBG_ASSERT( nDicIdx < aDics.getLength(), - "dictionary index out of range" ); - uno::Reference< linguistic2::XDictionary > xDic = - aDics.getConstArray()[nDicIdx]; - INT16 nAddRes = linguistic::AddEntryToDic( xDic, - aWord, FALSE, aEmptyStr, LANGUAGE_NONE ); - // save modified user-dictionary if it is persistent - uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); - if (xSavDic.is()) - xSavDic->store(); - - if (DIC_ERR_NONE != nAddRes - && !xDic->getEntry( aWord ).is()) - { - SvxDicError( - &pSh->GetView().GetViewFrame()->GetWindow(), - nAddRes ); - } - } + SvxDicError( + &pSh->GetView().GetViewFrame()->GetWindow(), + nAddRes ); } } - else - { - SfxItemSet aCoreSet( pSh->GetView().GetPool(), - RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE, - RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, - RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE, - 0 ); - String aNewLangTxt; + } + else + { + // Set language for selection or for paragraph... -// pSh->StartAction(); + SfxItemSet aCoreSet( pSh->GetView().GetPool(), + RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE, + RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, + RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE, + 0 ); + String aNewLangTxt; - if (nId >= MN_LANGUAGE_SELECTION_START && nId < MN_LANGUAGE_SELECTION_START + nNumLanguageTextEntries - 1) - { - //Set language for current selection - aNewLangTxt=aLangTable_Text[nId]; - SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet ); - } - else if (nId == MN_LANGUAGE_SELECTION_START + nNumLanguageTextEntries - 1) - { - //Set Language_None for current selection - SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet ); - } - else if (nId == MN_LANGUAGE_SELECTION_START + nNumLanguageTextEntries) - { - //Open Format/Character Dialog - lcl_CharDialog( *pSh, true, nId, 0, 0 ); - } - else if (nId >= MN_LANGUAGE_PARAGRAPH_START && nId < MN_LANGUAGE_PARAGRAPH_START + nNumLanguageParaEntries - 1) - { - //Set language for current paragraph - aNewLangTxt=aLangTable_Paragraph[nId]; - pSh->Push(); // save cursor - SwLangHelper::SelectCurrentPara( *pSh ); - SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet ); - pSh->Pop( FALSE ); // restore cursor - } - else if (nId == MN_LANGUAGE_PARAGRAPH_START + nNumLanguageParaEntries - 1) - { - //Set Language_None for current paragraph - pSh->Push(); // save cursor - SwLangHelper::SelectCurrentPara( *pSh ); - SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet ); - pSh->Pop( FALSE ); // restore cursor - } - else if (nId == MN_LANGUAGE_PARAGRAPH_START + nNumLanguageParaEntries) - { - pSh->Push(); // save cursor - SwLangHelper::SelectCurrentPara( *pSh ); - //Open Format/Character Dialog - lcl_CharDialog( *pSh, true, nId, 0, 0 ); - pSh->Pop( FALSE ); // restore cursor - } - else if (nId >= MN_LANGUAGE_ALL_TEXT_START && nId < MN_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1) - { - //Set selected language as the default language - aNewLangTxt=aLangTable_Document[nId]; - SwLangHelper::SetLanguage( *pSh, aNewLangTxt, false, aCoreSet ); - } - else if (nId == MN_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1) - { - //Set Language_None as the default language - SwLangHelper::SetLanguage_None( *pSh, false, aCoreSet ); - } - else if (nId == MN_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries) - { - // open the dialog "Tools/Options/Language Settings - Language" - SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - if (pFact) - { - VclAbstractDialog* pDlg = pFact->CreateVclDialog( pSh->GetView().GetWindow(), SID_LANGUAGE_OPTIONS ); - pDlg->Execute(); - delete pDlg; - } - } - -// pSh->EndAction(); + if (MN_SET_LANGUAGE_SELECTION_START <= nId && nId <= MN_SET_LANGUAGE_SELECTION_END) + { + //Set language for current selection + aNewLangTxt = aLangTable_Text[nId]; + SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet ); + } + else if (nId == MN_SET_SELECTION_NONE) + { + //Set Language_None for current selection + SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet ); + } + else if (nId == MN_SET_SELECTION_RESET) + { + //reset languages for current selection + SwLangHelper::ResetLanguages( *pSh, true ); + } + else if (nId == MN_SET_SELECTION_MORE) + { + //Open Format/Character Dialog + lcl_CharDialog( *pSh, true, nId, 0, 0 ); + } + else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END) + { + //Set language for current paragraph + aNewLangTxt = aLangTable_Paragraph[nId]; + pSh->Push(); // save cursor + SwLangHelper::SelectCurrentPara( *pSh ); + SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet ); + pSh->Pop( FALSE ); // restore cursor + } + else if (nId == MN_SET_PARA_NONE) + { + //Set Language_None for current paragraph + pSh->Push(); // save cursor + SwLangHelper::SelectCurrentPara( *pSh ); + SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet ); + pSh->Pop( FALSE ); // restore cursor + } + else if (nId == MN_SET_PARA_RESET) + { + //reset languages for current paragraph + pSh->Push(); // save cursor + SwLangHelper::SelectCurrentPara( *pSh ); + SwLangHelper::ResetLanguages( *pSh, true ); + pSh->Pop( FALSE ); // restore cursor + } + else if (nId == MN_SET_PARA_MORE) + { + pSh->Push(); // save cursor + SwLangHelper::SelectCurrentPara( *pSh ); + //Open Format/Character Dialog + lcl_CharDialog( *pSh, true, nId, 0, 0 ); + pSh->Pop( FALSE ); // restore cursor + } +#if 0 + else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1) + { + //Set Language_None as the default language + SwLangHelper::SetLanguage_None( *pSh, false, aCoreSet ); + } + else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries) + { + // open the dialog "Tools/Options/Language Settings - Language" + SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); + if (pFact) + { + VclAbstractDialog* pDlg = pFact->CreateVclDialog( pSh->GetView().GetWindow(), SID_LANGUAGE_OPTIONS ); + pDlg->Execute(); + delete pDlg; } } +#endif } pSh->EnterStdMode(); diff --git a/sw/source/ui/lingu/olmenu.hrc b/sw/source/ui/lingu/olmenu.hrc index 4e13b83bf10a..e69d51fbc98b 100644 --- a/sw/source/ui/lingu/olmenu.hrc +++ b/sw/source/ui/lingu/olmenu.hrc @@ -33,35 +33,65 @@ #include "rcid.hrc" -#define MN_SPELL_POPUP (RC_LINGU_BEGIN + 1) -#define STR_SPELL_OK (RC_LINGU_BEGIN + 2) -#define STR_HYP_OK (RC_LINGU_BEGIN + 3) -#define STR_WORD (RC_LINGU_BEGIN + 4) -#define STR_PARAGRAPH (RC_LINGU_BEGIN + 5) -#define STR_LANGSTATUS_NONE (RC_LINGU_BEGIN + 6) -#define STR_LANGSTATUS_MORE (RC_LINGU_BEGIN + 7) -#define STR_IGNORE_SELECTION (RC_LINGU_BEGIN + 8) +#define MN_SPELL_POPUP (RC_LINGU_BEGIN + 1) +#define STR_SPELL_OK (RC_LINGU_BEGIN + 2) +#define STR_HYP_OK (RC_LINGU_BEGIN + 3) +#define STR_WORD (RC_LINGU_BEGIN + 4) +#define STR_PARAGRAPH (RC_LINGU_BEGIN + 5) +#define STR_LANGSTATUS_NONE (RC_LINGU_BEGIN + 6) +#define STR_LANGSTATUS_MORE (RC_LINGU_BEGIN + 7) +#define STR_IGNORE_SELECTION (RC_LINGU_BEGIN + 8) +#define STR_RESET_TO_DEFAULT_LANGUAGE (RC_LINGU_BEGIN + 9) -#define IMG_INFO_16 (RC_LINGU_BEGIN + 8) +#define IMG_INFO_16 (RC_LINGU_BEGIN + 100) //! Don't change these values. You may break context menu modifying extensions! -#define MN_SPELLING 100 -#define MN_IGNORE_SELECTION 101 -#define MN_IGNORE 102 -#define MN_INSERT 103 -#define MN_AUTOCORR 104 -#define MN_LANGUAGE_WORD 105 -#define MN_LANGUAGE_PARA 106 -#define MN_LANGUAGE_SELECTION 107 -#define MN_LANGUAGE_PARAGRAPH 108 -#define MN_LANGUAGE_ALL_TEXT 109 - -#define MN_INSERT_START 500 -#define MN_AUTOCORR_START 900 - -#define MN_LANGUAGE_SELECTION_START 1170 -#define MN_LANGUAGE_PARAGRAPH_START 1270 -#define MN_LANGUAGE_ALL_TEXT_START 1370 +#define MN_SPELLING_DLG 200 +#define MN_IGNORE_SELECTION 201 +#define MN_IGNORE_WORD 202 +#define MN_ADD_TO_DIC 203 +#define MN_AUTOCORR 204 +#define MN_SET_LANGUAGE_SELECTION 205 +#define MN_SET_LANGUAGE_PARAGRAPH 206 +#define MN_SET_LANGUAGE_ALL_TEXT 207 +#define MN_SHORT_COMMENT 208 + +// id range for dictionaries sub menu +#define MN_DICTIONARIES_START 300 +#define MN_DICTIONARIES_END (MN_DICTIONARIES_START + 99) + +// id range for suggestions from spell and grammar checker +#define MN_SUGGESTION_START 500 +#define MN_SUGGESTION_END (MN_SUGGESTION_START + MN_MAX_NUM_LANG) + +// id range for auto correction sub menu entries +#define MN_AUTOCORR_START 700 +#define MN_AUTOCORR_END (MN_AUTOCORR_START + MN_MAX_NUM_LANG) + +// max number of language entries sub menus +#define MN_MAX_NUM_LANG 99 + +#define MN_NONE_OFFSET (MN_MAX_NUM_LANG + 1) +#define MN_RESET_OFFSET (MN_MAX_NUM_LANG + 2) +#define MN_MORE_OFFSET (MN_MAX_NUM_LANG + 3) + +// id range for 'set language for selection' sub menu entries +#define MN_SET_LANGUAGE_SELECTION_START 900 +#define MN_SET_LANGUAGE_SELECTION_END (MN_SET_LANGUAGE_SELECTION_START + MN_MAX_NUM_LANG) +#define MN_SET_SELECTION_NONE (MN_SET_LANGUAGE_SELECTION_START + MN_NONE_OFFSET) +#define MN_SET_SELECTION_RESET (MN_SET_LANGUAGE_SELECTION_START + MN_RESET_OFFSET) +#define MN_SET_SELECTION_MORE (MN_SET_LANGUAGE_SELECTION_START + MN_MORE_OFFSET) + +// id range for 'set language for paragraph' sub menu entries +#define MN_SET_LANGUAGE_PARAGRAPH_START 1100 +#define MN_SET_LANGUAGE_PARAGRAPH_END (MN_SET_LANGUAGE_PARAGRAPH_START + MN_MAX_NUM_LANG) +#define MN_SET_PARA_NONE (MN_SET_LANGUAGE_PARAGRAPH_START + MN_NONE_OFFSET) +#define MN_SET_PARA_RESET (MN_SET_LANGUAGE_PARAGRAPH_START + MN_RESET_OFFSET) +#define MN_SET_PARA_MORE (MN_SET_LANGUAGE_PARAGRAPH_START + MN_MORE_OFFSET) + +// id range for 'set language for all text' sub menu entries +#define MN_SET_LANGUAGE_ALL_TEXT_START 1300 +#define MN_SET_LANGUAGE_ALL_TEXT_END (MN_SET_LANGUAGE_ALL_TEXT_START + MN_MAX_NUM_LANG) #endif diff --git a/sw/source/ui/lingu/olmenu.src b/sw/source/ui/lingu/olmenu.src index 82175a74bc23..0a07b41d64ed 100644 --- a/sw/source/ui/lingu/olmenu.src +++ b/sw/source/ui/lingu/olmenu.src @@ -41,13 +41,13 @@ Menu MN_SPELL_POPUP { MenuItem { - Identifier = MN_IGNORE ; + Identifier = MN_IGNORE_WORD ; HelpID = HID_LINGU_IGNORE_WORD ; Text [ en-US ] = "Ignore All" ; }; MenuItem { - Identifier = MN_INSERT ; + Identifier = MN_ADD_TO_DIC ; HelpID = HID_LINGU_ADD_WORD ; SubMenu = Menu { @@ -65,14 +65,14 @@ Menu MN_SPELL_POPUP }; MenuItem { - Identifier = MN_SPELLING ; + Identifier = MN_SPELLING_DLG ; HelpID = HID_LINGU_SPELLING_DLG ; Text [ en-US ] = "~Spellcheck..." ; }; SEPARATOR MenuItem { - Identifier = MN_LANGUAGE_SELECTION ; + Identifier = MN_SET_LANGUAGE_SELECTION ; SubMenu = Menu { }; @@ -80,7 +80,7 @@ Menu MN_SPELL_POPUP }; MenuItem { - Identifier = MN_LANGUAGE_PARAGRAPH ; + Identifier = MN_SET_LANGUAGE_PARAGRAPH ; SubMenu = Menu { }; @@ -89,7 +89,7 @@ Menu MN_SPELL_POPUP /* MenuItem { - Identifier = MN_LANGUAGE_ALL_TEXT ; + Identifier = MN_SET_LANGUAGE_ALL_TEXT ; SubMenu = Menu { }; @@ -118,6 +118,11 @@ String STR_LANGSTATUS_NONE { Text [ en-US ] = "None (Do not check spelling)" ; }; +String STR_RESET_TO_DEFAULT_LANGUAGE +{ + Text [ en-US ] = "Reset to Default Language" ; + Text [ x-comment ] = " "; +}; String STR_LANGSTATUS_MORE { Text [ en-US ] = "More..." ; diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx index e5e4dbe81b29..fb6e0e6e7594 100755 --- a/sw/source/ui/shells/langhelper.cxx +++ b/sw/source/ui/shells/langhelper.cxx @@ -69,7 +69,8 @@ using namespace ::com::sun::star; namespace SwLangHelper { - USHORT GetLanguageStatus(OutlinerView* pOLV,SfxItemSet& rSet) + + USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet ) { ESelection aSelection = pOLV->GetSelection(); EditView& rEditView=pOLV->GetEditView(); @@ -113,7 +114,7 @@ namespace SwLangHelper return 0; } - bool SetLanguageStatus(OutlinerView* pOLV,SfxRequest &rReq,SwView &rView,SwWrtShell &rSh) + bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh ) { bool bRestoreSelection = false; SfxItemSet aEditAttr(pOLV->GetAttribs()); @@ -133,126 +134,132 @@ namespace SwLangHelper //!! SwTextShell got destroyed meanwhile.) SfxViewFrame *pViewFrame = rView.GetViewFrame(); - if (aNewLangTxt.EqualsAscii( "*" )) + if (aNewLangTxt.EqualsAscii( "*" )) + { + // open the dialog "Tools/Options/Language Settings - Language" + SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); + if (pFact) { - // open the dialog "Tools/Options/Language Settings - Language" - SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - if (pFact) - { - VclAbstractDialog* pDlg = pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS ); - pDlg->Execute(); - delete pDlg; - } + VclAbstractDialog* pDlg = pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS ); + pDlg->Execute(); + delete pDlg; } - else + } + else + { + // setting the new language... + if (aNewLangTxt.Len() > 0) { - // setting the new language... - if (aNewLangTxt.Len() > 0) + const String aSelectionLangPrefix( String::CreateFromAscii("Current_") ); + const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") ); + const String aDocumentLangPrefix( String::CreateFromAscii("Default_") ); + const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") ); + const String aStrResetLangs( String::CreateFromAscii("RESET_LANGUAGES") ); + + xub_StrLen nPos = 0; + bool bForSelection = true; + bool bForParagraph = false; + if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aSelectionLangPrefix, 0 ))) { - const String aSelectionLangPrefix( String::CreateFromAscii("Current_") ); - const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") ); - const String aDocumentLangPrefix( String::CreateFromAscii("Default_") ); - const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") ); - - xub_StrLen nPos = 0; - bool bForSelection = true; - bool bForParagraph = false; - if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aSelectionLangPrefix, 0 ))) - { - // ... for the current selection - aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.Len() ); - bForSelection = true; - } - else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 ))) - { - // ... for the current paragraph language - aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.Len() ); - bForSelection = true; - bForParagraph = true; - } - else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 ))) - { - // ... as default document language - aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.Len() ); - bForSelection = false; - } + // ... for the current selection + aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.Len() ); + bForSelection = true; + } + else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 ))) + { + // ... for the current paragraph language + aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.Len() ); + bForSelection = true; + bForParagraph = true; + } + else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 ))) + { + // ... as default document language + aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.Len() ); + bForSelection = false; + } - if (bForParagraph) - { - bRestoreSelection = true; - SwLangHelper::SelectPara( rEditView, aSelection ); - aSelection = pOLV->GetSelection(); - } - if (!bForSelection) // document language to be changed... - { - rSh.StartAction(); - rSh.LockView( TRUE ); - rSh.Push(); + if (bForParagraph) + { + bRestoreSelection = true; + SwLangHelper::SelectPara( rEditView, aSelection ); + aSelection = pOLV->GetSelection(); + } + if (!bForSelection) // document language to be changed... + { + rSh.StartAction(); + rSh.LockView( TRUE ); + rSh.Push(); - // prepare to apply new language to all text in document - rSh.SelAll(); - rSh.ExtendedSelectAll(); - } + // prepare to apply new language to all text in document + rSh.SelAll(); + rSh.ExtendedSelectAll(); + } + + if (aNewLangTxt == aStrNone) + SwLangHelper::SetLanguage_None( rSh, pOLV, aSelection, bForSelection, aEditAttr ); + else if (aNewLangTxt == aStrResetLangs) + SwLangHelper::ResetLanguages( rSh, pOLV, aSelection, bForSelection ); + else + SwLangHelper::SetLanguage( rSh, pOLV, aSelection, aNewLangTxt, bForSelection, aEditAttr ); - if (aNewLangTxt != aStrNone) - SwLangHelper::SetLanguage( rSh, pEditEngine, aSelection, aNewLangTxt, bForSelection, aEditAttr ); + // ugly hack, as it seems that EditView/EditEngine does not update their spellchecking marks + // when setting a new language attribute + if (bForSelection) + { + const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions(); + ULONG nCntrl = pEditEngine->GetControlWord(); + // turn off + if (!pVOpt->IsOnlineSpell()) + nCntrl &= ~EE_CNTRL_ONLINESPELLING; else - SwLangHelper::SetLanguage_None( rSh, pEditEngine, aSelection, bForSelection, aEditAttr ); + nCntrl &= ~EE_CNTRL_ONLINESPELLING; + pEditEngine->SetControlWord(nCntrl); - // ugly hack, as it seems that EditView/EditEngine does not update their spellchecking marks - // when setting a new language attribute - if (bForSelection) - { - const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions(); - ULONG nCntrl = pEditEngine->GetControlWord(); - // turn off - if (!pVOpt->IsOnlineSpell()) - nCntrl &= ~EE_CNTRL_ONLINESPELLING; - else - nCntrl &= ~EE_CNTRL_ONLINESPELLING; - pEditEngine->SetControlWord(nCntrl); - - //turn back on - if (pVOpt->IsOnlineSpell()) - nCntrl |= EE_CNTRL_ONLINESPELLING; - else - nCntrl &= ~EE_CNTRL_ONLINESPELLING; - pEditEngine->SetControlWord(nCntrl); - - pEditEngine->CompleteOnlineSpelling(); - rEditView.Invalidate(); - } + //turn back on + if (pVOpt->IsOnlineSpell()) + nCntrl |= EE_CNTRL_ONLINESPELLING; + else + nCntrl &= ~EE_CNTRL_ONLINESPELLING; + pEditEngine->SetControlWord(nCntrl); - if (!bForSelection) - { - // need to release view and restore selection... - rSh.Pop( FALSE ); - rSh.LockView( FALSE ); - rSh.EndAction(); - } + pEditEngine->CompleteOnlineSpelling(); + rEditView.Invalidate(); + } + + if (!bForSelection) + { + // need to release view and restore selection... + rSh.Pop( FALSE ); + rSh.LockView( FALSE ); + rSh.EndAction(); } } + } - // invalidate slot to get the new language displayed - pViewFrame->GetBindings().Invalidate( rReq.GetSlot() ); + // invalidate slot to get the new language displayed + pViewFrame->GetBindings().Invalidate( rReq.GetSlot() ); - rReq.Done(); - return bRestoreSelection; + rReq.Done(); + return bRestoreSelection; } - void SetLanguage(SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet) + void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ) { - SetLanguage(rWrtSh,0,ESelection(),rLangText,bIsForSelection,rCoreSet); + SetLanguage( rWrtSh, 0 , ESelection(), rLangText, bIsForSelection, rCoreSet ); } - void SetLanguage(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet) + void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ) { const LanguageType nLang = SvtLanguageTable().GetType( rLangText ); if (nLang != LANGUAGE_DONTKNOW) { USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ); + EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL; + DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" ); + //get ScriptType USHORT nLangWhichId = 0; bool bIsSingleScriptType = true; @@ -267,6 +274,9 @@ namespace SwLangHelper } if (bIsSingleScriptType) { + // change language for selection or paragraph + // (for paragraph is handled by previosuly having set the selection to the + // whole paragraph) if (bIsForSelection) { // apply language to current selection @@ -282,7 +292,7 @@ namespace SwLangHelper rWrtSh.SetAttr( rCoreSet ); } } - else // change document language + else // change language for all text { // set document default language switch (nLangWhichId) @@ -303,12 +313,12 @@ namespace SwLangHelper } } - void SetLanguage_None(SwWrtShell &rWrtSh,bool bIsForSelection, SfxItemSet &rCoreSet ) + void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet ) { - SetLanguage_None(rWrtSh,0,ESelection(),bIsForSelection,rCoreSet); + SetLanguage_None( rWrtSh,0,ESelection(),bIsForSelection,rCoreSet ); } - void SetLanguage_None(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ) + void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ) { // EditEngine IDs const USHORT aLangWhichId_EE[3] = @@ -328,7 +338,12 @@ namespace SwLangHelper if (bIsForSelection) { - // apply language to current selection + // change language for selection or paragraph + // (for paragraph is handled by previosuly having set the selection to the + // whole paragraph) + + EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL; + DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" ); if (pEditEngine) { for (sal_uInt16 i = 0; i < 3; ++i) @@ -343,7 +358,7 @@ namespace SwLangHelper rWrtSh.SetAttr( rCoreSet ); } } - else // change document language + else // change language for all text { SvUShortsSort aAttribs; for (sal_uInt16 i = 0; i < 3; ++i) @@ -358,6 +373,39 @@ namespace SwLangHelper } } + void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection ) + { + ResetLanguages( rWrtSh, 0 , ESelection(), bIsForSelection ); + } + + void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection ) + { + (void) bIsForSelection; + (void) aSelection; + + // reset language for current selection. + // The selection should already have been expanded to the whole paragraph or + // to all text in the document if those are the ranges where to reset + // the language attributes + + if (pOLV) + { + EditView &rEditView = pOLV->GetEditView(); + rEditView.RemoveAttribs( true, EE_CHAR_LANGUAGE ); + rEditView.RemoveAttribs( true, EE_CHAR_LANGUAGE_CJK ); + rEditView.RemoveAttribs( true, EE_CHAR_LANGUAGE_CTL ); + } + else + { + SvUShortsSort aAttribs; + aAttribs.Insert( RES_CHRATR_LANGUAGE ); + aAttribs.Insert( RES_CHRATR_CJK_LANGUAGE ); + aAttribs.Insert( RES_CHRATR_CTL_LANGUAGE ); + rWrtSh.ResetAttr( &aAttribs ); + } + } + + /// @returns : the language for the selected text that is set for the /// specified attribute (script type). /// If there are more than one languages used LANGUAGE_DONTKNOW will be returned. @@ -453,7 +501,7 @@ namespace SwLangHelper /// 'In use' means the language(s) matching the script type(s) of the /// selected text. Or in other words, the language a spell checker would use. /// If there is more than one language LANGUAGE_DONTKNOW will be returned. - LanguageType GetCurrentLanguage(SfxItemSet aSet,USHORT nScriptType ) + LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType ) { //set language attribute to use according to the script type USHORT nLangWhichId = 0; @@ -520,7 +568,7 @@ namespace SwLangHelper return aText; } - String GetTextForLanguageGuessing(EditEngine* rEditEngine, ESelection aDocSelection ) + String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection ) { // string for guessing language String aText; diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 77de4c0821ff..736221981631 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -341,6 +341,7 @@ void SwTextShell::Execute(SfxRequest &rReq) const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") ); const String aDocumentLangPrefix( String::CreateFromAscii("Default_") ); const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") ); + const String aStrResetLangs( String::CreateFromAscii("RESET_LANGUAGES") ); SfxItemSet aCoreSet( GetPool(), RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE, @@ -379,10 +380,12 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.SelAll(); rWrtSh.ExtendedSelectAll(); } - if (aNewLangTxt != aStrNone) - SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet ); - else + if (aNewLangTxt == aStrNone) SwLangHelper::SetLanguage_None( rWrtSh, bForSelection, aCoreSet ); + else if (aNewLangTxt == aStrResetLangs) + SwLangHelper::ResetLanguages( rWrtSh, bForSelection ); + else + SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet ); } // restore selection... -- cgit v1.2.3 From 7c6655e920297562e6bc00da82fd9eed49a2bfd6 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 19 Oct 2009 08:13:03 +0000 Subject: #106019# 'reset languages' menu entry --- sw/sdi/swslots.src | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 sw/sdi/swslots.src diff --git a/sw/sdi/swslots.src b/sw/sdi/swslots.src deleted file mode 100644 index f094994b2c2a..000000000000 --- a/sw/sdi/swslots.src +++ /dev/null @@ -1,35 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: swslots.src,v $ - * $Revision: 1.133 $ - * - * 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 "cmdid.h" -#include "svx/svxids.hrc" -#include "globals.hrc" - -//! this file is supposed not to be needed anymore... lets try... - -- cgit v1.2.3 From 607673f3238bfc80ad90c74e2fd85038eece7892 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 19 Oct 2009 08:35:55 +0000 Subject: #106019# 'reset languages' menu entry --- svx/inc/svx/svxids.hrc | 1 + 1 file changed, 1 insertion(+) diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index 900250a4ed8b..dfe174b4e26e 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -398,6 +398,7 @@ #define FN_INSERT_HARD_SPACE (FN_INSERT + 44) /* hard space */ #define FN_INSERT_HARDHYPHEN (FN_INSERT + 85) /* hyphen withou break*/ +//!! be aware to not overwrite something that is used in sw/inc/cmdid.h already !! #define FN_FORMAT (SID_SW_START + 400) #define FN_SET_JUSTIFY_PARA (FN_FORMAT + 21) #define FN_FORMAT_RESET (FN_FORMAT + 69) -- cgit v1.2.3 From 00212019d055f897eb78fc13e54259d903d896ab Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Thu, 29 Oct 2009 17:19:58 +0100 Subject: applied patch for #i106057# --- sw/source/filter/ww8/wrtww8.cxx | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 6601f874c60f..2f9619151378 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2664,19 +2664,24 @@ void WW8Export::WriteFkpPlcUsw() // Write SttbfAssoc WW8SttbAssoc * pSttbfAssoc = dynamic_cast (pDoc->getExternalData(::sw::STTBF_ASSOC).get()); - ::std::vector aStrings; - - ::ww8::StringVector_t & aSttbStrings = pSttbfAssoc->getStrings(); - ::ww8::StringVector_t::const_iterator aItEnd = aSttbStrings.end(); - for (::ww8::StringVector_t::const_iterator aIt = aSttbStrings.begin(); - aIt != aItEnd; aIt++) + // --> OD 2009-10-19 #i106057# + if ( pSttbfAssoc ) + // <-- { - String aStr(aIt->getStr()); - aStrings.push_back(aStr); - } + ::std::vector aStrings; - WriteAsStringTable(aStrings, pFib->fcSttbfAssoc, - pFib->lcbSttbfAssoc); + ::ww8::StringVector_t & aSttbStrings = pSttbfAssoc->getStrings(); + ::ww8::StringVector_t::const_iterator aItEnd = aSttbStrings.end(); + for (::ww8::StringVector_t::const_iterator aIt = aSttbStrings.begin(); + aIt != aItEnd; aIt++) + { + String aStr(aIt->getStr()); + aStrings.push_back(aStr); + } + + WriteAsStringTable(aStrings, pFib->fcSttbfAssoc, + pFib->lcbSttbfAssoc); + } } Strm().Seek( 0 ); @@ -2685,10 +2690,15 @@ void WW8Export::WriteFkpPlcUsw() ::ww8::WW8FibData * pFibData = dynamic_cast (pDoc->getExternalData(::sw::FIB).get()); - pFib->fReadOnlyRecommended = - pFibData->getReadOnlyRecommended() ? 1 : 0; - pFib->fWriteReservation = - pFibData->getWriteReservation() ? 1 : 0; + // --> OD 2009-10-19 #i106057# + if ( pFibData ) + // <-- + { + pFib->fReadOnlyRecommended = + pFibData->getReadOnlyRecommended() ? 1 : 0; + pFib->fWriteReservation = + pFibData->getWriteReservation() ? 1 : 0; + } pFib->Write( Strm() ); // FIB } -- cgit v1.2.3 From 388486a510c8f5b04132a614fa5f2c330d229248 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Fri, 6 Nov 2009 10:10:07 +0000 Subject: #i106487# fix for unnecessary calls to timer --- starmath/source/edit.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index eea792904f48..d6414855f59d 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -122,8 +122,7 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) : SetBackground( GetSettings().GetStyleSettings().GetWindowColor() ); aModifyTimer.SetTimeoutHdl(LINK(this, SmEditWindow, ModifyTimerHdl)); - aModifyTimer.SetTimeout(2000); - aModifyTimer.Start(); + aModifyTimer.SetTimeout(500); aCursorMoveTimer.SetTimeoutHdl(LINK(this, SmEditWindow, CursorMoveTimerHdl)); aCursorMoveTimer.SetTimeout(500); @@ -256,7 +255,6 @@ IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ ) SmModule *pp = SM_MOD(); if (pp->GetConfig()->IsAutoRedraw()) Flush(); - aModifyTimer.Start(); return 0; } -- cgit v1.2.3 From b5587d29c621778d4d0adff9016cebb845b112b4 Mon Sep 17 00:00:00 2001 From: "Henning Brinkmann[hbrinkm]" Date: Fri, 13 Nov 2009 17:17:57 +0100 Subject: hb33patches1:#i59648# applied patch --- sw/source/filter/ww8/wrtww8gr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index aaafe0ee49fc..d85d391665d8 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -605,7 +605,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, substitute the final size and loose on retaining the scaling factor but still keep the correct display size anyway. */ - if ( (aGrTwipSz.Width() > USHRT_MAX) || (aGrTwipSz.Height() > USHRT_MAX) + if ( (aGrTwipSz.Width() > SHRT_MAX) || (aGrTwipSz.Height() > SHRT_MAX) || (aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0) ) { aGrTwipSz.Width() = nWidth; -- cgit v1.2.3 From 0a5e2fc8e92ac2775e10530ae230db69556f5047 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 20 Nov 2009 11:58:22 +0100 Subject: chartpositioning: #i100778# chart positioning excluding labels --- .../chartapiwrapper/Chart2ModelContact.cxx | 45 +- .../chartapiwrapper/Chart2ModelContact.hxx | 24 +- .../controller/chartapiwrapper/DiagramWrapper.cxx | 118 +-- .../controller/chartapiwrapper/DiagramWrapper.hxx | 18 +- chart2/source/controller/dialogs/ResourceIds.hrc | 1 + chart2/source/controller/dialogs/Strings.src | 5 + chart2/source/controller/dialogs/TabPages.hrc | 1 - .../controller/dialogs/dlg_ObjectProperties.cxx | 10 +- chart2/source/controller/dialogs/makefile.mk | 2 + .../controller/dialogs/tp_DiagramPosition.cxx | 788 +++++++++++++++++++++ .../controller/dialogs/tp_DiagramPosition.hrc | 51 ++ .../controller/dialogs/tp_DiagramPosition.hxx | 140 ++++ .../controller/dialogs/tp_DiagramPosition.src | 217 ++++++ .../controller/drawinglayer/DrawViewWrapper.cxx | 9 + .../source/controller/inc/DiagramItemConverter.hxx | 81 +++ .../itemsetwrapper/DiagramItemConverter.cxx | 226 ++++++ .../controller/itemsetwrapper/SchWhichPairs.hxx | 29 +- .../source/controller/itemsetwrapper/makefile.mk | 3 +- .../controller/main/ChartController_Position.cxx | 21 +- .../controller/main/ChartController_Properties.cxx | 4 + .../controller/main/ChartController_Tools.cxx | 1 + .../controller/main/PositionAndSizeHelper.cxx | 7 +- chart2/source/inc/DiagramHelper.hxx | 17 + chart2/source/inc/ObjectIdentifier.hxx | 2 +- chart2/source/inc/Strings.hrc | 2 +- chart2/source/inc/chartview/ChartSfxItemIds.hxx | 11 +- .../source/inc/chartview/ExplicitValueProvider.hxx | 6 +- chart2/source/model/main/Diagram.cxx | 9 + chart2/source/tools/DiagramHelper.cxx | 160 +++++ chart2/source/view/charttypes/PieChart.cxx | 14 +- chart2/source/view/charttypes/PieChart.hxx | 4 +- chart2/source/view/charttypes/VSeriesPlotter.cxx | 12 +- chart2/source/view/diagram/VDiagram.cxx | 8 +- chart2/source/view/inc/VSeriesPlotter.hxx | 4 +- chart2/source/view/main/ChartItemPool.cxx | 8 + chart2/source/view/main/ChartView.cxx | 173 ++++- chart2/source/view/main/ChartView.hxx | 10 +- 37 files changed, 2095 insertions(+), 146 deletions(-) create mode 100644 chart2/source/controller/dialogs/tp_DiagramPosition.cxx create mode 100644 chart2/source/controller/dialogs/tp_DiagramPosition.hrc create mode 100644 chart2/source/controller/dialogs/tp_DiagramPosition.hxx create mode 100644 chart2/source/controller/dialogs/tp_DiagramPosition.src create mode 100644 chart2/source/controller/inc/DiagramItemConverter.hxx create mode 100644 chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index 3d930f72f0af..aaebdb663120 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -41,6 +41,7 @@ #include "chartview/ExplicitValueProvider.hxx" #include "chartview/DrawModelWrapper.hxx" #include "AxisHelper.hxx" +#include "DiagramHelper.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; @@ -195,30 +196,50 @@ awt::Size Chart2ModelContact::GetPageSize() const return ChartModelHelper::getPageSize(m_xChartModel); } -awt::Rectangle Chart2ModelContact::GetDiagramRectangleInclusive() const +awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingTitle() const { - awt::Rectangle aRect; + awt::Rectangle aRect( GetDiagramRectangleIncludingAxes() ); - ExplicitValueProvider* pProvider( getExplicitValueProvider() ); - if( pProvider ) - { - aRect = pProvider->getRectangleOfObject( lcl_getCIDForDiagram( m_xChartModel ) ); - } //add axis title sizes to the diagram size - aRect = ExplicitValueProvider::calculateDiagramPositionAndSizeInclusiveTitle( + aRect = ExplicitValueProvider::calculateDiagramPositionAndSizeIncludingTitle( m_xChartModel, m_xChartView, aRect ); return aRect; } -awt::Size Chart2ModelContact::GetDiagramSizeInclusive() const +awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingAxes() const +{ + awt::Rectangle aRect(0,0,0,0); + uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartModel ) ); + + if( DiagramPositioningMode_INCLUDING == DiagramHelper::getDiagramPositioningMode( xDiagram ) ) + aRect = DiagramHelper::getDiagramRectangleFromModel(m_xChartModel); + else + { + ExplicitValueProvider* pProvider( getExplicitValueProvider() ); + if( pProvider ) + aRect = pProvider->getRectangleOfObject( C2U("PlotAreaIncludingAxes") ); + } + return aRect; +} + +awt::Rectangle Chart2ModelContact::GetDiagramRectangleExcludingAxes() const +{ + awt::Rectangle aRect; + ExplicitValueProvider* pProvider( getExplicitValueProvider() ); + if( pProvider ) + aRect = pProvider->getDiagramRectangleExcludingAxes(); + return aRect; +} + +awt::Size Chart2ModelContact::GetDiagramSizeIncludingTitle() const { - return ToSize( this->GetDiagramRectangleInclusive() ); + return ToSize( this->GetDiagramRectangleIncludingTitle() ); } -awt::Point Chart2ModelContact::GetDiagramPositionInclusive() const +awt::Point Chart2ModelContact::GetDiagramPositionIncludingTitle() const { - return ToPoint( this->GetDiagramRectangleInclusive() ); + return ToPoint( this->GetDiagramRectangleIncludingTitle() ); } awt::Size Chart2ModelContact::GetLegendSize() const diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx index 0cc8a16bafff..10a02a724e90 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx @@ -96,15 +96,30 @@ public: */ ::com::sun::star::awt::Size GetPageSize() const; - /** Returns the size of the diagram object in logic coordinates inclusive + /** Returns the size of the diagram object in logic coordinates including the space reserved for axis titles. */ - ::com::sun::star::awt::Size GetDiagramSizeInclusive() const; + ::com::sun::star::awt::Size GetDiagramSizeIncludingTitle() const; - /** Returns the position of the diagram in logic coordinates inclusive + /** Returns the position of the diagram in logic coordinates including the space reserved for axis titles. */ - ::com::sun::star::awt::Point GetDiagramPositionInclusive() const; + ::com::sun::star::awt::Point GetDiagramPositionIncludingTitle() const; + + /** Returns the position and size of the diagram in logic coordinates (100th mm) including + the space used for axes including axes titles. + */ + ::com::sun::star::awt::Rectangle GetDiagramRectangleIncludingTitle() const; + + /** Returns the position and size of the diagram in logic coordinates (100th mm) including + the space used for axes excluding axes titles. + */ + ::com::sun::star::awt::Rectangle GetDiagramRectangleIncludingAxes() const; + + /** Returns the position and size of the diagram in logic coordinates (100th mm) excluding + the space used for axes (inner plot area). + */ + ::com::sun::star::awt::Rectangle GetDiagramRectangleExcludingAxes() const; /** Returns the size of the object in logic coordinates. */ @@ -137,7 +152,6 @@ public: private: //methods ExplicitValueProvider* getExplicitValueProvider() const; - ::com::sun::star::awt::Rectangle GetDiagramRectangleInclusive() const; public: //member ::com::sun::star::uno::Reference< diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 4a02d9aa99e5..1b03108d0aa7 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -740,29 +740,7 @@ Reference< awt::Point SAL_CALL DiagramWrapper::getPosition() throw (uno::RuntimeException) { - awt::Point aPosition; - - Reference< beans::XPropertySet > xProp( this->getInnerPropertySet() ); - if( xProp.is() ) - { - bool bSet = false; - chart2::RelativePosition aRelativePosition; - uno::Any aAPosition( xProp->getPropertyValue( C2U( "RelativePosition" ) ) ); - if( aAPosition >>= aRelativePosition ) - { - awt::Size aPageSize( m_spChart2ModelContact->GetPageSize() ); - aPosition.X = static_cast(aRelativePosition.Primary*aPageSize.Width); - aPosition.Y = static_cast(aRelativePosition.Secondary*aPageSize.Height); - - aPosition = RelativePositionHelper::getUpperLeftCornerOfAnchoredObject( - aPosition, DiagramWrapper::getSize(), aRelativePosition.Anchor ); - - bSet = true; - } - if(!bSet) - aPosition = m_spChart2ModelContact->GetDiagramPositionInclusive(); - } - + awt::Point aPosition = m_spChart2ModelContact->GetDiagramPositionIncludingTitle(); return aPosition; } @@ -792,31 +770,14 @@ void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition ) aRelativePosition.Primary = double(aPosition.X)/double(aPageSize.Width); aRelativePosition.Secondary = double(aPosition.Y)/double(aPageSize.Height); xProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) ); + xProp->setPropertyValue( C2U( "PosSizeExcludeAxes" ), uno::makeAny(false) ); } } awt::Size SAL_CALL DiagramWrapper::getSize() throw (uno::RuntimeException) { - awt::Size aSize; - - Reference< beans::XPropertySet > xProp( this->getInnerPropertySet() ); - if( xProp.is() ) - { - bool bSet = false; - chart2::RelativeSize aRelativeSize; - uno::Any aASize( xProp->getPropertyValue( C2U( "RelativeSize" ) ) ); - if(aASize>>=aRelativeSize) - { - awt::Size aPageSize( m_spChart2ModelContact->GetPageSize() ); - aSize.Width = static_cast(aRelativeSize.Primary*aPageSize.Width); - aSize.Height = static_cast(aRelativeSize.Secondary*aPageSize.Height); - bSet = true; - } - if(!bSet) - aSize = m_spChart2ModelContact->GetDiagramSizeInclusive(); - } - + awt::Size aSize = m_spChart2ModelContact->GetDiagramSizeIncludingTitle(); return aSize; } @@ -847,6 +808,7 @@ void SAL_CALL DiagramWrapper::setSize( const awt::Size& aSize ) } xProp->setPropertyValue( C2U( "RelativeSize" ), uno::makeAny(aRelativeSize) ); + xProp->setPropertyValue( C2U( "PosSizeExcludeAxes" ), uno::makeAny(false) ); } } @@ -857,6 +819,78 @@ OUString SAL_CALL DiagramWrapper::getShapeType() return C2U( "com.sun.star.chart.Diagram" ); } +// ____ XDiagramPositioning ____ + +void SAL_CALL DiagramWrapper::setAutomaticDiagramPositioning() throw (uno::RuntimeException) +{ + uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); + if( xDiaProps.is() ) + { + xDiaProps->setPropertyValue( C2U( "RelativeSize" ), Any() ); + xDiaProps->setPropertyValue( C2U( "RelativePosition" ), Any() ); + } +} +::sal_Bool SAL_CALL DiagramWrapper::isAutomaticDiagramPositioning( ) throw (uno::RuntimeException) +{ + uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); + if( xDiaProps.is() ) + { + Any aRelativeSize( xDiaProps->getPropertyValue( C2U( "RelativeSize" ) ) ); + Any aRelativePosition( xDiaProps->getPropertyValue( C2U( "RelativePosition" ) ) ); + if( aRelativeSize.hasValue() && aRelativePosition.hasValue() ) + return false; + } + return true; +} +void SAL_CALL DiagramWrapper::setDiagramPositionExcludingAxes( const awt::Rectangle& rPositionRect ) throw (uno::RuntimeException) +{ + DiagramHelper::setDiagramPositioning( m_spChart2ModelContact->getChartModel(), rPositionRect ); + uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); + if( xDiaProps.is() ) + xDiaProps->setPropertyValue(C2U("PosSizeExcludeAxes"), uno::makeAny(true) ); +} +::sal_Bool SAL_CALL DiagramWrapper::isExcludingDiagramPositioning() throw (uno::RuntimeException) +{ + uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); + if( xDiaProps.is() ) + { + Any aRelativeSize( xDiaProps->getPropertyValue( C2U( "RelativeSize" ) ) ); + Any aRelativePosition( xDiaProps->getPropertyValue( C2U( "RelativePosition" ) ) ); + if( aRelativeSize.hasValue() && aRelativePosition.hasValue() ) + { + sal_Bool bPosSizeExcludeAxes = false; + xDiaProps->getPropertyValue( C2U( "PosSizeExcludeAxes" ) ) >>= bPosSizeExcludeAxes; + return bPosSizeExcludeAxes; + } + } + return false; +} +awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionExcludingAxes( ) throw (uno::RuntimeException) +{ + return m_spChart2ModelContact->GetDiagramRectangleExcludingAxes(); +} +void SAL_CALL DiagramWrapper::setDiagramPositionIncludingAxes( const awt::Rectangle& rPositionRect ) throw (uno::RuntimeException) +{ + DiagramHelper::setDiagramPositioning( m_spChart2ModelContact->getChartModel(), rPositionRect ); + uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); + if( xDiaProps.is() ) + xDiaProps->setPropertyValue(C2U("PosSizeExcludeAxes"), uno::makeAny(false) ); +} +awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxes( ) throw (uno::RuntimeException) +{ + return m_spChart2ModelContact->GetDiagramRectangleIncludingAxes(); +} +void SAL_CALL DiagramWrapper::setDiagramPositionIncludingAxesAndAxesTitles( const awt::Rectangle& rPositionRect ) throw (uno::RuntimeException) +{ + setPosition( awt::Point(rPositionRect.X,rPositionRect.Y) ); + setSize( awt::Size(rPositionRect.Width,rPositionRect.Height) ); + +} +::com::sun::star::awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxesAndAxesTitles( ) throw (::com::sun::star::uno::RuntimeException) +{ + return m_spChart2ModelContact->GetDiagramRectangleIncludingTitle(); +} + // ____ XAxisZSupplier ____ Reference< drawing::XShape > SAL_CALL DiagramWrapper::getZAxisTitle() diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx index b69a856a557f..1594f30ae631 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx @@ -33,12 +33,13 @@ #include "WrappedPropertySet.hxx" #include "ServiceMacros.hxx" #include "DiagramHelper.hxx" -#include +#include #include #include #include #include #include +#include #include #include #include @@ -64,7 +65,7 @@ namespace wrapper class Chart2ModelContact; -class DiagramWrapper : public ::cppu::ImplInheritanceHelper11< +class DiagramWrapper : public ::cppu::ImplInheritanceHelper12< WrappedPropertySet , ::com::sun::star::chart::XDiagram , ::com::sun::star::chart::XAxisZSupplier @@ -76,6 +77,7 @@ class DiagramWrapper : public ::cppu::ImplInheritanceHelper11< , ::com::sun::star::lang::XServiceInfo , ::com::sun::star::lang::XComponent // , ::com::sun::star::lang::XEventListener + , ::com::sun::star::chart::XDiagramPositioning , ::com::sun::star::chart2::XDiagramProvider , ::com::sun::star::chart::XSecondAxisTitleSupplier > @@ -212,6 +214,18 @@ public: // virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) // throw (::com::sun::star::uno::RuntimeException); + // ____ XDiagramPositioning ____ + + virtual void SAL_CALL setAutomaticDiagramPositioning( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isAutomaticDiagramPositioning( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDiagramPositionExcludingAxes( const ::com::sun::star::awt::Rectangle& PositionRect ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isExcludingDiagramPositioning( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL calculateDiagramPositionExcludingAxes( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDiagramPositionIncludingAxes( const ::com::sun::star::awt::Rectangle& PositionRect ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL calculateDiagramPositionIncludingAxes( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDiagramPositionIncludingAxesAndAxesTitles( const ::com::sun::star::awt::Rectangle& PositionRect ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL calculateDiagramPositionIncludingAxesAndAxesTitles( ) throw (::com::sun::star::uno::RuntimeException); + // ____ XDiagramProvider ____ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > SAL_CALL getDiagram() diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc index 8674aba240da..fbb92e4b9c15 100644 --- a/chart2/source/controller/dialogs/ResourceIds.hrc +++ b/chart2/source/controller/dialogs/ResourceIds.hrc @@ -64,6 +64,7 @@ #define TP_AXIS_LABEL 920 #define TP_SCALE 903 #define TP_AXIS_POSITIONS 904 +#define TP_DIAGRAM_POSITION 905 #define TP_CHARTTYPE 910 #define TP_RANGECHOOSER 911 #define TP_WIZARD_TITLEANDOBJECTS 912 diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src index b7ef643e3ff3..ad512f8fad77 100644 --- a/chart2/source/controller/dialogs/Strings.src +++ b/chart2/source/controller/dialogs/Strings.src @@ -124,6 +124,11 @@ String STR_PAGE_POSITIONING Text [ en-US ] = "Positioning" ; }; +String STR_PAGE_POSITIONANDSIZE +{ + Text [ en-US ] = "Position and Size" ; +}; + // String STR_PAGE_STATISTICS // { // Text [ en-US ] = "Statistics" ; diff --git a/chart2/source/controller/dialogs/TabPages.hrc b/chart2/source/controller/dialogs/TabPages.hrc index 8c92c062ad14..4dcf588758d6 100644 --- a/chart2/source/controller/dialogs/TabPages.hrc +++ b/chart2/source/controller/dialogs/TabPages.hrc @@ -49,7 +49,6 @@ ////#define RBT_DOWNUP 3 ////#define RBT_AUTOORDER 4 -//#define TP_STAT 905 #define FL_TEXTBREAK 3 #define CBX_TEXTBREAK 2 #define CBX_TEXTOVERLAP 4 diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 097c6c1d0107..66083180d19e 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -52,6 +52,7 @@ #include "tp_SeriesToAxis.hxx" #include "tp_TitleRotation.hxx" #include "tp_PolarOptions.hxx" +#include "tp_DiagramPosition.hxx" #include "ResId.hxx" #include "ViewElementListProvider.hxx" #include "macros.hxx" @@ -249,6 +250,9 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel else m_aLocalizedName = ObjectNameProvider::getName_ObjectForSeries( m_eObjectType, m_aObjectCID, m_xChartDocument ); break; + case OBJECTTYPE_DIAGRAM: + m_aLocalizedName = String(SchResId(STR_PAGE_POSITIONANDSIZE)); + break; default: m_aLocalizedName = ObjectNameProvider::getName(m_eObjectType,m_bAffectsMultipleObjects); break; @@ -462,12 +466,14 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent, AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE))); break; + case OBJECTTYPE_DIAGRAM: + AddTabPage(TP_DIAGRAM_POSITION, String(SchResId(STR_PAGE_POSITIONANDSIZE)), DiagramPositionTabPage::Create, NULL); + break; + case OBJECTTYPE_DIAGRAM_WALL: case OBJECTTYPE_DATA_STOCK_LOSS: case OBJECTTYPE_DATA_STOCK_GAIN: case OBJECTTYPE_PAGE: case OBJECTTYPE_DIAGRAM_FLOOR: - case OBJECTTYPE_DIAGRAM_WALL: - case OBJECTTYPE_DIAGRAM: AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER))); AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA))); AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY))); diff --git a/chart2/source/controller/dialogs/makefile.mk b/chart2/source/controller/dialogs/makefile.mk index 6b64f2cae8db..65dd6aa2545c 100644 --- a/chart2/source/controller/dialogs/makefile.mk +++ b/chart2/source/controller/dialogs/makefile.mk @@ -71,6 +71,7 @@ SLOFILES= \ $(SLO)$/tp_RangeChooser.obj \ $(SLO)$/tp_Wizard_TitlesAndObjects.obj \ $(SLO)$/tp_Location.obj \ + $(SLO)$/tp_DiagramPosition.obj \ $(SLO)$/tp_AxisLabel.obj \ $(SLO)$/tp_AxisPositions.obj \ $(SLO)$/tp_DataLabel.obj \ @@ -121,6 +122,7 @@ SRC1FILES= \ tp_RangeChooser.src \ tp_Wizard_TitlesAndObjects.src \ tp_Location.src \ + tp_DiagramPosition.src \ tp_AxisLabel.src \ tp_AxisPositions.src \ tp_DataLabel.src \ diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.cxx b/chart2/source/controller/dialogs/tp_DiagramPosition.cxx new file mode 100644 index 000000000000..ff9b6e23cfd7 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.cxx @@ -0,0 +1,788 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tp_DiagramPosition.cxx,v $ + * $Revision: 1.13 $ + * + * 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_chart2.hxx" +#include "tp_DiagramPosition.hxx" +#include "tp_DiagramPosition.hrc" + +#include "DiagramHelper.hxx" +#include "ResId.hxx" +#include "chartview/ChartSfxItemIds.hxx" + +#include +#include +//GetModuleFieldUnit +#include +#include +#include +// header for class SvxDoubleItem +#include + +using namespace ::com::sun::star; + +//............................................................................. +namespace chart +{ +//............................................................................. + +void lcl_ConvertRect(basegfx::B2DRange& rRange, const sal_uInt16 nDigits, const MapUnit ePoolUnit, const FieldUnit eDlgUnit) +{ + const basegfx::B2DPoint aTopLeft( + (double)MetricField::ConvertValue(basegfx::fround(rRange.getMinX()), nDigits, ePoolUnit, eDlgUnit), + (double)MetricField::ConvertValue(basegfx::fround(rRange.getMinY()), nDigits, ePoolUnit, eDlgUnit)); + const basegfx::B2DPoint aBottomRight( + (double)MetricField::ConvertValue(basegfx::fround(rRange.getMaxX()), nDigits, ePoolUnit, eDlgUnit), + (double)MetricField::ConvertValue(basegfx::fround(rRange.getMaxY()), nDigits, ePoolUnit, eDlgUnit)); + + rRange = basegfx::B2DRange(aTopLeft, aBottomRight); +} + +void lcl_ScaleRect(basegfx::B2DRange& rRange, const Fraction aUIScale) +{ + const double fFactor(1.0 / double(aUIScale)); + rRange = basegfx::B2DRange(rRange.getMinimum() * fFactor, rRange.getMaximum() * fFactor); +} + +DiagramPositionTabPage::DiagramPositionTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : + SvxTabPage ( pParent, SchResId( TP_DIAGRAM_POSITION ), rInAttrs ), + + m_aFlPosMode( this, SchResId( FL_POSITIONING_MODE ) ), + + m_aRbPosMode_Auto( this, SchResId( RB_POSITIONING_MODE_AUTOMATIC ) ), + m_aRbPosMode_Including( this, SchResId( RB_POSITIONING_MODE_INCLUDING ) ), + m_aRbPosMode_Excluding( this, SchResId( RB_POSITIONING_MODE_EXCLUDING ) ), + + maFlPosition ( this, SchResId( FL_POSITION ) ), + maFtPosX ( this, SchResId( FT_POS_X ) ), + maMtrPosX ( this, SchResId( MTR_FLD_POS_X ) ), + maFtPosY ( this, SchResId( FT_POS_Y ) ), + maMtrPosY ( this, SchResId( MTR_FLD_POS_Y ) ), + maFtPosReference ( this, SchResId( FT_POSREFERENCE ) ), + maCtlPos ( this, SchResId( CTL_POSRECT ), RP_LT ), + + maFlSize ( this, SchResId( FL_SIZE ) ), + maFtWidth ( this, SchResId( FT_WIDTH ) ), + maMtrWidth ( this, SchResId( MTR_FLD_WIDTH ) ), + maFtHeight ( this, SchResId( FT_HEIGHT ) ), + maMtrHeight ( this, SchResId( MTR_FLD_HEIGHT ) ), + maCbxScale ( this, SchResId( CBX_SCALE ) ), + maFtSizeReference ( this, SchResId( FT_SIZEREFERENCE) ), + maCtlSize ( this, SchResId( CTL_SIZERECT ), RP_LT ), + m_aExcludingRect(1,2,3,4), + m_aIncludingRect(1,2,3,4), + m_aMaxRect(1,2,3,4), + m_fUIScale( 1.0 ), + m_aCurrentRect(1,2,3,4), + m_bRectChangedByUser( false ) +{ + FreeResource(); + + // this pege needs ExchangeSupport + // SetExchangeSupport(); + + // evaluate PoolUnit + SfxItemPool* pPool = rInAttrs.GetPool(); + DBG_ASSERT( pPool, "no pool (!)" ); + mePoolUnit = pPool->GetMetric( SID_ATTR_TRANSFORM_POS_X ); + + Construct(); + + m_aRbPosMode_Auto.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); + m_aRbPosMode_Including.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); + m_aRbPosMode_Excluding.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); + + maMtrPosX.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangePosXHdl ) ); + maMtrPosY.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangePosYHdl ) ); + + maMtrWidth.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangeWidthHdl ) ); + maMtrHeight.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangeHeightHdl ) ); + maCbxScale.SetClickHdl( LINK( this, DiagramPositionTabPage, ClickScaleHdl ) ); +} + +// ----------------------------------------------------------------------- + +void DiagramPositionTabPage::Construct() +{ + // get range and work area + meDlgUnit = GetModuleFieldUnit( &GetItemSet() ); + SetFieldUnit( maMtrPosX, meDlgUnit, TRUE ); + SetFieldUnit( maMtrPosY, meDlgUnit, TRUE ); + SetFieldUnit( maMtrWidth, meDlgUnit, TRUE ); + SetFieldUnit( maMtrHeight, meDlgUnit, TRUE ); + + if(FUNIT_MILE == meDlgUnit || FUNIT_KM == meDlgUnit) + { + maMtrPosX.SetDecimalDigits( 3 ); + maMtrPosY.SetDecimalDigits( 3 ); + maMtrWidth.SetDecimalDigits( 3 ); + maMtrHeight.SetDecimalDigits( 3 ); + } +} + +// ----------------------------------------------------------------------- + +void DiagramPositionTabPage::Reset( const SfxItemSet& rInAttrs ) +{ + //positioning mode + DiagramPositioningMode ePos = DiagramPositioningMode_AUTO; + const SfxPoolItem* pItem = NULL; + if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_POS_MODE, TRUE, &pItem ) == SFX_ITEM_SET ) + ePos = DiagramPositioningMode(((const SfxInt32Item*)pItem)->GetValue()); + if( ePos == DiagramPositioningMode_AUTO ) + m_aRbPosMode_Auto.Check(); + else if( ePos == DiagramPositioningMode_INCLUDING ) + m_aRbPosMode_Including.Check(); + else if( ePos == DiagramPositioningMode_EXCLUDING ) + m_aRbPosMode_Excluding.Check(); + + ReleaseBorders(); + maCtlPos.Reset(); + maCtlSize.Reset(); + + //rectangles + if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_RECT_MAX, TRUE, &pItem ) == SFX_ITEM_SET ) + { + m_aMaxRect = ((const SfxRectangleItem*)pItem)->GetValue(); + SetRectIn100thmm( m_aMaxRect ); + m_aMaxRect = GetRectIn100thmm(); + } + + if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_RECT_EXCLUDING, TRUE, &pItem ) == SFX_ITEM_SET ) + { + m_aExcludingRect = ((const SfxRectangleItem*)pItem)->GetValue(); + SetRectIn100thmm( m_aExcludingRect ); + m_aExcludingRect = GetRectIn100thmm(); + } + + if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_RECT_INCLUDING, TRUE, &pItem ) == SFX_ITEM_SET ) + { + m_aIncludingRect = ((const SfxRectangleItem*)pItem)->GetValue(); + SetRectIn100thmm( m_aIncludingRect ); + m_aIncludingRect = GetRectIn100thmm(); + } + + if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_UI_SCALE, TRUE, &pItem ) == SFX_ITEM_SET ) + m_fUIScale = ((const SvxDoubleItem*)pItem)->GetValue(); + + m_aCurrentRect = m_aIncludingRect; + if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_RECT_TO_USE, TRUE, &pItem ) == SFX_ITEM_SET ) + { + m_aCurrentRect = ((const SfxRectangleItem*)pItem)->GetValue(); + SetRectIn100thmm( m_aCurrentRect ); + m_aCurrentRect = GetRectIn100thmm(); + } + + // scale + String aStr = GetUserData(); + maCbxScale.Check( (BOOL)aStr.ToInt32() ); + mfScaleSizeX = std::max( (double)GetCoreValue( maMtrWidth, mePoolUnit ), 1.0 ); + mfScaleSizeY = std::max( (double)GetCoreValue( maMtrHeight, mePoolUnit ), 1.0 ); + + + m_bRectChangedByUser = false; + SetMinMaxPosition(); + UpdateControlStates(); +} + +// ----------------------------------------------------------------------- + +BOOL DiagramPositionTabPage::FillItemSet( SfxItemSet& rOutAttrs ) +{ + BOOL bModified(TRUE); + + //positioning mode + sal_Int32 nMode = 0; + if( m_aRbPosMode_Including.IsChecked() ) + nMode = 1; + else if( m_aRbPosMode_Excluding.IsChecked() ) + nMode = 2; + rOutAttrs.Put( SfxInt32Item( SCHATTR_DIAGRAM_POS_MODE, nMode ) ); + + rOutAttrs.Put( SfxRectangleItem( SCHATTR_DIAGRAM_RECT_TO_USE, GetRectIn100thmm() ) ); + + return bModified; +} + +// ----------------------------------------------------------------------- + +SfxTabPage* DiagramPositionTabPage::Create( Window* pWindow, const SfxItemSet& rOutAttrs ) +{ + return( new DiagramPositionTabPage( pWindow, rOutAttrs ) ); +} + +//------------------------------------------------------------------------ + +void DiagramPositionTabPage::ActivatePage( const SfxItemSet& /*rSet*/ ) +{ +} + +// ----------------------------------------------------------------------- + +int DiagramPositionTabPage::DeactivatePage( SfxItemSet* pItemSet ) +{ + if( pItemSet ) + FillItemSet( *pItemSet ); + return LEAVE_PAGE; +} + +//------------------------------------------------------------------------ + +long DiagramPositionTabPage::get1oothMMPosValue( MetricField& rField ) +{ + double fValue( GetCoreValue( rField, mePoolUnit ) * m_fUIScale); + return basegfx::fround(fValue); +} + +long DiagramPositionTabPage::get1oothMMSizeValue( MetricField& rField ) +{ + double fValue = static_cast(rField.GetValue( meDlgUnit )); + fValue = MetricField::ConvertDoubleValue( fValue, rField.GetBaseValue(), rField.GetDecimalDigits(), meDlgUnit, FUNIT_100TH_MM ); + long nValue = long(fValue*m_fUIScale); + nValue = OutputDevice::LogicToLogic( nValue, MAP_100TH_MM, (MapUnit)mePoolUnit ); + nValue = static_cast(rField.Denormalize( nValue )); + return nValue; +} + +/* +const double fTmp((((const SfxInt32Item*)pItem)->GetValue() - maAnchor.getY()) / fUIScale); +SetMetricValue(maMtrPosY, basegfx::fround(fTmp), mePoolUnit); + sal_Int64 nVal = OutputDevice::LogicToLogic( nCoreValue, (MapUnit)eUnit, MAP_100TH_MM ); + nVal = rField.Normalize( nVal ); + rField.SetValue( nVal, FUNIT_100TH_MM ); + */ + +void DiagramPositionTabPage::set1oothMMPosValue( MetricField& rField, long n100thMM ) +{ + const double fTmp( n100thMM / m_fUIScale ); + SetMetricValue(rField, basegfx::fround(fTmp), mePoolUnit); +} +void DiagramPositionTabPage::set1oothMMSizeValue( MetricField& rField, long n100thMM ) +{ + double fValue((OutputDevice::LogicToLogic( n100thMM, (MapUnit)mePoolUnit, MAP_100TH_MM)) ); + fValue /= m_fUIScale; + if(rField.GetDecimalDigits()) + fValue *= pow(10.0, rField.GetDecimalDigits()); + fValue = MetricField::ConvertDoubleValue(fValue, rField.GetBaseValue(), rField.GetDecimalDigits(), FUNIT_100TH_MM, meDlgUnit); + rField.SetValue(static_cast(fValue), meDlgUnit); +} + +sal_Int64 DiagramPositionTabPage::convert1oothMMValueToFieldUnit( MetricField& rField, long n100thMM ) +{ + double fValue((OutputDevice::LogicToLogic( n100thMM, (MapUnit)mePoolUnit, MAP_100TH_MM)) ); + fValue /= m_fUIScale; + if(rField.GetDecimalDigits()) + fValue *= pow(10.0, rField.GetDecimalDigits()); + fValue = MetricField::ConvertDoubleValue(fValue, rField.GetBaseValue(), rField.GetDecimalDigits(), FUNIT_100TH_MM, meDlgUnit); + return basegfx::fround64(fValue); +} + +//------------------------------------------------------------------------ + +void DiagramPositionTabPage::SetRectIn100thmm( const Rectangle& rRect ) +{ + ReleaseBorders(); + + m_aCurrentRect = rRect; + long nLeft = m_aCurrentRect.Left(); + long nTop = m_aCurrentRect.Top(); + long nWidth = m_aCurrentRect.getWidth(); + long nHeight = m_aCurrentRect.getHeight(); + + switch ( maCtlPos.GetActualRP() ) + { + case RP_LT: + { + break; + } + case RP_MT: + { + nLeft += nWidth / 2; + break; + } + case RP_RT: + { + nLeft += nWidth; + break; + } + case RP_LM: + { + nTop += nHeight / 2; + break; + } + case RP_MM: + { + nLeft += nWidth / 2; + nTop += nHeight / 2; + break; + } + case RP_RM: + { + nLeft += nWidth; + nTop += nHeight / 2; + break; + } + case RP_LB: + { + nTop += nHeight; + break; + } + case RP_MB: + { + nLeft += nWidth / 2; + nTop += nHeight; + break; + } + case RP_RB: + { + nLeft += nWidth; + nTop += nHeight; + break; + } + } + + set1oothMMPosValue( maMtrPosX, nLeft ); + set1oothMMPosValue( maMtrPosY, nTop ); + set1oothMMSizeValue( maMtrWidth, nWidth ); + set1oothMMSizeValue( maMtrHeight, nHeight ); + + SetMinMaxPosition(); +} + +//------------------------------------------------------------------------ + +Rectangle DiagramPositionTabPage::GetRectIn100thmm() +{ + long nX = get1oothMMPosValue( maMtrPosX ); + long nY = get1oothMMPosValue( maMtrPosY ); + long nWidth = get1oothMMSizeValue( maMtrWidth ); + long nHeight = get1oothMMSizeValue( maMtrHeight ); + + switch( maCtlPos.GetActualRP() ) + { + case RP_LT: + { + break; + } + case RP_MT: + { + nX -= nWidth/2; + break; + } + case RP_RT: + { + nX -= nWidth; + break; + } + case RP_LM: + { + nY -= nHeight/2; + break; + } + case RP_MM: + { + nX -= nWidth/2; + nY -= nHeight/2; + break; + } + case RP_RM: + { + nX -= nWidth; + nY -= nHeight/2; + break; + } + case RP_LB: + { + nY -= nHeight; + break; + } + case RP_MB: + { + nX -= nWidth/2; + nY -= nHeight; + break; + } + case RP_RB: + { + nX -= nWidth; + nY -= nHeight; + break; + } + } + + return Rectangle(nX,nY,nX+nWidth,nY+nHeight); +} + +//------------------------------------------------------------------------ + +void DiagramPositionTabPage::UpdateControlStates() +{ + bool bEnable = true; + + m_aRbPosMode_Auto.Enable( bEnable ); + m_aRbPosMode_Including.Enable( bEnable ); + m_aRbPosMode_Excluding.Enable( bEnable ); + + if( m_aRbPosMode_Auto.IsChecked() ) + bEnable = false; + + maFlPosition.Enable( bEnable ); + maFtPosX.Enable( bEnable ); + maMtrPosX.Enable( bEnable ); + maFtPosY.Enable( bEnable ); + maMtrPosY.Enable( bEnable ); + maFtPosReference.Enable( bEnable ); + maCtlPos.Enable( bEnable ); + + maFlSize.Enable( bEnable ); + maCtlSize.Enable( bEnable ); + maFtWidth.Enable( bEnable ); + maMtrWidth.Enable( bEnable ); + maFtHeight.Enable( bEnable ); + maMtrHeight.Enable( bEnable ); + maCbxScale.Enable( bEnable ); + maFtSizeReference.Enable( bEnable ); + + maCtlSize.Invalidate(); + maCtlPos.Invalidate(); +} + +//------------------------------------------------------------------------ + +void DiagramPositionTabPage::ReleaseBorders() +{ + //make it possible to set new values that will lead to different min max values afterwards + maMtrPosX.SetMin( convert1oothMMValueToFieldUnit( maMtrPosX, m_aMaxRect.Left() ), meDlgUnit); + maMtrPosX.SetMax( convert1oothMMValueToFieldUnit( maMtrPosX, m_aMaxRect.Right() ), meDlgUnit); + maMtrPosY.SetMin( convert1oothMMValueToFieldUnit( maMtrPosY, m_aMaxRect.Top() ), meDlgUnit); + maMtrPosY.SetMax( convert1oothMMValueToFieldUnit( maMtrPosY, m_aMaxRect.Bottom() ), meDlgUnit); + maMtrWidth.SetMax( convert1oothMMValueToFieldUnit( maMtrWidth, m_aMaxRect.GetWidth() ), meDlgUnit); + maMtrHeight.SetMax( convert1oothMMValueToFieldUnit( maMtrHeight, m_aMaxRect.GetHeight() ), meDlgUnit); +} + +//------------------------------------------------------------------------ + +void DiagramPositionTabPage::SetMinMaxPosition() +{ + // position + + long nLeft( m_aMaxRect.Left() ); + long nTop( m_aMaxRect.Top() ); + long nRight( m_aMaxRect.Right() ); + long nBottom( m_aMaxRect.Bottom() ); + + const long nWidth( m_aCurrentRect.GetWidth() ); + const long nHeight( m_aCurrentRect.GetHeight() ); + + switch ( maCtlPos.GetActualRP() ) + { + case RP_LT: + { + nRight -= nWidth; + nBottom -= nHeight; + break; + } + case RP_MT: + { + nLeft += nWidth / 2; + nRight -= nWidth / 2; + nBottom -= nHeight; + break; + } + case RP_RT: + { + nLeft += nWidth; + nBottom -= nHeight; + break; + } + case RP_LM: + { + nRight -= nWidth; + nTop += nHeight / 2; + nBottom -= nHeight / 2; + break; + } + case RP_MM: + { + nLeft += nWidth / 2; + nRight -= nWidth / 2; + nTop += nHeight / 2; + nBottom -= nHeight / 2; + break; + } + case RP_RM: + { + nLeft += nWidth; + nTop += nHeight / 2; + nBottom -= nHeight / 2; + break; + } + case RP_LB: + { + nRight -= nWidth; + nTop += nHeight; + break; + } + case RP_MB: + { + nLeft += nWidth / 2; + nRight -= nWidth / 2; + nTop += nHeight; + break; + } + case RP_RB: + { + nLeft += nWidth; + nTop += nHeight; + break; + } + } + + maMtrPosX.SetMin( convert1oothMMValueToFieldUnit( maMtrPosX, nLeft ), meDlgUnit); + maMtrPosX.SetFirst( convert1oothMMValueToFieldUnit( maMtrPosX, nLeft ), meDlgUnit); + maMtrPosX.SetMax( convert1oothMMValueToFieldUnit( maMtrPosX, nRight ), meDlgUnit); + maMtrPosX.SetLast( convert1oothMMValueToFieldUnit( maMtrPosX, nRight ), meDlgUnit); + maMtrPosY.SetMin( convert1oothMMValueToFieldUnit( maMtrPosY, nTop ), meDlgUnit); + maMtrPosY.SetFirst( convert1oothMMValueToFieldUnit( maMtrPosY, nTop ), meDlgUnit); + maMtrPosY.SetMax( convert1oothMMValueToFieldUnit( maMtrPosY, nBottom ), meDlgUnit); + maMtrPosY.SetLast( convert1oothMMValueToFieldUnit( maMtrPosY, nBottom ), meDlgUnit); + + // size + + nLeft = m_aMaxRect.Left(); + nTop = m_aMaxRect.Top(); + nRight = m_aMaxRect.Right(); + nBottom = m_aMaxRect.Bottom(); + + long nMaxWidth( m_aMaxRect.GetWidth() ); + long nMaxHeight( m_aMaxRect.GetHeight() ); + + switch ( maCtlSize.GetActualRP() ) + { + case RP_LT: + { + nMaxWidth -= ( m_aCurrentRect.Left() - nLeft ); + nMaxHeight -= ( m_aCurrentRect.Top() - nTop ); + break; + } + case RP_MT: + { + nMaxWidth = std::min( m_aCurrentRect.Center().X() - nLeft, nRight - m_aCurrentRect.Center().X() ) * 2; + nMaxHeight -= ( m_aCurrentRect.Top() - nTop ); + break; + } + case RP_RT: + { + nMaxWidth -= ( nRight - m_aCurrentRect.Right() ); + nMaxHeight -= ( m_aCurrentRect.Top() - nTop ); + break; + } + case RP_LM: + { + nMaxWidth -= ( m_aCurrentRect.Left() - nLeft ); + nMaxHeight = std::min( m_aCurrentRect.Center().Y() - nTop, nBottom - m_aCurrentRect.Center().Y() ) * 2; + break; + } + case RP_MM: + { + nMaxWidth = std::min( m_aCurrentRect.Center().X() - nLeft, nRight - m_aCurrentRect.Center().X() ) * 2; + nMaxHeight = std::min( m_aCurrentRect.Center().Y() - nTop, nBottom - m_aCurrentRect.Center().Y() ) * 2; + break; + } + case RP_RM: + { + nMaxWidth -= ( nRight - m_aCurrentRect.Right() ); + nMaxHeight = std::min( m_aCurrentRect.Center().Y() - nTop, nBottom - m_aCurrentRect.Center().Y() ) * 2; + break; + } + case RP_LB: + { + nMaxWidth -= ( m_aCurrentRect.Left() - nLeft ); + nMaxHeight -=( nBottom - m_aCurrentRect.Bottom() ); + break; + } + case RP_MB: + { + nMaxWidth = std::min( m_aCurrentRect.Center().X() - nLeft, nRight - m_aCurrentRect.Center().X() ) * 2; + nMaxHeight -= ( m_aCurrentRect.Bottom() - nBottom ); + break; + } + case RP_RB: + { + nMaxWidth -= ( nRight - m_aCurrentRect.Right() ); + nMaxHeight -= ( nBottom - m_aCurrentRect.Bottom() ); + break; + } + } + + if( maCbxScale.IsChecked() && maCbxScale.IsEnabled() ) + { + sal_Int64 nMaxHeightResultingFromScale(basegfx::fround64((mfScaleSizeY * (double)nMaxWidth) / mfScaleSizeX)); + if( nMaxHeightResultingFromScale > nMaxHeight ) + nMaxWidth = basegfx::fround64((mfScaleSizeX * (double)nMaxHeight / mfScaleSizeY)); + sal_Int64 nMaxWidthResultingFromScale(basegfx::fround64((mfScaleSizeX * (double)nMaxHeight) / mfScaleSizeY)); + if( nMaxWidthResultingFromScale > nMaxWidth ) + nMaxHeight = basegfx::fround64((mfScaleSizeY * (double)nMaxWidth / mfScaleSizeX)); + } + + maMtrWidth.SetMax( convert1oothMMValueToFieldUnit( maMtrWidth, nMaxWidth ), meDlgUnit); + maMtrWidth.SetLast( convert1oothMMValueToFieldUnit( maMtrWidth, nMaxWidth ), meDlgUnit); + maMtrHeight.SetMax( convert1oothMMValueToFieldUnit( maMtrHeight, nMaxHeight ), meDlgUnit); + maMtrHeight.SetLast( convert1oothMMValueToFieldUnit( maMtrHeight, nMaxHeight ), meDlgUnit); +} + +//------------------------------------------------------------------------ + +void DiagramPositionTabPage::PointChanged( Window* pWindow, RECT_POINT /*eRP*/ ) +{ + if( pWindow == &maCtlPos ) + SetRectIn100thmm( m_aCurrentRect ); + else + SetMinMaxPosition(); +} + +//------------------------------------------------------------------------ + +IMPL_LINK( DiagramPositionTabPage, ChangeModeHdl, RadioButton*, pButton ) +{ + UpdateControlStates(); + if( pButton == &m_aRbPosMode_Including ) + { + if( !m_bRectChangedByUser ) + SetRectIn100thmm( m_aIncludingRect ); + } + else if( pButton == &m_aRbPosMode_Excluding ) + { + if( !m_bRectChangedByUser ) + SetRectIn100thmm( m_aExcludingRect ); + } + + return( 0L ); +} + +//------------------------------------------------------------------------ + +IMPL_LINK( DiagramPositionTabPage, ChangePosXHdl, void *, EMPTYARG ) +{ + m_aCurrentRect = GetRectIn100thmm(); + SetMinMaxPosition(); + m_bRectChangedByUser = true; + return( 0L ); +} + +//------------------------------------------------------------------------ + +IMPL_LINK( DiagramPositionTabPage, ChangePosYHdl, void *, EMPTYARG ) +{ + m_aCurrentRect = GetRectIn100thmm(); + SetMinMaxPosition(); + m_bRectChangedByUser = true; + return( 0L ); +} + +//------------------------------------------------------------------------ + +IMPL_LINK( DiagramPositionTabPage, ChangeWidthHdl, void *, EMPTYARG ) +{ + if( maCbxScale.IsChecked() && maCbxScale.IsEnabled() ) + { + sal_Int64 nHeight(basegfx::fround64((mfScaleSizeY * (double)maMtrWidth.GetValue()) / mfScaleSizeX)); + + if(nHeight <= maMtrHeight.GetMax(FUNIT_NONE)) + { + maMtrHeight.SetUserValue(nHeight, FUNIT_NONE); + } + else + { + nHeight = maMtrHeight.GetMax(FUNIT_NONE); + maMtrHeight.SetUserValue(nHeight); + + const sal_Int64 nWidth(basegfx::fround64((mfScaleSizeX * (double)nHeight) / mfScaleSizeY)); + maMtrWidth.SetUserValue(nWidth, FUNIT_NONE); + } + } + m_bRectChangedByUser = true; + m_aCurrentRect = GetRectIn100thmm(); + SetMinMaxPosition(); + return( 0L ); +} + +//------------------------------------------------------------------------ + +IMPL_LINK( DiagramPositionTabPage, ChangeHeightHdl, void *, EMPTYARG ) +{ + if( maCbxScale.IsChecked() && maCbxScale.IsEnabled() ) + { + sal_Int64 nWidth(basegfx::fround64((mfScaleSizeX * (double)maMtrHeight.GetValue()) / mfScaleSizeY)); + + if(nWidth <= maMtrWidth.GetMax(FUNIT_NONE)) + { + maMtrWidth.SetUserValue(nWidth, FUNIT_NONE); + } + else + { + nWidth = maMtrWidth.GetMax(FUNIT_NONE); + maMtrWidth.SetUserValue(nWidth); + + const sal_Int64 nHeight(basegfx::fround64((mfScaleSizeY * (double)nWidth) / mfScaleSizeX)); + maMtrHeight.SetUserValue(nHeight, FUNIT_NONE); + } + } + m_bRectChangedByUser = true; + m_aCurrentRect = GetRectIn100thmm(); + SetMinMaxPosition(); + return( 0L ); +} + +//------------------------------------------------------------------------ + +IMPL_LINK( DiagramPositionTabPage, ClickScaleHdl, void *, EMPTYARG ) +{ + if( maCbxScale.IsChecked() ) + { + mfScaleSizeX = std::max( (double)GetCoreValue( maMtrWidth, mePoolUnit ), 1.0 ); + mfScaleSizeY = std::max( (double)GetCoreValue( maMtrHeight, mePoolUnit ), 1.0 ); + } + SetMinMaxPosition(); + return( 0L ); +} + +//------------------------------------------------------------------------ + +void DiagramPositionTabPage::FillUserData() +{ + // Abgleich wird in der Ini-Datei festgehalten + UniString aStr = UniString::CreateFromInt32( (sal_Int32) maCbxScale.IsChecked() ); + SetUserData( aStr ); +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.hrc b/chart2/source/controller/dialogs/tp_DiagramPosition.hrc new file mode 100644 index 000000000000..c91771e3da91 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.hrc @@ -0,0 +1,51 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ,v $ + * $Revision: $ + * + * 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 "ResourceIds.hrc" + +#define FL_POSITIONING_MODE 1 +#define RB_POSITIONING_MODE_AUTOMATIC 2 +#define RB_POSITIONING_MODE_INCLUDING 3 +#define RB_POSITIONING_MODE_EXCLUDING 4 +#define FL_POSITION 5 +#define FT_POS_X 6 +#define FT_POS_Y 7 +#define MTR_FLD_POS_X 8 +#define MTR_FLD_POS_Y 9 +#define FT_POSREFERENCE 10 +#define CTL_POSRECT 11 +#define FL_SIZE 12 +#define FT_WIDTH 13 +#define FT_HEIGHT 14 +#define MTR_FLD_WIDTH 15 +#define MTR_FLD_HEIGHT 16 +#define FT_SIZEREFERENCE 17 +#define CTL_SIZERECT 18 +#define CBX_SCALE 19 diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.hxx b/chart2/source/controller/dialogs/tp_DiagramPosition.hxx new file mode 100644 index 000000000000..153c9d26ca75 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.hxx @@ -0,0 +1,140 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tp_DiagramPosition.hxx,v $ + * $Revision: 1.7 $ + * + * 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 _CHART2_TP_DIAGRAMPOSITION_HXX +#define _CHART2_TP_DIAGRAMPOSITION_HXX + +// header for class FormattedField +#include +// header for FixedText +#include +// header for CheckBox +#include +// header for MetricField +#include +// header for SvxTabPage and SvxRectCtl +#include + +//............................................................................. +namespace chart +{ +//............................................................................. +class DiagramPositionTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +public: + DiagramPositionTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + //SvxTabPage communication interface with SvxRectCtl + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void Construct(); + + virtual void FillUserData(); + +private: + //methods + + DECL_LINK( ChangeModeHdl, RadioButton * ); + DECL_LINK( ChangePosXHdl, void * ); + DECL_LINK( ChangePosYHdl, void * ); + DECL_LINK( ChangeWidthHdl, void * ); + DECL_LINK( ChangeHeightHdl, void * ); + DECL_LINK( ClickScaleHdl, void * ); + + void SetRectIn100thmm( const Rectangle& rRect ); + Rectangle GetRectIn100thmm(); + long get1oothMMPosValue( MetricField& rField ); + long get1oothMMSizeValue( MetricField& rField ); + void set1oothMMPosValue( MetricField& rField, long n100thMM ); + void set1oothMMSizeValue( MetricField& rField, long n100thMM ); + sal_Int64 convert1oothMMValueToFieldUnit( MetricField& rField, long n100thMM ); + void ReleaseBorders(); + void SetMinMaxPosition(); + void UpdateControlStates(); + +private: + + //positioning mode + FixedLine m_aFlPosMode; + + RadioButton m_aRbPosMode_Auto; + RadioButton m_aRbPosMode_Including; + RadioButton m_aRbPosMode_Excluding; + + // position + FixedLine maFlPosition; + FixedText maFtPosX; + MetricField maMtrPosX; + FixedText maFtPosY; + MetricField maMtrPosY; + FixedText maFtPosReference; + SvxRectCtl maCtlPos; + + // size + FixedLine maFlSize; + FixedText maFtWidth; + MetricField maMtrWidth; + FixedText maFtHeight; + MetricField maMtrHeight; + CheckBox maCbxScale; + FixedText maFtSizeReference; + SvxRectCtl maCtlSize; + +private: + Rectangle m_aExcludingRect; + Rectangle m_aIncludingRect; + Rectangle m_aMaxRect; + double m_fUIScale; + Rectangle m_aCurrentRect; + bool m_bRectChangedByUser; + + SfxMapUnit mePoolUnit; + FieldUnit meDlgUnit; + + double mfScaleSizeX; + double mfScaleSizeY; +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.src b/chart2/source/controller/dialogs/tp_DiagramPosition.src new file mode 100644 index 000000000000..3ee028d88e94 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.src @@ -0,0 +1,217 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tp_DiagramPosition.src,v $ + * $Revision: 1.10 $ + * + * 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 "tp_DiagramPosition.hrc" +#include "TabPages.hrc" +#include + +#define LABELWIDTH 40 +#define LABELHEIGHT 10 + +#define Y_MODE_0 3 +#define Y_MODE_1 (Y_MODE_0+18) +#define Y_MODE_2 (Y_MODE_1+13) +#define Y_MODE_3 (Y_MODE_2+13) +#define Y_POSITION (Y_MODE_3+18) +#define Y_SIZE (Y_POSITION+53) + +#define X1 6 +#define X2 12 +#define X3 (X2+LABELWIDTH+4) +#define X4 178 + + +TabPage TP_DIAGRAM_POSITION +{ + Hide = TRUE ; + Size = MAP_APPFONT ( 260 , 185 ) ; + + FixedLine FL_POSITIONING_MODE + { + Pos = MAP_APPFONT ( X1 , Y_MODE_0 ) ; + Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDLINE_HEIGHT ) ; + Text [ en-US ] = "Positioning Mode" ; + }; + RadioButton RB_POSITIONING_MODE_AUTOMATIC + { + Pos = MAP_APPFONT ( X2 , Y_MODE_1 ) ; + Size = MAP_APPFONT ( 236 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "Automatic" ; + }; + RadioButton RB_POSITIONING_MODE_INCLUDING + { + Pos = MAP_APPFONT ( X2 , Y_MODE_2 ) ; + Size = MAP_APPFONT ( 236 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "Include labels" ; + }; + RadioButton RB_POSITIONING_MODE_EXCLUDING + { + Pos = MAP_APPFONT ( X2 , Y_MODE_3 ) ; + Size = MAP_APPFONT ( 236 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "Exclude labels" ; + }; + + FixedLine FL_POSITION + { + Pos = MAP_APPFONT ( X1 , Y_POSITION ) ; + Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDLINE_HEIGHT ) ; + Text [ en-US ] = "Position" ; + }; + FixedText FT_POS_X + { + Pos = MAP_APPFONT ( X2 , Y_POSITION - 3 + 16 + 8 ) ; + Size = MAP_APPFONT ( LABELWIDTH , LABELHEIGHT ) ; + Text [ en-US ] = "Position ~X" ; + }; + FixedText FT_POS_Y + { + Pos = MAP_APPFONT ( X2 , Y_POSITION - 3 + 32 + 8 ) ; + Size = MAP_APPFONT ( LABELWIDTH , LABELHEIGHT ) ; + Text [ en-US ] = "Position ~Y" ; + }; + MetricField MTR_FLD_POS_X + { + Border = TRUE ; + Pos = MAP_APPFONT ( X3 , Y_POSITION - 3 + 14 + 8 ) ; + Size = MAP_APPFONT ( 54 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = -120000 ; + Maximum = 240000 ; + StrictFormat = TRUE ; + DecimalDigits = 2 ; + Unit = FUNIT_MM ; + SpinSize = 10 ; + }; + MetricField MTR_FLD_POS_Y + { + Border = TRUE ; + Pos = MAP_APPFONT ( X3 , Y_POSITION - 3 + 30 + 8 ) ; + Size = MAP_APPFONT ( 54 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = -120000 ; + Maximum = 240000 ; + StrictFormat = TRUE ; + DecimalDigits = 2 ; + Unit = FUNIT_MM ; + SpinSize = 10 ; + }; + FixedText FT_POSREFERENCE + { + Pos = MAP_APPFONT ( X4 , Y_POSITION - 3 + 2 + 8 ) ; + Size = MAP_APPFONT ( 70 , LABELHEIGHT ) ; + Text [ en-US ] = "Base point"; + }; + Control CTL_POSRECT + { + Border = TRUE ; + Pos = MAP_APPFONT ( X4 , Y_POSITION - 3 + 12 + 8 ) ; + Size = MAP_APPFONT ( 48 , 34 ) ; + TabStop = TRUE ; + QuickHelpText [ en-US ] = "Base point" ; + }; + + // size + + FixedLine FL_SIZE + { + Pos = MAP_APPFONT ( X1 , Y_SIZE ) ; + Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDLINE_HEIGHT ) ; + Text [ en-US ] = "Size" ; + }; + FixedText FT_WIDTH + { + Pos = MAP_APPFONT ( X2 , Y_SIZE - 56 + 16 + 61 ) ; + Size = MAP_APPFONT ( LABELWIDTH , LABELHEIGHT ) ; + Text [ en-US ] = "Wi~dth" ; + }; + FixedText FT_HEIGHT + { + Pos = MAP_APPFONT ( X2 , Y_SIZE - 56 + 32 + 61 ) ; + Size = MAP_APPFONT ( LABELWIDTH , LABELHEIGHT ) ; + Text [ en-US ] = "H~eight" ; + }; + MetricField MTR_FLD_WIDTH + { + Border = TRUE ; + Pos = MAP_APPFONT ( X3 , Y_SIZE - 56 + 14 + 61 ) ; + Size = MAP_APPFONT ( 54 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 1 ; + Maximum = 120000 ; + StrictFormat = TRUE ; + DecimalDigits = 2 ; + Unit = FUNIT_MM ; + SpinSize = 10 ; + }; + MetricField MTR_FLD_HEIGHT + { + Border = TRUE ; + Pos = MAP_APPFONT ( X3 , Y_SIZE - 56 + 30 + 61 ) ; + Size = MAP_APPFONT ( 54 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 1 ; + Maximum = 120000 ; + StrictFormat = TRUE ; + DecimalDigits = 2 ; + Unit = FUNIT_MM ; + SpinSize = 10 ; + }; + FixedText FT_SIZEREFERENCE + { + Pos = MAP_APPFONT ( X4 , Y_SIZE - 56 + 2 + 61 ) ; + Size = MAP_APPFONT ( 70 , LABELHEIGHT ) ; + Text [ en-US ] = "Base point"; + }; + Control CTL_SIZERECT + { + Border = TRUE ; + Pos = MAP_APPFONT ( X4 , Y_SIZE - 56 + 12 + 61 ) ; + Size = MAP_APPFONT ( 48 , 34 ) ; + TabStop = TRUE ; + QuickHelpText [ en-US ] = "Base point" ; + }; + CheckBox CBX_SCALE + { + Pos = MAP_APPFONT ( X2 , Y_SIZE - 56 + 47 + 61 ) ; + Size = MAP_APPFONT ( 162 , LABELHEIGHT ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Keep ratio" ; + }; +}; diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index fa285f98d991..8af723aa7b4d 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -33,6 +33,7 @@ #include "DrawViewWrapper.hxx" #include "chartview/DrawModelWrapper.hxx" #include "ConfigurationAccess.hxx" +#include "macros.hxx" // header for class SdrPage #include @@ -223,6 +224,14 @@ SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const if( pRet ) { + //ignore some special shapes + rtl::OUString aShapeName = pRet->GetName(); + if( aShapeName.match(C2U("PlotAreaIncludingAxes")) || aShapeName.match(C2U("PlotAreaExcludingAxes")) ) + { + pRet->SetMarkProtect( true ); + return getHitObject( rPnt ); + } + //3d objects need a special treatment //because the simple PickObj method is not accurate in this case for performance reasons E3dObject* pE3d = dynamic_cast< E3dObject* >(pRet); diff --git a/chart2/source/controller/inc/DiagramItemConverter.hxx b/chart2/source/controller/inc/DiagramItemConverter.hxx new file mode 100644 index 000000000000..9df7b093d573 --- /dev/null +++ b/chart2/source/controller/inc/DiagramItemConverter.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AxisItemConverter.hxx,v $ + * $Revision: 1.9 $ + * + * 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 CHART_DIAGRAM_CONVERTER_HXX +#define CHART_DIAGRAM_CONVERTER_HXX + +#include "ItemConverter.hxx" +#include +#include + +#include +#include + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class DiagramItemConverter : public ::comphelper::ItemConverter +{ +public: + DiagramItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, double fUIScale ); + virtual ~DiagramItemConverter(); + + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const + throw( ::com::sun::star::uno::Exception ); + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) + throw( ::com::sun::star::uno::Exception ); + +private: + ::std::vector< ItemConverter * > m_aConverters; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xChartModel; + double m_fUIScale; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_DIAGRAM_CONVERTER_HXX +#endif diff --git a/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx new file mode 100644 index 000000000000..00f1fb664739 --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx @@ -0,0 +1,226 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: DiagramItemConverter.cxx,v $ + * $Revision: 1.16 $ + * + * 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_chart2.hxx" +#include "DiagramItemConverter.hxx" +#include "DiagramHelper.hxx" +#include "ChartModelHelper.hxx" +#include "SchWhichPairs.hxx" +#include "macros.hxx" +#include "servicenames.hxx" +#include "chartview/ExplicitValueProvider.hxx" +#include +#include "ItemPropertyMap.hxx" +#include "GraphicPropertyItemConverter.hxx" +#include +#include + +#include +#include + +using namespace ::com::sun::star; + +namespace chart +{ +namespace wrapper +{ + +DiagramItemConverter::DiagramItemConverter( + const uno::Reference< beans::XPropertySet > & xPropertySet + , SfxItemPool& rItemPool + , SdrModel& rDrawModel + , const uno::Reference< frame::XModel >& xChartModel + , double fUIScale ) + : ItemConverter( xPropertySet, rItemPool ) + , m_xChartModel( xChartModel ) + , m_fUIScale( fUIScale ) +{ + m_aConverters.push_back( new GraphicPropertyItemConverter( + xPropertySet, rItemPool, rDrawModel, uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), + GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES )); +} + +DiagramItemConverter::~DiagramItemConverter() +{ + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + ::comphelper::DeleteItemConverterPtr() ); +} + +void DiagramItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const +{ + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + ::comphelper::FillItemSetFunc( rOutItemSet )); + + // own items + ItemConverter::FillItemSet( rOutItemSet ); +} + +bool DiagramItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) +{ + bool bResult = false; + + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + ::comphelper::ApplyItemSetFunc( rItemSet, bResult )); + + // own items + return ItemConverter::ApplyItemSet( rItemSet ) || bResult; +} + +const USHORT * DiagramItemConverter::GetWhichPairs() const +{ + // must span all used items! + return nDiagramWhichPairs; +} + +bool DiagramItemConverter::GetItemProperty( tWhichIdType /*nWhichId*/, tPropertyNameWithMemberId & /*rOutProperty*/ ) const +{ + // No own (non-special) properties + return false; +} + + +bool DiagramItemConverter::ApplySpecialItem( + USHORT nWhichId, const SfxItemSet & rItemSet ) + throw( uno::Exception ) +{ + bool bChanged = false; + + switch( nWhichId ) + { + case SCHATTR_DIAGRAM_POS_MODE: + { + try + { + sal_Int32 nValue = static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue(); + DiagramPositioningMode eMode = static_cast< DiagramPositioningMode >(nValue); + bChanged = DiagramHelper::setDiagramPositioningMode( ChartModelHelper::findDiagram( m_xChartModel ), eMode ); + } + catch( uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); + } + } + break; + case SCHATTR_DIAGRAM_RECT_TO_USE: + { + sal_Int32 nValue = static_cast< const SfxInt32Item & >( rItemSet.Get( SCHATTR_DIAGRAM_POS_MODE )).GetValue(); + DiagramPositioningMode ePosMode = static_cast< DiagramPositioningMode >(nValue); + if( ePosMode != DiagramPositioningMode_AUTO ) + { + Rectangle aRect = static_cast< const SfxRectangleItem & >( rItemSet.Get( nWhichId )).GetValue(); + bChanged = DiagramHelper::setDiagramPositioning( m_xChartModel, awt::Rectangle( aRect.getX(), aRect.getY(), aRect.getWidth(), aRect.getHeight() ) ); + } + } + break; + } + + return bChanged; +} + +void DiagramItemConverter::FillSpecialItem( + USHORT nWhichId, SfxItemSet & rOutItemSet ) const + throw( uno::Exception ) +{ + switch( nWhichId ) + { + case SCHATTR_DIAGRAM_POS_MODE: + { + DiagramPositioningMode eMode = DiagramHelper::getDiagramPositioningMode( ChartModelHelper::findDiagram( m_xChartModel ) ); + rOutItemSet.Put( SfxInt32Item( nWhichId, eMode ) ); + } + break; + case SCHATTR_DIAGRAM_RECT_TO_USE: + { + awt::Rectangle aRect(0,0,0,0); + DiagramPositioningMode eMode = DiagramHelper::getDiagramPositioningMode( ChartModelHelper::findDiagram( m_xChartModel ) ); + uno::Reference< lang::XMultiServiceFactory > xFact( m_xChartModel, uno::UNO_QUERY ); + if( xFact.is() ) + { + ExplicitValueProvider* pProvider = ExplicitValueProvider::getExplicitValueProvider( xFact->createInstance( CHART_VIEW_SERVICE_NAME ) ); + //test + awt::Rectangle aTestInclusive = pProvider->getRectangleOfObject( C2U("PlotAreaIncludingAxes") ); + awt::Rectangle aTestExclusive = pProvider->getDiagramRectangleExcludingAxes(); + awt::Rectangle aModelRect = DiagramHelper::getDiagramRectangleFromModel( m_xChartModel ); + //end test + + if( eMode == DiagramPositioningMode_EXCLUDING ) + aRect = pProvider->getDiagramRectangleExcludingAxes(); + else + aRect = pProvider->getRectangleOfObject( C2U("PlotAreaIncludingAxes") ); + rOutItemSet.Put( SfxRectangleItem( nWhichId, Rectangle( aRect.X, aRect.Y, aRect.X+aRect.Width, aRect.Y+aRect.Height ) ) ); + } + } + break; + case SCHATTR_DIAGRAM_RECT_INCLUDING: + { + uno::Reference< lang::XMultiServiceFactory > xFact( m_xChartModel, uno::UNO_QUERY ); + if( xFact.is() ) + { + ExplicitValueProvider* pProvider = ExplicitValueProvider::getExplicitValueProvider( xFact->createInstance( CHART_VIEW_SERVICE_NAME ) ); + if( pProvider ) + { + awt::Rectangle aRect = pProvider->getRectangleOfObject( C2U("PlotAreaIncludingAxes") ); + rOutItemSet.Put( SfxRectangleItem( nWhichId, Rectangle( aRect.X, aRect.Y, aRect.X+aRect.Width, aRect.Y+aRect.Height ) ) ); + } + } + } + break; + case SCHATTR_DIAGRAM_RECT_EXCLUDING: + { + uno::Reference< lang::XMultiServiceFactory > xFact( m_xChartModel, uno::UNO_QUERY ); + if( xFact.is() ) + { + ExplicitValueProvider* pProvider = ExplicitValueProvider::getExplicitValueProvider( xFact->createInstance( CHART_VIEW_SERVICE_NAME ) ); + if( pProvider ) + { + awt::Rectangle aRect = pProvider->getDiagramRectangleExcludingAxes(); + rOutItemSet.Put( SfxRectangleItem( nWhichId, Rectangle( aRect.X, aRect.Y, aRect.X+aRect.Width, aRect.Y+aRect.Height ) ) ); + } + } + } + break; + case SCHATTR_DIAGRAM_RECT_MAX: + { + awt::Size aPageSize( ChartModelHelper::getPageSize( m_xChartModel) ); + Rectangle aRect(0,0,aPageSize.Width,aPageSize.Height); + rOutItemSet.Put( SfxRectangleItem( nWhichId, aRect ) ); + } + break; + case SCHATTR_DIAGRAM_UI_SCALE: + { + rOutItemSet.Put( SvxDoubleItem( m_fUIScale, nWhichId ) ); + } + break; + } +} + +} // namespace wrapper +} // namespace chart diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx index dbefb0e7f025..5b3ab5922d7b 100644 --- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx +++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx @@ -90,34 +90,23 @@ const USHORT nGridWhichPairs[] = 0 }; -const USHORT nChartWhichPairs[] = -{ - SCHATTR_STYLE_START,SCHATTR_STYLE_END, // 59 - 68 sch/schattr.hxx - 0 -}; - -const USHORT nDiagramAreaWhichPairs[] = -{ - XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx - XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1018 - 1046 svx/xdef.hxx - 0 -}; - -const USHORT nAreaAndChartWhichPairs[] = // pairs for chart AND area +const USHORT nLegendWhichPairs[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1018 - 1046 svx/xdef.hxx - SCHATTR_STYLE_START,SCHATTR_STYLE_END, // 59 - 68 sch/schattr.hxx + SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, // 1067 - 1078 svx/svddef.hxx + CHARACTER_WHICHPAIRS, + SCHATTR_LEGEND_START, SCHATTR_LEGEND_END, // 3 - 3 sch/schattr.hxx 0 }; -const USHORT nLegendWhichPairs[] = +const USHORT nDiagramWhichPairs[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx - XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1018 - 1046 svx/xdef.hxx - SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, // 1067 - 1078 svx/svddef.hxx - CHARACTER_WHICHPAIRS, - SCHATTR_LEGEND_START, SCHATTR_LEGEND_END, // 3 - 3 sch/schattr.hxx + XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1000 - 1016 svx/xdef.hxx + SCHATTR_DIAGRAM_START, SCHATTR_DIAGRAM_END, + SID_ATTR_TRANSFORM_POS_Y, SID_ATTR_TRANSFORM_POS_Y, + SID_ATTR_TRANSFORM_WIDTH, SID_ATTR_TRANSFORM_HEIGHT, 0 }; diff --git a/chart2/source/controller/itemsetwrapper/makefile.mk b/chart2/source/controller/itemsetwrapper/makefile.mk index 0ab981bba643..a34ead7b1841 100644 --- a/chart2/source/controller/itemsetwrapper/makefile.mk +++ b/chart2/source/controller/itemsetwrapper/makefile.mk @@ -56,7 +56,8 @@ SLOFILES= $(SLO)$/ItemConverter.obj \ $(SLO)$/TitleItemConverter.obj \ $(SLO)$/RegressionCurveItemConverter.obj \ $(SLO)$/RegressionEquationItemConverter.obj \ - $(SLO)$/ErrorBarItemConverter.obj + $(SLO)$/ErrorBarItemConverter.obj \ + $(SLO)$/DiagramItemConverter.obj # --- Targets ----------------------------------------------------------------- diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 4cf4de81480b..344335fe4bc1 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -133,17 +133,28 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() if( !aCID.getLength() ) return; - awt::Size aSelectedSize; - ExplicitValueProvider* pProvider( ExplicitValueProvider::getExplicitValueProvider( m_xChartView ) ); - 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, m_aModel->getModel() ); + if( OBJECTTYPE_DIAGRAM == eObjectType || OBJECTTYPE_DIAGRAM_WALL == eObjectType ) + { + rtl::OUString aDiaCID = ObjectIdentifier::createClassifiedIdentifierForParticle( ObjectIdentifier::createParticleForDiagram( ChartModelHelper::findDiagram( m_aModel->getModel() ), m_aModel->getModel() ) ); + bool bSuccess = executeDlg_ObjectProperties_withoutUndoGuard( aDiaCID, false ); + if( bSuccess ) + aUndoGuard.commitAction(); + return; + } + + awt::Size aSelectedSize; + ExplicitValueProvider* pProvider( ExplicitValueProvider::getExplicitValueProvider( m_xChartView ) ); + if( pProvider ) + aSelectedSize = ToSize( ( pProvider->getRectangleOfObject( aCID ) ) ); + SfxAbstractTabDialog * pDlg = NULL; try { diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index 754e66ec7d17..574cf68d9896 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -63,6 +63,7 @@ #include "Strings.hrc" #include "ReferenceSizeProvider.hxx" #include "RegressionCurveHelper.hxx" +#include "DiagramItemConverter.hxx" #include //for auto_ptr @@ -154,6 +155,9 @@ namespace case OBJECTTYPE_LEGEND_ENTRY: break; case OBJECTTYPE_DIAGRAM: + pItemConverter = new wrapper::DiagramItemConverter( + xObjectProperties, rDrawModel.GetItemPool(), + rDrawModel, xChartModel, rDrawModel.GetUIScale() ); break; case OBJECTTYPE_DIAGRAM_WALL: case OBJECTTYPE_DIAGRAM_FLOOR: diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 8dca62d93ee1..ce1cf9aa7b43 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -273,6 +273,7 @@ void ChartController::executeDispatch_NewArrangement() Reference< beans::XPropertyState > xState( xDiagram, uno::UNO_QUERY_THROW ); xState->setPropertyToDefault( C2U("RelativeSize")); xState->setPropertyToDefault( C2U("RelativePosition")); + xState->setPropertyToDefault( C2U("PosSizeExcludeAxes")); // 3d rotation ThreeDHelper::set3DSettingsToDefault( uno::Reference< beans::XPropertySet >( xDiagram, uno::UNO_QUERY ) ); diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx index a4a50af995a9..f2995370fe70 100644 --- a/chart2/source/controller/main/PositionAndSizeHelper.cxx +++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx @@ -188,8 +188,11 @@ bool PositionAndSizeHelper::moveObject( const rtl::OUString& rObjectCID return false; //add axis title sizes to the diagram size - aNewPositionAndSize = ExplicitValueProvider::calculateDiagramPositionAndSizeInclusiveTitle( - xChartModel, xChartView, rNewPositionAndSize ); + bool bPosSizeExcludeAxes = false; + xObjectProp->getPropertyValue( C2U( "PosSizeExcludeAxes" ) ) >>= bPosSizeExcludeAxes; + if( !bPosSizeExcludeAxes ) + aNewPositionAndSize = ExplicitValueProvider::calculateDiagramPositionAndSizeIncludingTitle( + xChartModel, xChartView, rNewPositionAndSize ); } return moveObject( eObjectType, xObjectProp, aNewPositionAndSize, rPageRectangle ); } diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx index 119d206a2937..bfbc7dd9980f 100644 --- a/chart2/source/inc/DiagramHelper.hxx +++ b/chart2/source/inc/DiagramHelper.hxx @@ -49,6 +49,13 @@ namespace chart { +enum DiagramPositioningMode +{ + DiagramPositioningMode_AUTO, + DiagramPositioningMode_INCLUDING, + DiagramPositioningMode_EXCLUDING +}; + class OOO_DLLPUBLIC_CHARTTOOLS DiagramHelper { public: @@ -324,6 +331,16 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType ); + static DiagramPositioningMode getDiagramPositioningMode( const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDiagram > & xDiagram ); + static bool setDiagramPositioningMode( const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDiagram > & xDiagram, DiagramPositioningMode eMode ); + + static bool setDiagramPositioning( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel, + const ::com::sun::star::awt::Rectangle& rPosRect /*100th mm*/ ); + + static ::com::sun::star::awt::Rectangle getDiagramRectangleFromModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel ); + private: // not implemented DiagramHelper(); diff --git a/chart2/source/inc/ObjectIdentifier.hxx b/chart2/source/inc/ObjectIdentifier.hxx index 7793cd57d21e..63a2c0be8ea5 100644 --- a/chart2/source/inc/ObjectIdentifier.hxx +++ b/chart2/source/inc/ObjectIdentifier.hxx @@ -124,7 +124,7 @@ public: ::com::sun::star::frame::XModel >& xChartModel , sal_Int32 nSubIndex = -1 );//-1: main grid, 0: first subgrid etc - SAL_DLLPRIVATE static rtl::OUString createParticleForDiagram( + static rtl::OUString createParticleForDiagram( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram , const ::com::sun::star::uno::Reference< diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc index fea8bb867057..15157b4adbb5 100644 --- a/chart2/source/inc/Strings.hrc +++ b/chart2/source/inc/Strings.hrc @@ -34,7 +34,6 @@ #include //next free is 290 -//single free is: 134 //#define RID_APP_START 30000 ////#define STR_NULL (RID_APP_START + 1) @@ -299,6 +298,7 @@ #define STR_DLG_NUMBERFORMAT_FOR_PERCENTAGE_VALUE (RID_APP_START + 266) #define STR_PAGE_POSITIONING (RID_APP_START + 277) +#define STR_PAGE_POSITIONANDSIZE (RID_APP_START + 134) #define STR_PAGE_ASIAN (RID_APP_START + 281) //----------------------------------------------------------------------------- diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx index e4afc0d9efbd..637a0f3b757d 100644 --- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx +++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx @@ -58,7 +58,16 @@ #define SCHATTR_LEGEND_POS SCHATTR_LEGEND_START #define SCHATTR_LEGEND_END SCHATTR_LEGEND_POS -#define SCHATTR_TEXT_START (SCHATTR_LEGEND_END + 1) +#define SCHATTR_DIAGRAM_START (SCHATTR_LEGEND_END + 1) +#define SCHATTR_DIAGRAM_POS_MODE SCHATTR_DIAGRAM_START +#define SCHATTR_DIAGRAM_RECT_TO_USE SCHATTR_DIAGRAM_START + 1 +#define SCHATTR_DIAGRAM_RECT_INCLUDING SCHATTR_DIAGRAM_START + 2 +#define SCHATTR_DIAGRAM_RECT_EXCLUDING SCHATTR_DIAGRAM_START + 3 +#define SCHATTR_DIAGRAM_RECT_MAX SCHATTR_DIAGRAM_START + 4 +#define SCHATTR_DIAGRAM_UI_SCALE SCHATTR_DIAGRAM_START + 5 +#define SCHATTR_DIAGRAM_END SCHATTR_DIAGRAM_UI_SCALE + +#define SCHATTR_TEXT_START (SCHATTR_DIAGRAM_END + 1) // #define SCHATTR_TEXT_ORIENT SCHATTR_TEXT_START // name changed: #define SCHATTR_TEXT_STACKED SCHATTR_TEXT_START diff --git a/chart2/source/inc/chartview/ExplicitValueProvider.hxx b/chart2/source/inc/chartview/ExplicitValueProvider.hxx index ab94e7e1c337..ecd95fdcd5b8 100644 --- a/chart2/source/inc/chartview/ExplicitValueProvider.hxx +++ b/chart2/source/inc/chartview/ExplicitValueProvider.hxx @@ -71,6 +71,8 @@ public: virtual ::com::sun::star::awt::Rectangle getRectangleOfObject( const rtl::OUString& rObjectCID, bool bSnapRect=false )=0; + virtual ::com::sun::star::awt::Rectangle getDiagramRectangleExcludingAxes()=0; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > getShapeForCID( const rtl::OUString& rObjectCID )=0; @@ -80,12 +82,12 @@ public: static ExplicitValueProvider* getExplicitValueProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xChartView ); static ::com::sun::star::awt::Rectangle - calculateDiagramPositionAndSizeInclusiveTitle( + calculateDiagramPositionAndSizeIncludingTitle( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xChartView - , const ::com::sun::star::awt::Rectangle& rExclusivePositionAndSize ); + , const ::com::sun::star::awt::Rectangle& rExcludingPositionAndSize ); static sal_Int32 getExplicitNumberFormatKeyForAxis( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 3e8c8ea9cd24..f01e8611f59b 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -75,6 +75,7 @@ enum { PROP_DIAGRAM_REL_POS, PROP_DIAGRAM_REL_SIZE, + PROP_DIAGRAM_POSSIZE_EXCLUDE_LABELS, PROP_DIAGRAM_SORT_BY_X_VALUES, PROP_DIAGRAM_CONNECT_BARS, PROP_DIAGRAM_GROUP_BARS_PER_AXIS, @@ -104,6 +105,13 @@ void lcl_AddPropertiesToVector( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); + rOutProperties.push_back( + Property( C2U( "PosSizeExcludeAxes" ), + PROP_DIAGRAM_POSSIZE_EXCLUDE_LABELS, + ::getBooleanCppuType(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( Property( C2U( "SortByXValues" ), PROP_DIAGRAM_SORT_BY_X_VALUES, @@ -175,6 +183,7 @@ void lcl_AddPropertiesToVector( void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap ) { + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_POSSIZE_EXCLUDE_LABELS, false ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_SORT_BY_X_VALUES, false ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_CONNECT_BARS, false ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_GROUP_BARS_PER_AXIS, true ); diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index fbc8042af27b..e1d8a78eb4f6 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -40,6 +40,8 @@ #include "ChartTypeHelper.hxx" #include "CommonConverters.hxx" #include "servicenames_charttypes.hxx" +#include "ChartModelHelper.hxx" +#include "RelativePositionHelper.hxx" #include #include @@ -50,6 +52,8 @@ #include #include #include +#include +#include #include #include @@ -1432,4 +1436,160 @@ sal_Int32 DiagramHelper::getCorrectedMissingValueTreatment( return nResult; } +//static +DiagramPositioningMode DiagramHelper::getDiagramPositioningMode( const uno::Reference< + chart2::XDiagram > & xDiagram ) +{ + DiagramPositioningMode eMode = DiagramPositioningMode_AUTO; + uno::Reference< beans::XPropertySet > xDiaProps( xDiagram, uno::UNO_QUERY ); + if( xDiaProps.is() ) + { + RelativePosition aRelPos; + RelativeSize aRelSize; + if( (xDiaProps->getPropertyValue(C2U("RelativePosition")) >>= aRelPos ) && + (xDiaProps->getPropertyValue(C2U("RelativeSize")) >>= aRelSize ) ) + { + bool bPosSizeExcludeAxes=false; + xDiaProps->getPropertyValue(C2U("PosSizeExcludeAxes")) >>= bPosSizeExcludeAxes; + if( bPosSizeExcludeAxes ) + eMode = DiagramPositioningMode_EXCLUDING; + else + eMode = DiagramPositioningMode_INCLUDING; + } + } + return eMode; +} + +//static +bool DiagramHelper::setDiagramPositioningMode( const uno::Reference< + chart2::XDiagram > & xDiagram, DiagramPositioningMode eMode ) +{ + bool bChanged = false; + uno::Reference< beans::XPropertySet > xDiaProps( xDiagram, uno::UNO_QUERY ); + if( !xDiaProps.is() ) + return bChanged; + + bool bOld = false; + xDiaProps->getPropertyValue(C2U("PosSizeExcludeAxes")) >>= bOld; + bool bNew = bOld; + + if( eMode == DiagramPositioningMode_AUTO ) + { + + RelativePosition aPos; + if( (xDiaProps->getPropertyValue(C2U("RelativePosition") ) >>= aPos) ) + bChanged = true; + if( !bChanged ) + { + RelativeSize aSize; + if( (xDiaProps->getPropertyValue(C2U("RelativeSize") ) >>= aSize) ) + bChanged = true; + } + + if( bChanged ) + { + xDiaProps->setPropertyValue(C2U("RelativePosition"), uno::Any() ); + xDiaProps->setPropertyValue(C2U("RelativeSize"), uno::Any() ); + } + } + else if( eMode == DiagramPositioningMode_EXCLUDING ) + { + bNew = true; + bChanged = (bNew!=bOld); + if(bChanged) + xDiaProps->setPropertyValue(C2U("PosSizeExcludeAxes"), uno::makeAny(bNew) ); + } + else if( eMode == DiagramPositioningMode_INCLUDING) + { + bNew = false; + bChanged = (bNew!=bOld); + if(bChanged) + xDiaProps->setPropertyValue(C2U("PosSizeExcludeAxes"), uno::makeAny(bNew) ); + } + return bChanged; +} + +void lcl_ensureRange0to1( double& rValue ) +{ + if(rValue<0.0) + rValue=0.0; + if(rValue>1.0) + rValue=1.0; +} + +//static +bool DiagramHelper::setDiagramPositioning( const uno::Reference< frame::XModel >& xChartModel, + const awt::Rectangle& rPosRect /*100th mm*/ ) +{ + bool bChanged = false; + awt::Size aPageSize( ChartModelHelper::getPageSize(xChartModel) ); + uno::Reference< beans::XPropertySet > xDiaProps( ChartModelHelper::findDiagram( xChartModel ), uno::UNO_QUERY ); + if( !xDiaProps.is() ) + return bChanged; + + RelativePosition aOldPos; + RelativeSize aOldSize; + xDiaProps->getPropertyValue(C2U("RelativePosition") ) >>= aOldPos; + xDiaProps->getPropertyValue(C2U("RelativeSize") ) >>= aOldSize; + + RelativePosition aNewPos; + aNewPos.Anchor = drawing::Alignment_TOP_LEFT; + aNewPos.Primary = double(rPosRect.X)/double(aPageSize.Width); + aNewPos.Secondary = double(rPosRect.Y)/double(aPageSize.Height); + + chart2::RelativeSize aNewSize; + aNewSize.Primary = double(rPosRect.Width)/double(aPageSize.Width); + aNewSize.Secondary = double(rPosRect.Height)/double(aPageSize.Height); + + lcl_ensureRange0to1( aNewPos.Primary ); + lcl_ensureRange0to1( aNewPos.Secondary ); + lcl_ensureRange0to1( aNewSize.Primary ); + lcl_ensureRange0to1( aNewSize.Secondary ); + if( (aNewPos.Primary + aNewSize.Primary) > 1.0 ) + aNewPos.Primary = 1.0 - aNewSize.Primary; + if( (aNewPos.Secondary + aNewSize.Secondary) > 1.0 ) + aNewPos.Secondary = 1.0 - aNewSize.Secondary; + + xDiaProps->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aNewPos) ); + xDiaProps->setPropertyValue( C2U( "RelativeSize" ), uno::makeAny(aNewSize) ); + + bChanged = (aOldPos.Anchor!=aNewPos.Anchor) || + (aOldPos.Primary!=aNewPos.Primary) || + (aOldPos.Secondary!=aNewPos.Secondary) || + (aOldSize.Primary!=aNewSize.Primary) || + (aOldSize.Secondary!=aNewSize.Secondary); + return bChanged; +} + +//static +awt::Rectangle DiagramHelper::getDiagramRectangleFromModel( const uno::Reference< frame::XModel >& xChartModel ) +{ + awt::Rectangle aRet(-1,-1,-1,-1); + + uno::Reference< beans::XPropertySet > xDiaProps( ChartModelHelper::findDiagram( xChartModel ), uno::UNO_QUERY ); + if( !xDiaProps.is() ) + return aRet; + + awt::Size aPageSize( ChartModelHelper::getPageSize(xChartModel) ); + + RelativePosition aRelPos; + RelativeSize aRelSize; + xDiaProps->getPropertyValue(C2U("RelativePosition") ) >>= aRelPos; + xDiaProps->getPropertyValue(C2U("RelativeSize") ) >>= aRelSize; + + awt::Size aAbsSize( + aRelSize.Primary * aPageSize.Width, + aRelSize.Secondary * aPageSize.Height ); + + awt::Point aAbsPos( + static_cast< sal_Int32 >( aRelPos.Primary * aPageSize.Width ), + static_cast< sal_Int32 >( aRelPos.Secondary * aPageSize.Height )); + + awt::Point aAbsPosLeftTop = RelativePositionHelper::getUpperLeftCornerOfAnchoredObject( aAbsPos, aAbsSize, aRelPos.Anchor ); + + aRet = awt::Rectangle(aAbsPosLeftTop.X, aAbsPosLeftTop.Y, aAbsSize.Width, aAbsSize.Height ); + + return aRet; +} + } // namespace chart diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index 608adb49290b..9bce64ad7395 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -124,10 +124,12 @@ bool PiePositionHelper::getInnerAndOuterRadius( double fCategoryX //----------------------------------------------------------------------------- PieChart::PieChart( const uno::Reference& xChartTypeModel - , sal_Int32 nDimensionCount ) + , sal_Int32 nDimensionCount + , bool bExcludingPositioning ) : VSeriesPlotter( xChartTypeModel, nDimensionCount ) , m_pPosHelper( new PiePositionHelper( NormalAxis_Z, (m_nDimension==3)?0.0:90.0 ) ) , m_bUseRings(false) + , m_bSizeExcludesLabelsAndExplodedSegments(bExcludingPositioning) { PlotterBase::m_pPosHelper = m_pPosHelper; VSeriesPlotter::m_pMainPosHelper = m_pPosHelper; @@ -182,6 +184,11 @@ bool PieChart::keepAspectRatio() const return true; } +bool PieChart::shouldSnapRectToUsedArea() +{ + return true; +} + //----------------------------------------------------------------- // lang::XServiceInfo //----------------------------------------------------------------- @@ -289,7 +296,7 @@ double PieChart::getMaxOffset() const } double PieChart::getMaximumX() { - double fMaxOffset = getMaxOffset(); + double fMaxOffset = m_bSizeExcludesLabelsAndExplodedSegments ? 0.0 : getMaxOffset(); if( m_aZSlots.size()>0 && m_bUseRings) return m_aZSlots[0].size()+0.5+fMaxOffset; return 1.5+fMaxOffset; @@ -392,7 +399,8 @@ void PieChart::createShapes() for( nPointIndex = 0; nPointIndex < nPointCount; nPointIndex++ ) { double fLogicInnerRadius, fLogicOuterRadius; - bool bIsVisible = m_pPosHelper->getInnerAndOuterRadius( fSlotX+1.0, fLogicInnerRadius, fLogicOuterRadius, m_bUseRings, getMaxOffset() ); + double fOffset = m_bSizeExcludesLabelsAndExplodedSegments ? 0.0 : getMaxOffset(); + bool bIsVisible = m_pPosHelper->getInnerAndOuterRadius( fSlotX+1.0, fLogicInnerRadius, fLogicOuterRadius, m_bUseRings, fOffset ); if( !bIsVisible ) continue; diff --git a/chart2/source/view/charttypes/PieChart.hxx b/chart2/source/view/charttypes/PieChart.hxx index e65cfdcc5626..b358e6b21fdb 100644 --- a/chart2/source/view/charttypes/PieChart.hxx +++ b/chart2/source/view/charttypes/PieChart.hxx @@ -49,7 +49,7 @@ class PieChart : public VSeriesPlotter public: PieChart( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartTypeModel - , sal_Int32 nDimensionCount ); + , sal_Int32 nDimensionCount, bool bExcludingPositioning ); virtual ~PieChart(); //------------------------------------------------------------------------- @@ -75,6 +75,7 @@ public: //------------------- virtual ::com::sun::star::drawing::Direction3D getPreferredDiagramAspectRatio() const; virtual bool keepAspectRatio() const; + virtual bool shouldSnapRectToUsedArea(); //MinimumAndMaximumSupplier virtual double getMinimumX(); @@ -116,6 +117,7 @@ struct PieLabelInfo; private: //member PiePositionHelper* m_pPosHelper; bool m_bUseRings; + bool m_bSizeExcludesLabelsAndExplodedSegments; struct PieLabelInfo { diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index c8f473d226d0..63933c6254cc 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1731,6 +1731,13 @@ bool VSeriesPlotter::WantToPlotInFrontOfAxisLine() return ChartTypeHelper::isSeriesInFrontOfAxisLine( m_xChartTypeModel ); } +bool VSeriesPlotter::shouldSnapRectToUsedArea() +{ + if( m_nDimension == 3 ) + return false; + return true; +} + Sequence< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntries( LegendExpansion eLegendExpansion , const Reference< beans::XPropertySet >& xTextProperties @@ -2053,7 +2060,8 @@ std::vector< ViewLegendEntry > SAL_CALL VSeriesPlotter::createLegendEntriesForCh //static VSeriesPlotter* VSeriesPlotter::createSeriesPlotter( const uno::Reference& xChartTypeModel - , sal_Int32 nDimensionCount ) + , sal_Int32 nDimensionCount + , bool bExcludingPositioning ) { rtl::OUString aChartType = xChartTypeModel->getChartType(); @@ -2072,7 +2080,7 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter( else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE) ) pRet = new BubbleChart(xChartTypeModel,nDimensionCount); else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE) ) - pRet = new PieChart(xChartTypeModel,nDimensionCount); + pRet = new PieChart(xChartTypeModel,nDimensionCount, bExcludingPositioning ); else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_NET) ) pRet = new AreaChart(xChartTypeModel,nDimensionCount,true,true,new PolarPlottingPositionHelper(),true,true,false,1,drawing::Direction3D(1,1,1) ); else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) ) diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index 5e0db2644cc5..65d603aaf05f 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -52,6 +52,8 @@ #include // header for class SvxShape #include +// header for GetSdrObjectFromXShape +#include // header for class E3dScene #include #include @@ -182,6 +184,8 @@ void VDiagram::createShapes_2d() uno::Reference< drawing::XShapes > xOuterGroup_Shapes = m_pShapeFactory->createGroup2D(m_xLogicTarget); m_xOuterGroupShape = uno::Reference( xOuterGroup_Shapes, uno::UNO_QUERY ); + uno::Reference< drawing::XShapes > xGroupForWall( m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,C2U("PlotAreaExcludingAxes")) ); + //create independent group shape as container for datapoints and such things { uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,C2U("testonly;CooContainer=XXX_CID")); @@ -198,8 +202,7 @@ void VDiagram::createShapes_2d() "com.sun.star.drawing.RectangleShape" ) ), uno::UNO_QUERY ); //m_xWall2D->setPosition(m_aAvailablePosIncludingAxes); //m_xWall2D->setSize(m_aAvailableSizeIncludingAxes); - uno::Reference< drawing::XShapes > xShapes( m_xCoordinateRegionShape, uno::UNO_QUERY ); - xShapes->add(m_xWall2D); + xGroupForWall->add(m_xWall2D); uno::Reference< beans::XPropertySet > xProp( m_xWall2D, uno::UNO_QUERY ); if( xProp.is()) { @@ -521,6 +524,7 @@ void VDiagram::createShapes_3d() m_xOuterGroupShape = uno::Reference< drawing::XShape >( m_xShapeFactory->createInstance( C2U( "com.sun.star.drawing.Shape3DSceneObject" ) ), uno::UNO_QUERY ); + ShapeFactory::setShapeName( m_xOuterGroupShape, C2U("PlotAreaExcludingAxes") ); m_xLogicTarget->add(m_xOuterGroupShape); uno::Reference< drawing::XShapes > xOuterGroup_Shapes = diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx index e94ef6c68687..3fddf7bb8d96 100644 --- a/chart2/source/view/inc/VSeriesPlotter.hxx +++ b/chart2/source/view/inc/VSeriesPlotter.hxx @@ -267,7 +267,8 @@ public: static VSeriesPlotter* createSeriesPlotter( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartTypeModel - , sal_Int32 nDimensionCount ); + , sal_Int32 nDimensionCount + , bool bExcludingPositioning = false /*for pie and donut charts labels and exploded segments are excluded from the given size*/); sal_Int32 getPointCount() const; @@ -297,6 +298,7 @@ public: virtual void rearrangeLabelToAvoidOverlapIfRequested( const ::com::sun::star::awt::Size& rPageSize ); bool WantToPlotInFrontOfAxisLine(); + virtual bool shouldSnapRectToUsedArea(); //------------------------------------------------------------------------- //------------------------------------------------------------------------- diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx index f3024a10e958..2810ad1e8d89 100644 --- a/chart2/source/view/main/ChartItemPool.cxx +++ b/chart2/source/view/main/ChartItemPool.cxx @@ -41,6 +41,7 @@ #include // header for class SfxStringItem #include +#include //SfxIntegerListItem #include #define _SVSTDARR_ULONGS @@ -69,6 +70,13 @@ ChartItemPool::ChartItemPool(): 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_DIAGRAM_POS_MODE - SCHATTR_START] = new SfxInt32Item( SCHATTR_DIAGRAM_POS_MODE,0 ); + ppPoolDefaults[SCHATTR_DIAGRAM_RECT_TO_USE - SCHATTR_START] = new SfxRectangleItem( SCHATTR_DIAGRAM_RECT_TO_USE, Rectangle(0,0,100,100) ); + ppPoolDefaults[SCHATTR_DIAGRAM_RECT_INCLUDING - SCHATTR_START] = new SfxRectangleItem( SCHATTR_DIAGRAM_RECT_INCLUDING, Rectangle(0,0,100,100) ); + ppPoolDefaults[SCHATTR_DIAGRAM_RECT_EXCLUDING - SCHATTR_START] = new SfxRectangleItem( SCHATTR_DIAGRAM_RECT_EXCLUDING, Rectangle(0,0,100,100) ); + ppPoolDefaults[SCHATTR_DIAGRAM_RECT_MAX - SCHATTR_START] = new SfxRectangleItem( SCHATTR_DIAGRAM_RECT_MAX, Rectangle(0,0,100,100) ); + ppPoolDefaults[SCHATTR_DIAGRAM_UI_SCALE - SCHATTR_START] = new SvxDoubleItem(1.0, SCHATTR_DIAGRAM_UI_SCALE); + // 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/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index dfd57f9bce92..fddb8edc95c4 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -170,6 +170,7 @@ ChartView::ChartView( , m_nScaleYNumerator(1) , m_nScaleYDenominator(1) , m_bSdrViewIsInEditMode(sal_False) + , m_aResultingDiagramRectangleExcludingAxes(0,0,0,0) { } @@ -678,7 +679,8 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter( if(nT==0) m_bShiftXAxisTicks = ChartTypeHelper::shiftTicksAtXAxisPerDefault( xChartType ); - VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter( xChartType, nDimensionCount ); + bool bExcludingPositioning = DiagramPositioningMode_EXCLUDING == DiagramHelper::getDiagramPositioningMode( xDiagram ); + VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter( xChartType, nDimensionCount, bExcludingPositioning ); if( !pPlotter ) continue; m_aSeriesPlotterList.push_back( pPlotter ); @@ -1161,7 +1163,7 @@ drawing::Direction3D SeriesPlotterContainer::getPreferredAspectRatio() namespace { -bool lcl_resizeAfterCompleteCreation( const uno::Reference< XDiagram >& xDiagram ) +bool lcl_IsPieOrDonut( const uno::Reference< XDiagram >& xDiagram ) { //special treatment for pie charts //the size is checked after complete creation to get the datalabels into the given space @@ -1319,16 +1321,23 @@ sal_Int16 lcl_getDefaultWritingModeFromPool( ::boost::shared_ptr< DrawModelWrapp } //end anonymous namespace //------------ create complete diagram shape (inclusive axis and series) -void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlotterContainer + +awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlotterContainer , const uno::Reference< drawing::XShapes>& xDiagramPlusAxes_Shapes , const awt::Point& rAvailablePos , const awt::Size& rAvailableSize - , const awt::Size& rPageSize ) + , const awt::Size& rPageSize + , bool bUseFixedInnerSize + , const uno::Reference< drawing::XShape>& xDiagram_MarkHandles /*needs to be resized to fit the result*/ + ) { + //return the used rectangle + awt::Rectangle aUsedOuterRect( rAvailablePos.X, rAvailablePos.Y, 0, 0 ); + // sal_Int32 nDiagramIndex = 0;//todo if more than one diagam is supported uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartModel ) ); if( !xDiagram.is()) - return; + return aUsedOuterRect; sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram ); if(!nDimensionCount) @@ -1384,7 +1393,8 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo aVDiagram.init(xDiagramPlusAxes_Shapes,xDiagramPlusAxes_Shapes,m_xShapeFactory); aVDiagram.createShapes(rAvailablePos,rAvailableSize); xSeriesTargetInFrontOfAxis = aVDiagram.getCoordinateRegion(); - aVDiagram.reduceToMimimumSize(); + if( !bUseFixedInnerSize ) + aVDiagram.reduceToMimimumSize(); } uno::Reference< drawing::XShapes > xTextTargetShapes( ShapeFactory(m_xShapeFactory).createGroup2D(xDiagramPlusAxes_Shapes) ); @@ -1405,19 +1415,21 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo //calculate resulting size respecting axis label layout and fontscaling + uno::Reference< drawing::XShape > xBoundingShape( xDiagramPlusAxes_Shapes, uno::UNO_QUERY ); + ::basegfx::B2IRectangle aConsumedOuterRect; + //use first coosys only so far; todo: calculate for more than one coosys if we have more in future //todo: this is just a workaround at the moment for pie and donut labels - if( !lcl_resizeAfterCompleteCreation(xDiagram) && rVCooSysList.size() > 0 ) + bool bIsPieOrDonut = lcl_IsPieOrDonut(xDiagram); + if( !bIsPieOrDonut && rVCooSysList.size() > 0 ) { - uno::Reference< drawing::XShape > xBoundingShape( xDiagramPlusAxes_Shapes, uno::UNO_QUERY ); - - ::basegfx::B2IRectangle aFirstConsumedOuterRect( ShapeFactory::getRectangleOfShape(xBoundingShape) ); - VCoordinateSystem* pVCooSys = rVCooSysList[0]; pVCooSys->createMaximumAxesLabels(); - ::basegfx::B2IRectangle aConsumedOuterRect( ShapeFactory::getRectangleOfShape(xBoundingShape) ); - ::basegfx::B2IRectangle aNewInnerRect( aVDiagram.adjustInnerSize( aConsumedOuterRect ) ); + aConsumedOuterRect = ::basegfx::B2IRectangle( ShapeFactory::getRectangleOfShape(xBoundingShape) ); + ::basegfx::B2IRectangle aNewInnerRect( aVDiagram.getCurrentRectangle() ); + if( !bUseFixedInnerSize ) + aNewInnerRect = aVDiagram.adjustInnerSize( aConsumedOuterRect ); pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix( createTransformationSceneToScreen( aNewInnerRect ) )); @@ -1440,13 +1452,13 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo bLessSpaceConsumedThanExpected = true; } - if( bLessSpaceConsumedThanExpected ) + if( bLessSpaceConsumedThanExpected && !bUseFixedInnerSize ) { aVDiagram.adjustInnerSize( aConsumedOuterRect ); pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix( createTransformationSceneToScreen( aVDiagram.getCurrentRectangle() ) )); - pVCooSys->updatePositions(); } + pVCooSys->updatePositions();//todo: logically this belongs to the condition above, but it seems also to be neccessary to give the axes group shapes the right bounding rects for hit test - probably caused by bug i106183 -> check again if fixed } //create axes and grids for the final size @@ -1476,7 +1488,7 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo else { xSeriesTarget = xSeriesTargetBehindAxis; - DBG_ASSERT( !lcl_resizeAfterCompleteCreation(xDiagram), "not implemented yet! - during a complete recreation this shape is destroyed so no series can be created anymore" ); + DBG_ASSERT( !bIsPieOrDonut, "not implemented yet! - during a complete recreation this shape is destroyed so no series can be created anymore" ); } pSeriesPlotter->initPlotter( xSeriesTarget,xTextTargetShapes,m_xShapeFactory,aCID ); pSeriesPlotter->setPageReferenceSize( rPageSize ); @@ -1495,15 +1507,15 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo m_bPointsWereSkipped = m_bPointsWereSkipped || pSeriesPlotter->PointsWereSkipped(); } - //recreate with corrected sizes if requested - if( lcl_resizeAfterCompleteCreation(xDiagram) ) + //recreate all with corrected sizes if requested + if( bIsPieOrDonut ) { m_bPointsWereSkipped = false; - uno::Reference< drawing::XShape > xBoundingShape( xDiagramPlusAxes_Shapes, uno::UNO_QUERY ); - ::basegfx::B2IRectangle aConsumedOuterRect( ShapeFactory::getRectangleOfShape(xBoundingShape) ); - - ::basegfx::B2IRectangle aNewInnerRect( aVDiagram.adjustInnerSize( aConsumedOuterRect ) ); + aConsumedOuterRect = ::basegfx::B2IRectangle( ShapeFactory::getRectangleOfShape(xBoundingShape) ); + ::basegfx::B2IRectangle aNewInnerRect( aVDiagram.getCurrentRectangle() ); + if( !bUseFixedInnerSize ) + aNewInnerRect = aVDiagram.adjustInnerSize( aConsumedOuterRect ); for( aPlotterIter = rSeriesPlotterList.begin(); aPlotterIter != aPlotterEnd; aPlotterIter++ ) { @@ -1560,6 +1572,53 @@ void ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlo pSeriesPlotter->rearrangeLabelToAvoidOverlapIfRequested( rPageSize ); } } + + if( bUseFixedInnerSize ) + { + //if( !bIsPieOrDonut ) + // aConsumedOuterRect = ::basegfx::B2IRectangle( ShapeFactory::getRectangleOfShape(xBoundingShape) ); + aUsedOuterRect = awt::Rectangle( aConsumedOuterRect.getMinX(), aConsumedOuterRect.getMinY(), aConsumedOuterRect.getWidth(), aConsumedOuterRect.getHeight() ); + } + else + aUsedOuterRect = awt::Rectangle( rAvailablePos.X, rAvailablePos.Y, rAvailableSize.Width, rAvailableSize.Height ); + + bool bSnapRectToUsedArea = false; + for( aPlotterIter = rSeriesPlotterList.begin(); aPlotterIter != aPlotterEnd; aPlotterIter++ ) + { + VSeriesPlotter* pSeriesPlotter = *aPlotterIter; + bSnapRectToUsedArea = pSeriesPlotter->shouldSnapRectToUsedArea(); + if(bSnapRectToUsedArea) + break; + } + if(bSnapRectToUsedArea) + { + if( bUseFixedInnerSize ) + m_aResultingDiagramRectangleExcludingAxes = getRectangleOfObject( C2U("PlotAreaExcludingAxes") ); + else + { + ::basegfx::B2IRectangle aConsumedInnerRect = aVDiagram.getCurrentRectangle(); + m_aResultingDiagramRectangleExcludingAxes = awt::Rectangle( aConsumedInnerRect.getMinX(), aConsumedInnerRect.getMinY(), aConsumedInnerRect.getWidth(), aConsumedInnerRect.getHeight() ); + } + } + else + { + m_aResultingDiagramRectangleExcludingAxes = awt::Rectangle( rAvailablePos.X, rAvailablePos.Y, rAvailableSize.Width, rAvailableSize.Height ); + } + + if( xDiagram_MarkHandles.is() ) + { + awt::Point aPos(rAvailablePos); + awt::Size aSize(rAvailableSize); + if( bUseFixedInnerSize ) + { + aPos = awt::Point( m_aResultingDiagramRectangleExcludingAxes.X, m_aResultingDiagramRectangleExcludingAxes.Y ); + aSize = awt::Size( m_aResultingDiagramRectangleExcludingAxes.Width, m_aResultingDiagramRectangleExcludingAxes.Height ); + } + xDiagram_MarkHandles->setPosition( aPos ); + xDiagram_MarkHandles->setSize( aSize ); + } + + return aUsedOuterRect; } //------------------------------------------------------------- @@ -1617,6 +1676,12 @@ uno::Reference< drawing::XShape > ChartView::getShapeForCID( const rtl::OUString return 0; } +awt::Rectangle ChartView::getDiagramRectangleExcludingAxes() +{ + impl_updateView(); + return m_aResultingDiagramRectangleExcludingAxes; +} + awt::Rectangle ChartView::getRectangleOfObject( const rtl::OUString& rObjectCID, bool bSnapRect ) { impl_updateView(); @@ -1640,7 +1705,10 @@ awt::Rectangle ChartView::getRectangleOfObject( const rtl::OUString& rObjectCID, SdrObjList* pRootList = pRootSdrObject->GetSubList(); if( pRootList ) { - SdrObject* pShape = DrawModelWrapper::getNamedSdrObject( C2U("MarkHandles"), pRootList ); + OUString aShapeName = C2U("MarkHandles"); + if( eObjectType == OBJECTTYPE_DIAGRAM ) + aShapeName = C2U("PlotAreaIncludingAxes"); + SdrObject* pShape = DrawModelWrapper::getNamedSdrObject( aShapeName, pRootList ); if( pShape ) xShape = uno::Reference< drawing::XShape >( pShape->getUnoShape(), uno::UNO_QUERY); } @@ -1927,12 +1995,12 @@ sal_Int32 ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabe } //static -awt::Rectangle ExplicitValueProvider::calculateDiagramPositionAndSizeInclusiveTitle( +awt::Rectangle ExplicitValueProvider::calculateDiagramPositionAndSizeIncludingTitle( const Reference< frame::XModel >& xChartModel , const Reference< uno::XInterface >& xChartView - , const awt::Rectangle& rExclusivePositionAndSize ) + , const awt::Rectangle& rExcludingPositionAndSize ) { - awt::Rectangle aRet(rExclusivePositionAndSize); + awt::Rectangle aRet(rExcludingPositionAndSize); //add axis title sizes to the diagram size uno::Reference< chart2::XTitle > xTitle_Height( TitleHelper::getTitle( TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION, xChartModel ) ); @@ -2005,8 +2073,11 @@ bool getAvailablePosAndSizeForDiagram( , const awt::Size & rPageSize , const uno::Reference< XDiagram > & xDiagram , VTitle* pXTitle, VTitle* pYTitle - , VTitle* pSecondXTitle, VTitle* pSecondYTitle ) + , VTitle* pSecondXTitle, VTitle* pSecondYTitle + , bool& bUseFixedInnerSize ) { + bUseFixedInnerSize = false; + //@todo: we need a size dependent on the axis labels awt::Rectangle aRemainingSpace(rSpaceLeft); { @@ -2023,6 +2094,9 @@ bool getAvailablePosAndSizeForDiagram( uno::Reference< beans::XPropertySet > xProp(xDiagram, uno::UNO_QUERY); bool bMakeRoomForTitle = false; + bool bPosSizeExcludeAxes = false; + if( xProp.is() ) + xProp->getPropertyValue( C2U( "PosSizeExcludeAxes" ) ) >>= bPosSizeExcludeAxes; //size: ::com::sun::star::chart2::RelativeSize aRelativeSize; @@ -2030,7 +2104,8 @@ bool getAvailablePosAndSizeForDiagram( { rOutAvailableDiagramSize.Height = static_cast(aRelativeSize.Secondary*rPageSize.Height); rOutAvailableDiagramSize.Width = static_cast(aRelativeSize.Primary*rPageSize.Width); - bMakeRoomForTitle = true; + bMakeRoomForTitle = !bPosSizeExcludeAxes; + bUseFixedInnerSize = bPosSizeExcludeAxes; } else rOutAvailableDiagramSize = awt::Size(aRemainingSpace.Width,aRemainingSpace.Height); @@ -2048,7 +2123,8 @@ bool getAvailablePosAndSizeForDiagram( rOutPos = RelativePositionHelper::getUpperLeftCornerOfAnchoredObject( awt::Point(static_cast(fX),static_cast(fY)) , rOutAvailableDiagramSize, aRelativePosition.Anchor ); - bMakeRoomForTitle = true; + bMakeRoomForTitle = !bPosSizeExcludeAxes; + bUseFixedInnerSize = bPosSizeExcludeAxes; } else rOutPos = awt::Point(aRemainingSpace.X,aRemainingSpace.Y); @@ -2148,6 +2224,19 @@ void changePositionOfAxisTitle( VTitle* pVTitle, TitleAlignment eAlignment break; } + sal_Int32 nMaxY = rPageSize.Height - aTitleSize.Height/2; + sal_Int32 nMaxX = rPageSize.Width - aTitleSize.Width/2; + sal_Int32 nMinX = aTitleSize.Width/2; + sal_Int32 nMinY = aTitleSize.Height/2; + if( aNewPosition.Y > nMaxY ) + aNewPosition.Y = nMaxY; + if( aNewPosition.X > nMaxX ) + aNewPosition.X = nMaxX; + if( aNewPosition.Y < nMinY ) + aNewPosition.Y = nMinY; + if( aNewPosition.X < nMinX ) + aNewPosition.X = nMinX; + pVTitle->changePosition( aNewPosition ); } @@ -2421,6 +2510,7 @@ void ChartView::createShapes() if( impl_AddInDrawsAllByItself() ) return; + m_aResultingDiagramRectangleExcludingAxes = awt::Rectangle(0,0,0,0); impl_deleteCoordinateSystems(); if( m_pDrawModelWrapper ) { @@ -2460,9 +2550,15 @@ void ChartView::createShapes() uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartModel ) ); rtl::OUString aDiagramCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, rtl::OUString::valueOf( sal_Int32(0) ) ) );//todo: other index if more than one diagram is possible uno::Reference< drawing::XShapes > xDiagramPlusAxesPlusMarkHandlesGroup_Shapes( ShapeFactory(m_xShapeFactory).createGroup2D(xPageShapes,aDiagramCID) ); - uno::Reference< drawing::XShape > xDiagramPlusAxes_MarkHandles( ShapeFactory(m_xShapeFactory).createInvisibleRectangle( + + uno::Reference< drawing::XShape > xDiagram_MarkHandles( ShapeFactory(m_xShapeFactory).createInvisibleRectangle( xDiagramPlusAxesPlusMarkHandlesGroup_Shapes, awt::Size(0,0) ) ); - ShapeFactory::setShapeName( xDiagramPlusAxes_MarkHandles, C2U("MarkHandles") ); + ShapeFactory::setShapeName( xDiagram_MarkHandles, C2U("MarkHandles") ); + + uno::Reference< drawing::XShape > xDiagram_OuterRect( ShapeFactory(m_xShapeFactory).createInvisibleRectangle( + xDiagramPlusAxesPlusMarkHandlesGroup_Shapes, awt::Size(0,0) ) ); + ShapeFactory::setShapeName( xDiagram_OuterRect, C2U("PlotAreaIncludingAxes") ); + uno::Reference< drawing::XShapes > xDiagramPlusAxes_Shapes( ShapeFactory(m_xShapeFactory).createGroup2D(xDiagramPlusAxesPlusMarkHandlesGroup_Shapes ) ); //------------ create some titles @@ -2547,21 +2643,22 @@ void ChartView::createShapes() //------------ create complete diagram shape (inclusive axis and series) awt::Point aAvailablePosDia; awt::Size aAvailableSizeForDiagram; + bool bUseFixedInnerSize = false; if( getAvailablePosAndSizeForDiagram( aAvailablePosDia, aAvailableSizeForDiagram, aRemainingSpace, aPageSize, ChartModelHelper::findDiagram( m_xChartModel ) - , apVTitle_X.get(), apVTitle_Y.get(), apVTitle_SecondX.get(), apVTitle_SecondY.get() ) ) + , apVTitle_X.get(), apVTitle_Y.get(), apVTitle_SecondX.get(), apVTitle_SecondY.get(), bUseFixedInnerSize ) ) { - impl_createDiagramAndContent( aSeriesPlotterContainer + awt::Rectangle aUsedOuterRect = impl_createDiagramAndContent( aSeriesPlotterContainer , xDiagramPlusAxes_Shapes - , aAvailablePosDia ,aAvailableSizeForDiagram, aPageSize ); + , aAvailablePosDia ,aAvailableSizeForDiagram, aPageSize, bUseFixedInnerSize, xDiagram_MarkHandles ); - if(xDiagramPlusAxes_MarkHandles.is()) + if( xDiagram_OuterRect.is() ) { - xDiagramPlusAxes_MarkHandles->setPosition( aAvailablePosDia ); - xDiagramPlusAxes_MarkHandles->setSize( aAvailableSizeForDiagram ); + xDiagram_OuterRect->setPosition( awt::Point( aUsedOuterRect.X, aUsedOuterRect.Y ) ); + xDiagram_OuterRect->setSize( awt::Size( aUsedOuterRect.Width, aUsedOuterRect.Height ) ); } //correct axis title position - awt::Rectangle aDiagramPlusAxesRect(aAvailablePosDia.X,aAvailablePosDia.Y,aAvailableSizeForDiagram.Width,aAvailableSizeForDiagram.Height); + awt::Rectangle aDiagramPlusAxesRect( aUsedOuterRect ); if(bAutoPosition_XTitle) changePositionOfAxisTitle( apVTitle_X.get(), ALIGN_BOTTOM, aDiagramPlusAxesRect, aPageSize ); if(bAutoPosition_YTitle) diff --git a/chart2/source/view/main/ChartView.hxx b/chart2/source/view/main/ChartView.hxx index b536998fd5bd..78d1e20760db 100644 --- a/chart2/source/view/main/ChartView.hxx +++ b/chart2/source/view/main/ChartView.hxx @@ -112,6 +112,8 @@ public: virtual ::com::sun::star::awt::Rectangle getRectangleOfObject( const rtl::OUString& rObjectCID, bool bSnapRect=false ); + virtual ::com::sun::star::awt::Rectangle getDiagramRectangleExcludingAxes(); + ::boost::shared_ptr< DrawModelWrapper > getDrawModelWrapper(); // ___XTransferable___ @@ -189,11 +191,13 @@ private: //methods void impl_updateView(); - void impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlotterContainer + ::com::sun::star::awt::Rectangle impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlotterContainer , const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes>& xDiagramPlusAxes_Shapes , const ::com::sun::star::awt::Point& rAvailablePos , const ::com::sun::star::awt::Size& rAvailableSize - , const ::com::sun::star::awt::Size& rPageSize ); + , const ::com::sun::star::awt::Size& rPageSize + , bool bUseFixedInnerSize + , const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& xDiagram_MarkHandles ); private: //member @@ -232,6 +236,8 @@ private: //member sal_Int32 m_nScaleYDenominator; sal_Bool m_bSdrViewIsInEditMode; + + ::com::sun::star::awt::Rectangle m_aResultingDiagramRectangleExcludingAxes; }; //............................................................................. -- cgit v1.2.3 From 384419bc10497bd63fefce6da7196dec2e6b232a Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 20 Nov 2009 11:58:22 +0100 Subject: chartpositioning: #i100778# chart positioning excluding labels --- offapi/com/sun/star/chart/Diagram.idl | 9 ++ offapi/com/sun/star/chart/XDiagramPositioning.idl | 106 ++++++++++++++++++++++ offapi/com/sun/star/chart/makefile.mk | 1 + offapi/com/sun/star/chart2/Diagram.idl | 4 + 4 files changed, 120 insertions(+) create mode 100644 offapi/com/sun/star/chart/XDiagramPositioning.idl diff --git a/offapi/com/sun/star/chart/Diagram.idl b/offapi/com/sun/star/chart/Diagram.idl index 58b1921454c9..adeff309518c 100644 --- a/offapi/com/sun/star/chart/Diagram.idl +++ b/offapi/com/sun/star/chart/Diagram.idl @@ -34,6 +34,10 @@ #include #endif +#ifndef __com_sun_star_chart_XDiagramPositioning_idl__ +#include +#endif + #ifndef __com_sun_star_beans_XPropertySet_idl__ #include #endif @@ -67,6 +71,11 @@ published service Diagram interface com::sun::star::chart::XDiagram; + /** + @since OOo 3.3 + */ + [optional] interface com::sun::star::chart::XDiagramPositioning; + //------------------------------------------------------------------------- /** If this property is the position is calculated by the application automatically. diff --git a/offapi/com/sun/star/chart/XDiagramPositioning.idl b/offapi/com/sun/star/chart/XDiagramPositioning.idl new file mode 100644 index 000000000000..98dc3dcfb7b4 --- /dev/null +++ b/offapi/com/sun/star/chart/XDiagramPositioning.idl @@ -0,0 +1,106 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XDiagramPositioning.idl,v $ + * $Revision: 1.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * 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_XDiagramPositioning_idl__ +#define __com_sun_star_chart_XDiagramPositioning_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include +#endif +#ifndef __com_sun_star_awt_Rectangle_idl__ +#include +#endif + +//============================================================================= + + module com { module sun { module star { module chart { + +//============================================================================= + +/** allow for different positioning options for a diagram + + @see Diagram + */ +interface XDiagramPositioning : com::sun::star::uno::XInterface +{ + /** the diagram will be placed automtically + */ + void setAutomaticDiagramPositioning(); + + /** @returns whether the diagram is placed automtically + */ + boolean isAutomaticDiagramPositioning(); + + /** place the inner diagram part excluding any axes, labels and titles + @param PositionRect + specifies the position and size in 100/th mm + */ + void setDiagramPositionExcludingAxes( [in] com::sun::star::awt::Rectangle PositionRect ); + + /** @returns true in case the diagram position was set with method setDiagramPositionExcludingAxes + */ + boolean isExcludingDiagramPositioning(); + + /** @returns the position rectangle of the inner diagram part excluding any axes, labels and titles. + Position and size are given in 100/th mm. + It might be necessary to calculate the positioning so this method can be expensive and the result may depend on different other settings. + */ + com::sun::star::awt::Rectangle calculateDiagramPositionExcludingAxes(); + + + /** place the outer diagram part including the axes and axes labels, but excluding the axes titles. + @param PositionRect + specifies the position and size in 100/th mm + */ + void setDiagramPositionIncludingAxes( [in] com::sun::star::awt::Rectangle PositionRect ); + + /** @returns the position rectangle of the diagram including the axes and axes labels, but excluding the axes titles. + Position and size are given in 100/th mm. + It might be necessary to calculate the positioning so this method can be expensive and the result may depend on different other settings. + */ + com::sun::star::awt::Rectangle calculateDiagramPositionIncludingAxes(); + + /** place the diagram including the axes, axes labels and axes titles. + @param PositionRect + specifies the position and size in 100/th mm + */ + void setDiagramPositionIncludingAxesAndAxesTitles( [in] com::sun::star::awt::Rectangle PositionRect ); + + /** @returns the position rectangle of the diagram including the axes, axes labels and axes titles. + Position and size are given in 100/th mm. + It might be necessary to calculate the positioning so this method can be expensive and the result may depend on different other settings. + */ + com::sun::star::awt::Rectangle calculateDiagramPositionIncludingAxesAndAxesTitles(); +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/chart/makefile.mk b/offapi/com/sun/star/chart/makefile.mk index 781c78d08177..d18bb0480a8e 100644 --- a/offapi/com/sun/star/chart/makefile.mk +++ b/offapi/com/sun/star/chart/makefile.mk @@ -108,6 +108,7 @@ IDLFILES=\ XChartDataChangeEventListener.idl\ XChartDocument.idl\ XDiagram.idl\ + XDiagramPositioning.idl\ XStatisticDisplay.idl\ XTwoAxisXSupplier.idl\ XTwoAxisYSupplier.idl\ diff --git a/offapi/com/sun/star/chart2/Diagram.idl b/offapi/com/sun/star/chart2/Diagram.idl index 5bff5ff4c97a..7581f0706d5d 100644 --- a/offapi/com/sun/star/chart2/Diagram.idl +++ b/offapi/com/sun/star/chart2/Diagram.idl @@ -81,6 +81,10 @@ service Diagram */ [property] ::com::sun::star::layout::RelativeSize RelativeSize; + /** The attributes RelativePosition and RelativeSize should be used for the inner coordinate region without axis labels and without data labels. + */ + [optional, property] boolean PosSizeExcludeLabels; + /** Sort data points by x values for rendering */ [optional, property] boolean SortByXValues; -- cgit v1.2.3 From ec712408961a4a2efc667a7af83a21209907f9eb Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 20 Nov 2009 11:58:22 +0100 Subject: chartpositioning: #i100778# chart positioning excluding labels --- xmloff/inc/SchXMLExport.hxx | 2 +- xmloff/inc/SchXMLImport.hxx | 1 + xmloff/inc/xmloff/SchXMLExportHelper.hxx | 181 +------------ xmloff/inc/xmloff/xmltoken.hxx | 4 + xmloff/source/chart/SchXMLExport.cxx | 351 ++++++++++++++++++++------ xmloff/source/chart/SchXMLImport.cxx | 1 + xmloff/source/chart/SchXMLPlotAreaContext.cxx | 194 +++++++++++--- xmloff/source/chart/SchXMLPlotAreaContext.hxx | 59 ++++- xmloff/source/core/xmltoken.cxx | 3 + xmloff/source/draw/shapeexport2.cxx | 22 -- 10 files changed, 502 insertions(+), 316 deletions(-) diff --git a/xmloff/inc/SchXMLExport.hxx b/xmloff/inc/SchXMLExport.hxx index 6c2966d811df..3b878ad82498 100644 --- a/xmloff/inc/SchXMLExport.hxx +++ b/xmloff/inc/SchXMLExport.hxx @@ -85,7 +85,7 @@ public: void SetProgress( sal_Int32 nPercentage ); - UniReference< XMLPropertySetMapper > GetPropertySetMapper() const { return maExportHelper.GetPropertySetMapper(); } + UniReference< XMLPropertySetMapper > GetPropertySetMapper() const; // XServiceInfo ( : SvXMLExport ) virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index ebecb4d19bb5..c784fbac48f1 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -72,6 +72,7 @@ enum SchXMLChartElemTokenMap enum SchXMLPlotAreaElemTokenMap { + XML_TOK_PA_EXCLUDING_POSITION, XML_TOK_PA_AXIS, XML_TOK_PA_SERIES, XML_TOK_PA_WALL, diff --git a/xmloff/inc/xmloff/SchXMLExportHelper.hxx b/xmloff/inc/xmloff/SchXMLExportHelper.hxx index 2082ce59de03..bbea850ac55b 100644 --- a/xmloff/inc/xmloff/SchXMLExportHelper.hxx +++ b/xmloff/inc/xmloff/SchXMLExportHelper.hxx @@ -43,42 +43,9 @@ #include #include -namespace com { namespace sun { namespace star { - namespace chart { - class XDiagram; - class XChartDocument; - class XChartDataArray; - struct ChartSeriesAddress; - } - namespace chart2 { - class XDiagram; - class XChartDocument; - class XDataSeries; - namespace data - { - class XDataProvider; - class XDataSequence; - } - } - namespace drawing { - class XShape; - class XShapes; - } - namespace task { - class XStatusIndicator; - } - namespace frame { - class XModel; - } - namespace xml { - namespace sax { - class XAttributeList; -}}}}} - class SvXMLAutoStylePoolP; -class XMLChartExportPropertyMapper; class SvXMLExport; -class XMLPropertyHandlerFactory; +class SchXMLExportHelper_Impl; /** With this class you can export a element containing its data as element or without internal table. In @@ -87,155 +54,23 @@ class XMLPropertyHandlerFactory; */ class XMLOFF_DLLPUBLIC SchXMLExportHelper : public UniRefBase { -public: - // first: data sequence for label, second: data sequence for values. - typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >, - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > > tLabelValuesDataPair; - typedef ::std::vector< tLabelValuesDataPair > tDataSequenceCont; - -private: - SvXMLExport& mrExport; - SvXMLAutoStylePoolP& mrAutoStylePool; - UniReference< XMLPropertyHandlerFactory > mxPropertyHandlerFactory; - UniReference< XMLPropertySetMapper > mxPropertySetMapper; - UniReference< XMLChartExportPropertyMapper > mxExpPropMapper; - - rtl::OUString msTableName; - rtl::OUStringBuffer msStringBuffer; - rtl::OUString msString; - - // members filled by InitRangeSegmentationProperties (retrieved from DataProvider) - sal_Bool mbHasSeriesLabels; - sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false - sal_Bool mbRowSourceColumns; - rtl::OUString msChartAddress; - rtl::OUString msTableNumberList; - ::com::sun::star::uno::Sequence< sal_Int32 > maSequenceMapping; - - rtl::OUString msCLSID; - - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes; - - tDataSequenceCont m_aDataSequencesToExport; - - /** first parseDocument: collect autostyles and store names in this queue - second parseDocument: export content and use names from this queue - */ - ::std::queue< ::rtl::OUString > maAutoStyleNameQueue; - SAL_DLLPRIVATE void CollectAutoStyle( - const std::vector< XMLPropertyState >& aStates ); - SAL_DLLPRIVATE void AddAutoStyleAttribute( - const std::vector< XMLPropertyState >& aStates ); - - SAL_DLLPRIVATE SvXMLAutoStylePoolP& GetAutoStylePoolP() - { return mrAutoStylePool; } - - /// if bExportContent is false the auto-styles are collected - SAL_DLLPRIVATE void parseDocument( com::sun::star::uno::Reference< - com::sun::star::chart::XChartDocument >& rChartDoc, - sal_Bool bExportContent, - sal_Bool bIncludeTable = sal_False ); - SAL_DLLPRIVATE void exportTable(); - SAL_DLLPRIVATE void exportPlotArea( - com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > xDiagram, - com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > xNewDiagram, - const ::com::sun::star::awt::Size & rPageSize, - sal_Bool bExportContent, - sal_Bool bIncludeTable ); - SAL_DLLPRIVATE void exportAxes( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > & xDiagram, - const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, - sal_Bool bExportContent ); - - SAL_DLLPRIVATE void exportSeries( - const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, - const ::com::sun::star::awt::Size & rPageSize, - sal_Bool bExportContent, - sal_Bool bHasTwoYAxes ); - SAL_DLLPRIVATE void exportCandleStickSeries( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDataSeries > > & aSeriesSeq, - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDiagram > & xDiagram, - sal_Bool bJapaneseCandleSticks, - sal_Bool bExportContent ); - SAL_DLLPRIVATE void exportDataPoints( - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & xSeriesProperties, - sal_Int32 nSeriesLength, - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDiagram > & xDiagram, - sal_Bool bExportContent ); - SAL_DLLPRIVATE void exportRegressionCurve( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDataSeries > & xSeries, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & xSeriesProp, - const ::com::sun::star::awt::Size & rPageSize, - sal_Bool bExportContent ); - - /// add svg position as attribute for current element - SAL_DLLPRIVATE void addPosition( const ::com::sun::star::awt::Point & rPosition ); - SAL_DLLPRIVATE void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); - /// add svg size as attribute for current element - SAL_DLLPRIVATE void addSize( const ::com::sun::star::awt::Size & rSize ); - SAL_DLLPRIVATE void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); - /// fills the member msString with the appropriate String (i.e. "A3") - SAL_DLLPRIVATE void getCellAddress( sal_Int32 nCol, sal_Int32 nRow ); - /// interchanges rows and columns of the sequence given - SAL_DLLPRIVATE void swapDataArray( com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< double > >& rSequence ); - /// exports a string as a paragraph element - SAL_DLLPRIVATE void exportText( const ::rtl::OUString& rText, bool bConvertTabsLFs = false ); - SAL_DLLPRIVATE void exportErrorBarRanges(); - - SAL_DLLPRIVATE SchXMLExportHelper(SchXMLExportHelper &); // not defined - SAL_DLLPRIVATE void operator =(SchXMLExportHelper &); // not defined - public: SchXMLExportHelper( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ); virtual ~SchXMLExportHelper(); - // auto-styles - /// parse chart and collect all auto-styles used in current pool - void collectAutoStyles( com::sun::star::uno::Reference< - com::sun::star::chart::XChartDocument > rChartDoc ); - /// write the styles collected into the current pool as elements - void exportAutoStyles(); - - /** export the element corresponding to rChartDoc - if bIncludeTable is true, the chart data is exported as - element (inside the chart element). - - Otherwise the external references stored in the chart document are used - for writing the corresponding attributes at series - - All attributes contained in xAttrList are written at the chart element, - which ist the outer element of a chart. So these attributes can easily - be parsed again by the container - */ - void exportChart( com::sun::star::uno::Reference< - com::sun::star::chart::XChartDocument > rChartDoc, - sal_Bool bIncludeTable ); - /// returns the string corresponding to the current FileFormat CLSID for Chart const rtl::OUString& getChartCLSID(); - UniReference< XMLPropertySetMapper > GetPropertySetMapper() const { return mxPropertySetMapper; } - - void SetChartRangeAddress( const ::rtl::OUString& rAddress ) - { msChartAddress = rAddress; } - void SetTableNumberList( const ::rtl::OUString& rList ) - { msTableNumberList = rList; } - - void InitRangeSegmentationProperties( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument > & xChartDoc ); +private: + SchXMLExportHelper(); // not defined + SchXMLExportHelper(SchXMLExportHelper &); // not defined + void operator =(SchXMLExportHelper &); // not defined - ::com::sun::star::awt::Size getPageSize( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument > & xChartDoc ) const; +private: + SchXMLExportHelper_Impl* m_pImpl; + friend class SchXMLExport; }; #endif // _XMLOFF_SCH_XMLEXPORTHELPER_HXX_ diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 70e8ed82ca49..b2ae1d8374ce 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3094,6 +3094,10 @@ namespace xmloff { namespace token { XML_ENDS_WITH, XML_DOES_NOT_END_WITH, + //chart + XML_EXCLUDING_POSITION, + XML_PREFER_EXCLUDING_POSITION, + XML_TOKEN_END }; diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f7cf82abe974..5232c757ccb7 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -81,6 +81,7 @@ #include #include #include +#include #include #include @@ -120,6 +121,162 @@ using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; +// ======================================== +// class SchXMLExportHelper_Impl +// ======================================== + +class SchXMLExportHelper_Impl +{ +public: + // first: data sequence for label, second: data sequence for values. + typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >, + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > > tLabelValuesDataPair; + typedef ::std::vector< tLabelValuesDataPair > tDataSequenceCont; + +public: + SchXMLExportHelper_Impl( SvXMLExport& rExport, + SvXMLAutoStylePoolP& rASPool ); + + virtual ~SchXMLExportHelper_Impl(); + + // auto-styles + /// parse chart and collect all auto-styles used in current pool + void collectAutoStyles( com::sun::star::uno::Reference< + com::sun::star::chart::XChartDocument > rChartDoc ); + + /// write the styles collected into the current pool as elements + void exportAutoStyles(); + + /** export the element corresponding to rChartDoc + if bIncludeTable is true, the chart data is exported as + element (inside the chart element). + + Otherwise the external references stored in the chart document are used + for writing the corresponding attributes at series + + All attributes contained in xAttrList are written at the chart element, + which ist the outer element of a chart. So these attributes can easily + be parsed again by the container + */ + void exportChart( com::sun::star::uno::Reference< + com::sun::star::chart::XChartDocument > rChartDoc, + sal_Bool bIncludeTable ); + + UniReference< XMLPropertySetMapper > GetPropertySetMapper() const; + + void SetChartRangeAddress( const ::rtl::OUString& rAddress ) + { msChartAddress = rAddress; } + void SetTableNumberList( const ::rtl::OUString& rList ) + { msTableNumberList = rList; } + + void InitRangeSegmentationProperties( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartDocument > & xChartDoc ); + + ::com::sun::star::awt::Size getPageSize( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartDocument > & xChartDoc ) const; + + /** first parseDocument: collect autostyles and store names in this queue + second parseDocument: export content and use names from this queue + */ + ::std::queue< ::rtl::OUString > maAutoStyleNameQueue; + void CollectAutoStyle( + const std::vector< XMLPropertyState >& aStates ); + void AddAutoStyleAttribute( + const std::vector< XMLPropertyState >& aStates ); + + SvXMLAutoStylePoolP& GetAutoStylePoolP() + { return mrAutoStylePool; } + + /// if bExportContent is false the auto-styles are collected + void parseDocument( com::sun::star::uno::Reference< + com::sun::star::chart::XChartDocument >& rChartDoc, + sal_Bool bExportContent, + sal_Bool bIncludeTable = sal_False ); + void exportTable(); + void exportPlotArea( + com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > xDiagram, + com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > xNewDiagram, + const ::com::sun::star::awt::Size & rPageSize, + sal_Bool bExportContent, + sal_Bool bIncludeTable ); + void exportExcludingPosition( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram >& xDiagram ); + void exportAxes( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > & xDiagram, + const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, + sal_Bool bExportContent ); + + void exportSeries( + const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, + const ::com::sun::star::awt::Size & rPageSize, + sal_Bool bExportContent, + sal_Bool bHasTwoYAxes ); + void exportCandleStickSeries( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataSeries > > & aSeriesSeq, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDiagram > & xDiagram, + sal_Bool bJapaneseCandleSticks, + sal_Bool bExportContent ); + void exportDataPoints( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & xSeriesProperties, + sal_Int32 nSeriesLength, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDiagram > & xDiagram, + sal_Bool bExportContent ); + void exportRegressionCurve( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataSeries > & xSeries, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & xSeriesProp, + const ::com::sun::star::awt::Size & rPageSize, + sal_Bool bExportContent ); + + /// add svg position as attribute for current element + 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 ); + /// fills the member msString with the appropriate String (i.e. "A3") + void getCellAddress( sal_Int32 nCol, sal_Int32 nRow ); + /// interchanges rows and columns of the sequence given + void swapDataArray( com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< double > >& rSequence ); + /// exports a string as a paragraph element + void exportText( const ::rtl::OUString& rText, bool bConvertTabsLFs = false ); + void exportErrorBarRanges(); + + SchXMLExportHelper_Impl(SchXMLExportHelper_Impl &); // not defined + void operator =(SchXMLExportHelper_Impl &); // not defined + +public: + SvXMLExport& mrExport; + SvXMLAutoStylePoolP& mrAutoStylePool; + UniReference< XMLPropertyHandlerFactory > mxPropertyHandlerFactory; + UniReference< XMLPropertySetMapper > mxPropertySetMapper; + UniReference< XMLChartExportPropertyMapper > mxExpPropMapper; + + rtl::OUString msTableName; + rtl::OUStringBuffer msStringBuffer; + rtl::OUString msString; + + // members filled by InitRangeSegmentationProperties (retrieved from DataProvider) + sal_Bool mbHasSeriesLabels; + sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false + sal_Bool mbRowSourceColumns; + rtl::OUString msChartAddress; + rtl::OUString msTableNumberList; + ::com::sun::star::uno::Sequence< sal_Int32 > maSequenceMapping; + + rtl::OUString msCLSID; + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes; + + tDataSequenceCont m_aDataSequencesToExport; +}; + namespace { Reference< uno::XComponentContext > lcl_getComponentContext() @@ -369,7 +526,7 @@ tLabelAndValueRange lcl_getLabelAndValueRangeByRole( const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aSeqCnt, const OUString & rRole, const Reference< chart2::XChartDocument > & xDoc, - SchXMLExportHelper::tDataSequenceCont & rOutSequencesToExport ) + SchXMLExportHelper_Impl::tDataSequenceCont & rOutSequencesToExport ) { tLabelAndValueRange aResult; @@ -386,7 +543,7 @@ tLabelAndValueRange lcl_getLabelAndValueRangeByRole( aResult.second = lcl_ConvertRange( xValueSeq->getSourceRangeRepresentation(), xDoc ); if( xLabelSeq.is() || xValueSeq.is()) - rOutSequencesToExport.push_back( SchXMLExportHelper::tLabelValuesDataPair( xLabelSeq, xValueSeq )); + rOutSequencesToExport.push_back( SchXMLExportHelper_Impl::tLabelValuesDataPair( xLabelSeq, xValueSeq )); } return aResult; @@ -468,10 +625,10 @@ OUString lcl_getLabelString( const Reference< chart2::data::XDataSequence > & xL } sal_Int32 lcl_getMaxSequenceLength( - const SchXMLExportHelper::tDataSequenceCont & rContainer ) + const SchXMLExportHelper_Impl::tDataSequenceCont & rContainer ) { sal_Int32 nResult = 0; - for( SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( rContainer.begin()); + for( SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aIt( rContainer.begin()); aIt != rContainer.end(); ++aIt ) { if( aIt->first.is()) @@ -610,7 +767,7 @@ template< class T > }; -typedef ::std::map< sal_Int32, SchXMLExportHelper::tLabelValuesDataPair > +typedef ::std::map< sal_Int32, SchXMLExportHelper_Impl::tLabelValuesDataPair > lcl_DataSequenceMap; struct lcl_SequenceToMapElement : @@ -642,7 +799,7 @@ private: }; void lcl_PrepareInternalSequencesForTableExport( - SchXMLExportHelper::tDataSequenceCont & rInOutSequences, bool bHasCategories ) + SchXMLExportHelper_Impl::tDataSequenceCont & rInOutSequences, bool bHasCategories ) { lcl_DataSequenceMap aIndexSequenceMap; const sal_Int32 nOffset = bHasCategories ? 1 : 0; @@ -660,7 +817,7 @@ void lcl_PrepareInternalSequencesForTableExport( // fill empty columns for( ; nIndex < aIt->first; ++nIndex ) rInOutSequences.push_back( - SchXMLExportHelper::tDataSequenceCont::value_type( 0, 0 )); + SchXMLExportHelper_Impl::tDataSequenceCont::value_type( 0, 0 )); OSL_ASSERT( nIndex == aIt->first ); rInOutSequences.push_back( aIt->second ); } @@ -668,21 +825,21 @@ void lcl_PrepareInternalSequencesForTableExport( lcl_TableData lcl_getDataForLocalTable( - const SchXMLExportHelper::tDataSequenceCont & aPassedSequences, bool bHasCategoryLabels, + const SchXMLExportHelper_Impl::tDataSequenceCont & aPassedSequences, bool bHasCategoryLabels, bool bSwap, bool bHasOwnData, const Reference< chart2::data::XRangeXMLConversion > & xRangeConversion ) { lcl_TableData aResult; - SchXMLExportHelper::tDataSequenceCont aSequencesToExport( aPassedSequences ); + SchXMLExportHelper_Impl::tDataSequenceCont aSequencesToExport( aPassedSequences ); if( bHasOwnData ) lcl_PrepareInternalSequencesForTableExport( aSequencesToExport, bHasCategoryLabels ); - SchXMLExportHelper::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size(); - SchXMLExportHelper::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin()); - SchXMLExportHelper::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end()); - SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( aBegin ); + SchXMLExportHelper_Impl::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size(); + SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin()); + SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end()); + SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aIt( aBegin ); if( bHasCategoryLabels ) { @@ -876,7 +1033,53 @@ struct SchXMLDataPointStruct // class SchXMLExportHelper // ======================================== -SchXMLExportHelper::SchXMLExportHelper( +SchXMLExportHelper::SchXMLExportHelper( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ) + : m_pImpl( new SchXMLExportHelper_Impl( rExport, rASPool ) ) +{ +} + +SchXMLExportHelper::~SchXMLExportHelper() +{ + delete m_pImpl; +} + +const OUString& SchXMLExportHelper::getChartCLSID() +{ + return m_pImpl->msCLSID; +} + +UniReference< XMLPropertySetMapper > SchXMLExportHelper_Impl::GetPropertySetMapper() const +{ + return mxPropertySetMapper; +} + +void SchXMLExportHelper_Impl::exportAutoStyles() +{ + if( mxExpPropMapper.is()) + { + //ToDo: when embedded in calc/writer this is not necessary because the + // numberformatter is shared between both documents + mrExport.exportAutoDataStyles(); + + // export chart auto styles + mrAutoStylePool.exportXML( + XML_STYLE_FAMILY_SCH_CHART_ID + , mrExport.GetDocHandler(), + mrExport.GetMM100UnitConverter(), + mrExport.GetNamespaceMap() + ); + + // export auto styles for additional shapes + mrExport.GetShapeExport()->exportAutoStyles(); + // and for text in additional shapes + mrExport.GetTextParagraphExport()->exportTextAutoStyles(); + } +} + +// private methods +// --------------- + +SchXMLExportHelper_Impl::SchXMLExportHelper_Impl( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ) : mrExport( rExport ), @@ -945,56 +1148,22 @@ SchXMLExportHelper::SchXMLExportHelper( String( 'T' )); } -SchXMLExportHelper::~SchXMLExportHelper() {} - -const OUString& SchXMLExportHelper::getChartCLSID() +SchXMLExportHelper_Impl::~SchXMLExportHelper_Impl() { - return msCLSID; } -void SchXMLExportHelper::exportAutoStyles() +void SchXMLExportHelper_Impl::collectAutoStyles( Reference< chart::XChartDocument > rChartDoc ) { - if( mxExpPropMapper.is()) - { - //ToDo: when embedded in calc/writer this is not necessary because the - // numberformatter is shared between both documents - mrExport.exportAutoDataStyles(); - - // export chart auto styles - mrAutoStylePool.exportXML( - XML_STYLE_FAMILY_SCH_CHART_ID - , mrExport.GetDocHandler(), - mrExport.GetMM100UnitConverter(), - mrExport.GetNamespaceMap() - ); - - // export auto styles for additional shapes - mrExport.GetShapeExport()->exportAutoStyles(); - // and for text in additional shapes - mrExport.GetTextParagraphExport()->exportTextAutoStyles(); - } -} - -void SchXMLExportHelper::collectAutoStyles( Reference< chart::XChartDocument > rChartDoc ) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogContext, "xmloff", "bm", "::SchXMLExportHelper::collectAutoStyles" ); - parseDocument( rChartDoc, sal_False ); } -void SchXMLExportHelper::exportChart( Reference< chart::XChartDocument > rChartDoc, +void SchXMLExportHelper_Impl::exportChart( Reference< chart::XChartDocument > rChartDoc, sal_Bool bIncludeTable ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogContext, "xmloff", "bm", "::SchXMLExportHelper::exportChart" ); - parseDocument( rChartDoc, sal_True, bIncludeTable ); DBG_ASSERT( maAutoStyleNameQueue.empty(), "There are still remaining autostyle names in the queue" ); } - -// private methods -// --------------- - ::rtl::OUString lcl_GetStringFromNumberSequence( const ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping, bool bRemoveOneFromEachIndex /*should be true if having categories*/ ) { const sal_Int32* pArray = rSequenceMapping.getConstArray(); @@ -1019,7 +1188,7 @@ void SchXMLExportHelper::exportChart( Reference< chart::XChartDocument > rChartD } /// if bExportContent is false the auto-styles are collected -void SchXMLExportHelper::parseDocument( Reference< chart::XChartDocument >& rChartDoc, +void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& rChartDoc, sal_Bool bExportContent, sal_Bool bIncludeTable ) { @@ -1455,7 +1624,7 @@ void SchXMLExportHelper::parseDocument( Reference< chart::XChartDocument >& rCha delete pElChart; } -void SchXMLExportHelper::exportTable() +void SchXMLExportHelper_Impl::exportTable() { // table element // ------------- @@ -1593,7 +1762,7 @@ void SchXMLExportHelper::exportTable() OSL_ASSERT( bHasOwnData || (aFirstColumnRangeIter == aFirstColumnRangeEndIter) ); } -void SchXMLExportHelper::exportPlotArea( +void SchXMLExportHelper_Impl::exportPlotArea( Reference< chart::XDiagram > xDiagram, Reference< chart2::XDiagram > xNewDiagram, const awt::Size & rPageSize, @@ -1753,9 +1922,12 @@ void SchXMLExportHelper::exportPlotArea( } } - // element + // plot-area element pElPlotArea = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_PLOT_AREA, sal_True, sal_True ); + //inner position rectangle element + exportExcludingPosition( xDiagram ); + // light sources (inside plot area element) if( bIs3DChart && rShapeExport.is()) @@ -1916,7 +2088,27 @@ void SchXMLExportHelper::exportPlotArea( delete pElPlotArea; } -void SchXMLExportHelper::exportAxes( +void SchXMLExportHelper_Impl::exportExcludingPosition( const uno::Reference< chart::XDiagram >& xDiagram ) +{ + Reference< chart::XDiagramPositioning > xDiaPos( xDiagram, uno::UNO_QUERY ); + DBG_ASSERT( xDiaPos.is(), "Invalid xDiaPos as parameter" ); + if( !xDiaPos.is() ) + return; + + awt::Rectangle aRect( xDiaPos->calculateDiagramPositionExcludingAxes() ); + addPosition( awt::Point(aRect.X,aRect.Y) ); + addSize( awt::Size(aRect.Width,aRect.Height) ); + + sal_Bool bPreferExcludingPositioning = xDiaPos->isExcludingDiagramPositioning(); + rtl::OUStringBuffer sStringBuffer; + SvXMLUnitConverter::convertBool( sStringBuffer, bPreferExcludingPositioning ); + String aString( sStringBuffer.makeStringAndClear() ); + mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_PREFER_EXCLUDING_POSITION, aString ); + + SvXMLElementExport aExcludingPosition( mrExport, XML_NAMESPACE_CHART, XML_EXCLUDING_POSITION, sal_True, sal_True ); +} + +void SchXMLExportHelper_Impl::exportAxes( const Reference< chart::XDiagram > & xDiagram, const Reference< chart2::XDiagram > & xNewDiagram, sal_Bool bExportContent ) @@ -2518,7 +2710,7 @@ void SchXMLExportHelper::exportAxes( } } -void SchXMLExportHelper::exportSeries( +void SchXMLExportHelper_Impl::exportSeries( const Reference< chart2::XDiagram > & xNewDiagram, const awt::Size & rPageSize, sal_Bool bExportContent, @@ -2887,7 +3079,7 @@ void SchXMLExportHelper::exportSeries( } } -void SchXMLExportHelper::exportRegressionCurve( +void SchXMLExportHelper_Impl::exportRegressionCurve( const Reference< chart2::XDataSeries > & xSeries, const Reference< beans::XPropertySet > & xSeriesProp, const awt::Size & rPageSize, @@ -2994,7 +3186,7 @@ void SchXMLExportHelper::exportRegressionCurve( } } -void SchXMLExportHelper::exportCandleStickSeries( +void SchXMLExportHelper_Impl::exportCandleStickSeries( const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq, const Reference< chart2::XDiagram > & xDiagram, sal_Bool bJapaneseCandleSticks, @@ -3112,7 +3304,7 @@ void SchXMLExportHelper::exportCandleStickSeries( } } -void SchXMLExportHelper::exportDataPoints( +void SchXMLExportHelper_Impl::exportDataPoints( const uno::Reference< beans::XPropertySet > & xSeriesProperties, sal_Int32 nSeriesLength, const uno::Reference< chart2::XDiagram > & xDiagram, @@ -3360,7 +3552,7 @@ void SchXMLExportHelper::exportDataPoints( } -void SchXMLExportHelper::getCellAddress( sal_Int32 nCol, sal_Int32 nRow ) +void SchXMLExportHelper_Impl::getCellAddress( sal_Int32 nCol, sal_Int32 nRow ) { msStringBuffer.append( (sal_Unicode)'.' ); if( nCol < 26 ) @@ -3380,7 +3572,7 @@ void SchXMLExportHelper::getCellAddress( sal_Int32 nCol, sal_Int32 nRow ) msStringBuffer.append( nRow + (sal_Int32)1 ); } -void SchXMLExportHelper::addPosition( const awt::Point & rPosition ) +void SchXMLExportHelper_Impl::addPosition( const awt::Point & rPosition ) { mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rPosition.X ); msString = msStringBuffer.makeStringAndClear(); @@ -3391,13 +3583,13 @@ void SchXMLExportHelper::addPosition( const awt::Point & rPosition ) mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_Y, msString ); } -void SchXMLExportHelper::addPosition( Reference< drawing::XShape > xShape ) +void SchXMLExportHelper_Impl::addPosition( Reference< drawing::XShape > xShape ) { if( xShape.is()) addPosition( xShape->getPosition()); } -void SchXMLExportHelper::addSize( const awt::Size & rSize ) +void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize ) { mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Width ); msString = msStringBuffer.makeStringAndClear(); @@ -3408,13 +3600,13 @@ void SchXMLExportHelper::addSize( const awt::Size & rSize ) mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, msString ); } -void SchXMLExportHelper::addSize( Reference< drawing::XShape > xShape ) +void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape ) { if( xShape.is()) addSize( xShape->getSize() ); } -awt::Size SchXMLExportHelper::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const +awt::Size SchXMLExportHelper_Impl::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const { awt::Size aSize( 8000, 7000 ); uno::Reference< embed::XVisualObject > xVisualObject( xChartDoc, uno::UNO_QUERY ); @@ -3425,7 +3617,7 @@ awt::Size SchXMLExportHelper::getPageSize( const Reference< chart2::XChartDocume return aSize; } -void SchXMLExportHelper::swapDataArray( Sequence< Sequence< double > >& rSequence ) +void SchXMLExportHelper_Impl::swapDataArray( Sequence< Sequence< double > >& rSequence ) { sal_Int32 nOuterSize = rSequence.getLength(); sal_Int32 nInnerSize = rSequence[0].getLength(); // assume that all subsequences have same length @@ -3443,13 +3635,13 @@ void SchXMLExportHelper::swapDataArray( Sequence< Sequence< double > >& rSequenc rSequence = aResult; } -void SchXMLExportHelper::CollectAutoStyle( const std::vector< XMLPropertyState >& aStates ) +void SchXMLExportHelper_Impl::CollectAutoStyle( const std::vector< XMLPropertyState >& aStates ) { if( !aStates.empty() ) maAutoStyleNameQueue.push( GetAutoStylePoolP().Add( XML_STYLE_FAMILY_SCH_CHART_ID, aStates )); } -void SchXMLExportHelper::AddAutoStyleAttribute( const std::vector< XMLPropertyState >& aStates ) +void SchXMLExportHelper_Impl::AddAutoStyleAttribute( const std::vector< XMLPropertyState >& aStates ) { if( !aStates.empty() ) { @@ -3460,7 +3652,7 @@ void SchXMLExportHelper::AddAutoStyleAttribute( const std::vector< XMLPropertySt } } -void SchXMLExportHelper::exportText( const OUString& rText, bool bConvertTabsLFs ) +void SchXMLExportHelper_Impl::exportText( const OUString& rText, bool bConvertTabsLFs ) { SchXMLTools::exportText( mrExport, rText, bConvertTabsLFs ); } @@ -3493,7 +3685,7 @@ SchXMLExport::~SchXMLExport() sal_uInt32 SchXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) { Reference< chart2::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY ); - maExportHelper.InitRangeSegmentationProperties( xChartDoc ); + maExportHelper.m_pImpl->InitRangeSegmentationProperties( xChartDoc ); return SvXMLExport::exportDoc( eClass ); } @@ -3516,8 +3708,8 @@ void SchXMLExport::_ExportAutoStyles() Reference< chart::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY ); if( xChartDoc.is()) { - maExportHelper.collectAutoStyles( xChartDoc ); - maExportHelper.exportAutoStyles(); + maExportHelper.m_pImpl->collectAutoStyles( xChartDoc ); + maExportHelper.m_pImpl->exportAutoStyles(); } else { @@ -3566,13 +3758,13 @@ void SchXMLExport::_ExportContent() aAny = xProp->getPropertyValue( OUString::createFromAscii( "ChartRangeAddress" )); aAny >>= sChartAddress; - maExportHelper.SetChartRangeAddress( sChartAddress ); + maExportHelper.m_pImpl->SetChartRangeAddress( sChartAddress ); OUString sTableNumberList; aAny = xProp->getPropertyValue( OUString::createFromAscii( "TableNumberList" )); aAny >>= sTableNumberList; - maExportHelper.SetTableNumberList( sTableNumberList ); + maExportHelper.m_pImpl->SetTableNumberList( sTableNumberList ); // do not include own table if there are external addresses bIncludeTable = (sChartAddress.getLength() == 0); @@ -3585,7 +3777,7 @@ void SchXMLExport::_ExportContent() } } } - maExportHelper.exportChart( xChartDoc, bIncludeTable ); + maExportHelper.m_pImpl->exportChart( xChartDoc, bIncludeTable ); } else { @@ -3600,7 +3792,12 @@ void SchXMLExport::SetProgress( sal_Int32 nPercentage ) mxStatusIndicator->setValue( nPercentage ); } -void SchXMLExportHelper::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc ) +UniReference< XMLPropertySetMapper > SchXMLExport::GetPropertySetMapper() const +{ + return maExportHelper.m_pImpl->GetPropertySetMapper(); +} + +void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc ) { if( xChartDoc.is()) try diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index dd955e6d69d5..1087845f965e 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -285,6 +285,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap() { static __FAR_DATA SvXMLTokenMapEntry aPlotAreaElemTokenMap[] = { + { XML_NAMESPACE_CHART, XML_EXCLUDING_POSITION, XML_TOK_PA_EXCLUDING_POSITION }, { XML_NAMESPACE_CHART, XML_AXIS, XML_TOK_PA_AXIS }, { XML_NAMESPACE_CHART, XML_SERIES, XML_TOK_PA_SERIES }, { XML_NAMESPACE_CHART, XML_WALL, XML_TOK_PA_WALL }, diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 8bb4712b4159..37fa8249d9c8 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -64,6 +64,7 @@ #include #include #include +#include #include #include @@ -202,8 +203,8 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext( mnSeries( 0 ), m_aGlobalSeriesImportInfo( rAllRangeAddressesAvailable ), maSceneImportHelper( rImport ), - mbHasSize(false), - mbHasPosition(false), + m_aOuterPositioning( rImport ), + m_aInnerPositioning( rImport ), mbPercentStacked(false), m_bAxisPositionAttributeImported(false), m_rXLinkHRefAttributeToIndicateDataProvider(rXLinkHRefAttributeToIndicateDataProvider), @@ -299,15 +300,6 @@ SchXMLPlotAreaContext::~SchXMLPlotAreaContext() void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - uno::Any aTransMatrixAny; - - // initialize size and position - uno::Reference< drawing::XShape > xDiaShape( mxDiagram, uno::UNO_QUERY ); - bool bHasSizeWidth = false; - bool bHasSizeHeight = false; - bool bHasPositionX = false; - bool bHasPositionY = false; - // parse attributes sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetPlotAreaAttrTokenMap(); @@ -323,20 +315,10 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri switch( rAttrTokenMap.Get( nPrefix, aLocalName )) { case XML_TOK_PA_X: - GetImport().GetMM100UnitConverter().convertMeasure( maPosition.X, aValue ); - bHasPositionX = true; - break; case XML_TOK_PA_Y: - GetImport().GetMM100UnitConverter().convertMeasure( maPosition.Y, aValue ); - bHasPositionY = true; - break; case XML_TOK_PA_WIDTH: - GetImport().GetMM100UnitConverter().convertMeasure( maSize.Width, aValue ); - bHasSizeWidth = true; - break; case XML_TOK_PA_HEIGHT: - GetImport().GetMM100UnitConverter().convertMeasure( maSize.Height, aValue ); - bHasSizeHeight = true; + m_aOuterPositioning.readPositioningAttribute( nPrefix, aLocalName, aValue ); break; case XML_TOK_PA_STYLE_NAME: msAutoStyleName = aValue; @@ -372,9 +354,6 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri } } - mbHasSize = bHasSizeWidth && bHasSizeHeight; - mbHasPosition = bHasPositionX && bHasPositionY; - if( ! mxNewDoc.is()) { uno::Reference< beans::XPropertySet > xDocProp( mrImportHelper.GetChartDocument(), uno::UNO_QUERY ); @@ -429,14 +408,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lines")), pPropStyleContext, pStylesCtxt ); //handle automatic position and size - bool bAutoSize = false; - bool bAutoPosition = false; - SchXMLTools::getPropertyFromContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticSize")), pPropStyleContext, pStylesCtxt ) >>= bAutoSize; - SchXMLTools::getPropertyFromContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticPosition")), pPropStyleContext, pStylesCtxt ) >>= bAutoPosition; - mbHasSize = mbHasSize && !bAutoSize; - mbHasPosition = mbHasPosition && !bAutoPosition; + m_aOuterPositioning.readAutomaticPositioningProperties( pPropStyleContext, pStylesCtxt ); //correct default starting angle for old 3D pies if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_0( GetImport().GetModel() ) ) @@ -551,6 +523,12 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( switch( rTokenMap.Get( nPrefix, rLocalName )) { + case XML_TOK_PA_EXCLUDING_POSITION: + { + pContext = new SchXMLExcludingPositionContext( GetImport(), nPrefix, rLocalName, m_aInnerPositioning ); + } + break; + case XML_TOK_PA_AXIS: { bool bAddMissingXAxisForNetCharts = false; @@ -714,13 +692,14 @@ void SchXMLPlotAreaContext::EndElement() } // set changed size and position after properties (esp. 3d) - uno::Reference< drawing::XShape > xDiaShape( mxDiagram, uno::UNO_QUERY ); - if( xDiaShape.is()) + + uno::Reference< chart::XDiagramPositioning > xDiaPos( mxDiagram, uno::UNO_QUERY ); + if( xDiaPos.is()) { - if( mbHasSize ) - xDiaShape->setSize( maSize ); - if( mbHasPosition ) - xDiaShape->setPosition( maPosition ); + if( m_aInnerPositioning.hasPosSize() ) + xDiaPos->setDiagramPositionExcludingAxes( m_aInnerPositioning.getRectangle() ); + else if( m_aOuterPositioning.hasPosSize() ) + xDiaPos->setDiagramPositionIncludingAxesAndAxesTitles( m_aOuterPositioning.getRectangle() ); } CorrectAxisPositions(); @@ -1680,6 +1659,143 @@ void SchXMLCategoriesContext::StartElement( const uno::Reference< xml::sax::XAtt // ======================================== +SchXMLPositonAttributesHelper::SchXMLPositonAttributesHelper( SvXMLImport& rImporter ) + : m_rImport( rImporter ) + , m_aPosition(0,0) + , m_aSize(0,0) + , m_bHasSizeWidth( false ) + , m_bHasSizeHeight( false ) + , m_bHasPositionX( false ) + , m_bHasPositionY( false ) + , m_bAutoSize( false ) + , m_bAutoPosition( false ) +{ +} + +SchXMLPositonAttributesHelper::~SchXMLPositonAttributesHelper() +{ +} + +bool SchXMLPositonAttributesHelper::hasSize() const +{ + return m_bHasSizeWidth && m_bHasSizeHeight && !m_bAutoSize; +} +bool SchXMLPositonAttributesHelper::hasPosition() const +{ + return m_bHasPositionX && m_bHasPositionY && !m_bAutoPosition; +} +bool SchXMLPositonAttributesHelper::hasPosSize() const +{ + return hasPosition() && hasSize(); +} +awt::Point SchXMLPositonAttributesHelper::getPosition() const +{ + return m_aPosition; +} +awt::Size SchXMLPositonAttributesHelper::getSize() const +{ + return m_aSize; +} +awt::Rectangle SchXMLPositonAttributesHelper::getRectangle() const +{ + return awt::Rectangle( m_aPosition.X, m_aPosition.Y, m_aSize.Width, m_aSize.Height ); +} + +bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ) +{ + //returns true if the attribute was proccessed + bool bReturn = true; + + if( XML_NAMESPACE_SVG == nPrefix ) + { + if( IsXMLToken( rLocalName, XML_X ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aPosition.X, rValue ); + m_bHasPositionX = true; + } + else if( IsXMLToken( rLocalName, XML_Y ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aPosition.Y, rValue ); + m_bHasPositionY = true; + } + else if( IsXMLToken( rLocalName, XML_WIDTH ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aSize.Width, rValue ); + m_bHasSizeWidth = true; + } + else if( IsXMLToken( rLocalName, XML_HEIGHT ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aSize.Height, rValue ); + m_bHasSizeHeight = true; + } + else + bReturn = false; + } + else if( XML_NAMESPACE_CHART == nPrefix ) + { + //Attribute( XML_NAMESPACE_CHART, XML_PREFER_EXCLUDING_POSITION + + sal_Bool bPreferExcludingPosition = false; + if( IsXMLToken( rLocalName, XML_PREFER_EXCLUDING_POSITION ) ) + { + m_rImport.GetMM100UnitConverter().convertBool( bPreferExcludingPosition, rValue ); + m_bAutoPosition = m_bAutoSize = !bPreferExcludingPosition; + } + else + bReturn = false; + } + else + bReturn = false; + + return bReturn; +} + + +void SchXMLPositonAttributesHelper::readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ) +{ + if( pPropStyleContext && pStylesCtxt ) + { + //handle automatic position and size + SchXMLTools::getPropertyFromContext( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticSize")), pPropStyleContext, pStylesCtxt ) >>= m_bAutoSize; + SchXMLTools::getPropertyFromContext( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticPosition")), pPropStyleContext, pStylesCtxt ) >>= m_bAutoPosition; + } +} + +// ======================================== + +SchXMLExcludingPositionContext::SchXMLExcludingPositionContext( + SvXMLImport& rImport + , sal_uInt16 nPrefix + , const rtl::OUString& rLocalName + , SchXMLPositonAttributesHelper& rPositioning ) + : SvXMLImportContext( rImport, nPrefix, rLocalName ) + , m_rPositioning( rPositioning ) +{ +} + +SchXMLExcludingPositionContext::~SchXMLExcludingPositionContext() +{ +} + +void SchXMLExcludingPositionContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) +{ + // parse attributes + sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; + + for( sal_Int16 i = 0; i < nAttrCount; i++ ) + { + rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); + rtl::OUString aLocalName; + rtl::OUString aValue = xAttrList->getValueByIndex( i ); + USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + m_rPositioning.readPositioningAttribute( nPrefix, aLocalName, aValue ); + } +} + +// ======================================== + SchXMLWallFloorContext::SchXMLWallFloorContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index ed01ad2fa8da..af6f600200d5 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -69,6 +69,42 @@ private: SchXML3DSceneAttributesHelper(); }; +// ---------------------------------------- + +class SchXMLPositonAttributesHelper +{ +public: + SchXMLPositonAttributesHelper( SvXMLImport& rImporter ); + ~SchXMLPositonAttributesHelper(); + + bool readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); + void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); + + bool hasPosSize() const; + ::com::sun::star::awt::Rectangle getRectangle() const; + + +private: + bool hasSize() const; + bool hasPosition() const; + ::com::sun::star::awt::Size getSize() const; + ::com::sun::star::awt::Point getPosition() const; + + SvXMLImport& m_rImport; + + ::com::sun::star::awt::Point m_aPosition; + ::com::sun::star::awt::Size m_aSize; + + bool m_bHasSizeWidth; + bool m_bHasSizeHeight; + bool m_bHasPositionX; + bool m_bHasPositionY; + sal_Bool m_bAutoSize; + sal_Bool m_bAutoPosition; +}; + +// ---------------------------------------- + class SchXMLPlotAreaContext : public SvXMLImportContext { public: @@ -113,10 +149,8 @@ private: GlobalSeriesImportInfo m_aGlobalSeriesImportInfo; SchXML3DSceneAttributesHelper maSceneImportHelper; - ::com::sun::star::awt::Size maSize; - ::com::sun::star::awt::Point maPosition; - bool mbHasSize; - bool mbHasPosition; + SchXMLPositonAttributesHelper m_aOuterPositioning;//including axes and axes titles + SchXMLPositonAttributesHelper m_aInnerPositioning;//excluding axes and axes titles bool mbPercentStacked; bool m_bAxisPositionAttributeImported; ::rtl::OUString msAutoStyleName; @@ -219,6 +253,23 @@ public: // ---------------------------------------- +class SchXMLExcludingPositionContext : public SvXMLImportContext +{ +public: + SchXMLExcludingPositionContext( + SvXMLImport& rImport + , sal_uInt16 nPrefix + , const rtl::OUString& rLocalName + , SchXMLPositonAttributesHelper& rPositioning ); + virtual ~SchXMLExcludingPositionContext(); + virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); + +private: + SchXMLPositonAttributesHelper& m_rPositioning; +}; + +// ---------------------------------------- + class SchXMLWallFloorContext : public SvXMLImportContext { public: diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index ae95763f1936..8b0155d1b08a 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3095,6 +3095,9 @@ namespace xmloff { namespace token { TOKEN( "ends-with", XML_ENDS_WITH ), TOKEN( "does-not-end-with", XML_DOES_NOT_END_WITH ), + TOKEN( "excluding-position", XML_EXCLUDING_POSITION ), + TOKEN( "prefer-excluding-position", XML_PREFER_EXCLUDING_POSITION ), + #if OSL_DEBUG_LEVEL > 0 { 0, NULL, NULL, XML_TOKEN_END } #else diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index b2e81d333fba..b55942cfb00c 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -1250,27 +1249,6 @@ void XMLShapeExport::ImpExportChartShape( SvXMLAttributeList* pAttrList ) { ImpExportOLE2Shape( xShape, eShapeType, nFeatures, pRefPoint, pAttrList ); -/* - // Transformation - ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); - - uno::Reference< chart::XChartDocument > xChartDoc; - if( !bIsEmptyPresObj ) - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) ) >>= xChartDoc; - - if( xChartDoc.is() ) - { - // export chart data if the flag is not set (default) - sal_Bool bExportOwnData = ( nFeatures & SEF_EXPORT_NO_CHART_DATA ) == 0; - mrExport.GetChartExport()->exportChart( xChartDoc, bExportOwnData ); - } - else - { - // write chart object (fake for now, replace later) - SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_CHART, XML_CHART, sal_True, sal_True); - } - } -*/ } ////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 9b67f9758e7d102b2a38210066ba6434a5013b25 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 25 Nov 2009 16:48:44 +0000 Subject: #i51258# thesaurus for right click context menu --- officecfg/registry/data/org/openoffice/Office/Accelerators.xcu | 6 +++--- .../registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index 355879f036ac..c0833527f8d8 100644 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -536,7 +536,7 @@ I10N SHORTCUTS - NO TRANSLATE - .uno:Thesaurus + .uno:ThesaurusDialog @@ -1075,7 +1075,7 @@ I10N SHORTCUTS - NO TRANSLATE - .uno:Thesaurus + .uno:ThesaurusDialog @@ -2027,7 +2027,7 @@ I10N SHORTCUTS - NO TRANSLATE - .uno:Thesaurus + .uno:ThesaurusDialog diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 556c9776fad7..eb6bdc4249e5 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -3016,7 +3016,7 @@ New FrameSet - + ~Thesaurus... -- cgit v1.2.3 From b5c61b525cca0d0dbec58273a5209cdc45b742e6 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 25 Nov 2009 16:49:20 +0000 Subject: #i51258# thesaurus for right click context menu --- vcl/source/window/seleng.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index 136d8ad968b7..3b24b34855c8 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -203,7 +203,11 @@ void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL bMod1 ) BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { nFlags &= (~SELENG_CMDEVT); - if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() ) + if ( !pFunctionSet || !pWin ) + return FALSE; + const bool bRightClickCursorPositioning = + rMEvt.IsRight() && rMEvt.GetClicks() == 1 && !IsInSelection(); + if ( (rMEvt.GetClicks() > 1 || rMEvt.IsRight()) && !bRightClickCursorPositioning ) return FALSE; USHORT nModifier = rMEvt.GetModifier() | nLockedMods; -- cgit v1.2.3 From 3a93b09b046b34701749e403c45b921cb61bd80c Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 25 Nov 2009 16:49:51 +0000 Subject: #i51258# thesaurus for right click context menu --- sfx2/inc/sfx2/mnumgr.hxx | 5 + sfx2/inc/sfx2/sfxsids.hrc | 3 + sfx2/sdi/sfx.sdi | 26 ++++ sfx2/source/menu/makefile.mk | 5 +- sfx2/source/menu/menu.hrc | 4 + sfx2/source/menu/menu.src | 15 +++ sfx2/source/menu/mnumgr.cxx | 83 +++++++++++- sfx2/source/menu/thessubmenu.cxx | 274 +++++++++++++++++++++++++++++++++++++++ sfx2/source/menu/thessubmenu.hxx | 103 +++++++++++++++ 9 files changed, 515 insertions(+), 3 deletions(-) create mode 100755 sfx2/source/menu/thessubmenu.cxx create mode 100755 sfx2/source/menu/thessubmenu.hxx diff --git a/sfx2/inc/sfx2/mnumgr.hxx b/sfx2/inc/sfx2/mnumgr.hxx index eaad0adab79d..afef61884bcf 100644 --- a/sfx2/inc/sfx2/mnumgr.hxx +++ b/sfx2/inc/sfx2/mnumgr.hxx @@ -105,6 +105,11 @@ private: DECL_LINK( SelectHdl, void * ); Menu* pSVMenu; + // when #i107205 gets fixed this one should be superfluous. + // But right now we want to avoid the memory leak that would otherwise occur, + // if we don't delete the pointer that got created in SfxPopupMenuManager::Popup + static PopupMenu * pStaticThesSubMenu; + private: // only declared, but not defined: don't allow copying SfxPopupMenuManager( const SfxPopupMenuManager& ); diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index c15c09a09384..83da76463ce1 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -746,6 +746,9 @@ #define SID_CAPTION (SID_SFX_START + 641) #define SID_STATUSBARTEXT (SID_SFX_START + 642) +// id for thesaurs entry in context menu +#define SID_THES (SID_SFX_START + 698) + // default-ids for editing, cursor travellung and selection #define SID_REDO (SID_SFX_START + 700) #define SID_UNDO (SID_SFX_START + 701) diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 26f55ccdd178..ed69beb09bef 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -8827,3 +8827,29 @@ SfxInt16Item PasteUnformatted SID_PASTE_UNFORMATTED GroupId = GID_EDIT; ] +//-------------------------------------------------------------------------- +// call thesaurus dialog from context menu +SfxInt16Item ThesaurusFromContext SID_THES +(SfxStringItem WordReplace SID_THES) +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_TEXT; +] + diff --git a/sfx2/source/menu/makefile.mk b/sfx2/source/menu/makefile.mk index 57a02ceef9f9..aa622be7502c 100644 --- a/sfx2/source/menu/makefile.mk +++ b/sfx2/source/menu/makefile.mk @@ -47,10 +47,11 @@ SRS1NAME=$(TARGET) SRC1FILES = menu.src SLOFILES = \ + $(SLO)$/mnuitem.obj \ $(SLO)$/mnumgr.obj \ - $(SLO)$/virtmenu.obj \ $(SLO)$/objmnctl.obj \ - $(SLO)$/mnuitem.obj + $(SLO)$/thessubmenu.obj \ + $(SLO)$/virtmenu.obj # --- Tagets ------------------------------------------------------- diff --git a/sfx2/source/menu/menu.hrc b/sfx2/source/menu/menu.hrc index f339f07f247a..0a5e4b63bf1d 100644 --- a/sfx2/source/menu/menu.hrc +++ b/sfx2/source/menu/menu.hrc @@ -67,6 +67,10 @@ #define STR_MENU_ADDONS RID_SFX_MENU_START+2 #define STR_MENU_ADDONHELP RID_SFX_MENU_START+3 +#define STR_MENU_SYNONYMS (RID_SFX_MENU_START+11) +#define STR_MENU_NO_SYNONYM_FOUND (RID_SFX_MENU_START+12) +#define STR_MENU_THESAURUS (RID_SFX_MENU_START+13) + #define MN_CLIPBOARDFUNCS RID_SFX_MENU_START+1 #endif diff --git a/sfx2/source/menu/menu.src b/sfx2/source/menu/menu.src index a2ca838cd722..757d6b94da28 100644 --- a/sfx2/source/menu/menu.src +++ b/sfx2/source/menu/menu.src @@ -75,6 +75,21 @@ String STR_MENU_ADDONHELP Text [ en-US ] = "Add-~On Help" ; }; +String STR_MENU_SYNONYMS +{ + Text [ en-US ] = "Synonyms" ; +}; + +String STR_MENU_NO_SYNONYM_FOUND +{ + Text [ en-US ] = "(none)" ; +}; + +String STR_MENU_THESAURUS +{ + Text [ en-US ] = "~Thesaurus..." ; +}; + // ******************************************************************* EOF diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index f0bb48b54261..a8f74c254869 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -79,10 +80,15 @@ #include #include #include +#include "thessubmenu.hxx" + static const USHORT nCompatVersion = 4; static const USHORT nVersion = 5; +// static member initialization +PopupMenu * SfxPopupMenuManager::pStaticThesSubMenu = NULL; + using namespace com::sun::star; //========================================================================= @@ -169,6 +175,70 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen } +//-------------------------------------------------------------------- + +PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) +{ + // + // build thesaurus sub menu if look-up string is available + // + PopupMenu* pThesSubMenu = 0; + SfxPoolItem *pItem = 0; + pBindings->QueryState( SID_THES, pItem ); + String aThesLookUpStr; + SfxStringItem *pStrItem = dynamic_cast< SfxStringItem * >(pItem); + xub_StrLen nDelimPos = STRING_LEN; + if (pStrItem) + { + aThesLookUpStr = pStrItem->GetValue(); + nDelimPos = aThesLookUpStr.SearchBackward( '#' ); + } + if (aThesLookUpStr.Len() > 0 && nDelimPos != STRING_NOTFOUND) + { + // get synonym list for sub menu + std::vector< ::rtl::OUString > aSynonyms; + SfxThesSubMenuHelper aHelper; + ::rtl::OUString aText( aHelper.GetText( aThesLookUpStr, nDelimPos ) ); + lang::Locale aLocale; + aHelper.GetLocale( aLocale, aThesLookUpStr, nDelimPos ); + const bool bHasMoreSynonyms = aHelper.GetMeanings( aSynonyms, aText, aLocale, 7 /*max number of synonyms to retrieve*/ ); + (void) bHasMoreSynonyms; + + pThesSubMenu = new PopupMenu; + pThesSubMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); + const size_t nNumSynonyms = aSynonyms.size(); + if (nNumSynonyms > 0) + { + for (USHORT i = 0; (size_t)i < nNumSynonyms; ++i) + { + //! item ids should start with values > 0, since 0 has special meaning + const USHORT nId = i + 1; + String aItemText( GetThesaurusReplaceText_Impl( aSynonyms[i] ) ); + pThesSubMenu->InsertItem( nId, aItemText ); + ::rtl::OUString aCmd( ::rtl::OUString::createFromAscii( ".uno:ThesaurusFromContext?WordReplace:string=" ) ); + aCmd += aItemText; + pThesSubMenu->SetItemCommand( nId, aCmd ); + } + } + else // nNumSynonyms == 0 + { + const String aItemText( SfxResId( STR_MENU_NO_SYNONYM_FOUND ) ); + pThesSubMenu->InsertItem( 1, aItemText, MIB_NOSELECT ); + } + pThesSubMenu->InsertSeparator(); + const String sThesaurus( SfxResId( STR_MENU_THESAURUS ) ); + pThesSubMenu->InsertItem( 100, sThesaurus ); + pThesSubMenu->SetItemCommand( 100, ::rtl::OUString::createFromAscii( ".uno:ThesaurusDialog" ) ); + + pSVMenu->InsertSeparator(); + const String sSynonyms( SfxResId( STR_MENU_SYNONYMS ) ); + pSVMenu->InsertItem( SID_THES, sSynonyms ); + pSVMenu->SetPopupMenu( SID_THES, pThesSubMenu ); + } + + return pThesSubMenu; +} + //-------------------------------------------------------------------- @@ -308,7 +378,9 @@ void SfxPopupMenuManager::RemoveDisabledEntries() USHORT SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow ) { DBG_MEMTEST(); - return ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos ); + USHORT nVal = ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos ); + delete pStaticThesSubMenu; pStaticThesSubMenu = NULL; + return nVal; } //-------------------------------------------------------------------- @@ -432,6 +504,10 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra break; } + PopupMenu* pThesSubMenu = InsertThesaurusSubmenu_Impl( &pFrame->GetBindings(), pSVMenu ); + // #i107205# (see comment in header file) + pStaticThesSubMenu = pThesSubMenu; + if ( n == nCount ) { PopupMenu aPop( SfxResId( MN_CLIPBOARDFUNCS ) ); @@ -464,6 +540,7 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra aMgr->RemoveDisabledEntries(); return aMgr; } + return 0; } @@ -478,6 +555,8 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram break; } + PopupMenu* pThesSubMenu = InsertThesaurusSubmenu_Impl( &pFrame->GetBindings(), pSVMenu ); + if ( n == nCount ) { PopupMenu aPop( SfxResId( MN_CLIPBOARDFUNCS ) ); @@ -510,6 +589,8 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram aPop.RemoveDisabledEntries(); aPop.Execute( rPoint, pWindow ); } + + delete pThesSubMenu; } Menu* SfxPopupMenuManager::GetSVMenu() diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx new file mode 100755 index 000000000000..b11462fb1c71 --- /dev/null +++ b/sfx2/source/menu/thessubmenu.cxx @@ -0,0 +1,274 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thessubmenu.cxx,v $ + * $Revision: 1.0 $ + * + * 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_sfx2.hxx" + +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include "thessubmenu.hxx" + + +using namespace ::com::sun::star; +using ::rtl::OUString; + + +// STATIC DATA ----------------------------------------------------------- + +SFX_IMPL_MENU_CONTROL(SfxThesSubMenuControl, SfxStringItem); + +//////////////////////////////////////////////////////////// + +String GetThesaurusReplaceText_Impl( const ::rtl::OUString &rText ) +{ + // The strings returned by the thesaurus sometimes have some + // explanation text put in between '(' and ')' or a trailing '*'. + // These parts should not be put in the ReplaceEdit Text that may get + // inserted into the document. Thus we strip them from the text. + + String aText( rText ); + + xub_StrLen nPos = aText.Search( sal_Unicode('(') ); + while (STRING_NOTFOUND != nPos) + { + xub_StrLen nEnd = aText.Search( sal_Unicode(')'), nPos ); + if (STRING_NOTFOUND != nEnd) + aText.Erase( nPos, nEnd-nPos+1 ); + else + break; + nPos = aText.Search( sal_Unicode('(') ); + } + + nPos = aText.Search( sal_Unicode('*') ); + if (STRING_NOTFOUND != nPos) + aText.Erase( nPos ); + + // remove any possible remaining ' ' that may confuse the thesaurus + // when it gets called with the text + aText.EraseLeadingAndTrailingChars( sal_Unicode(' ') ); + + return aText; +} + +//////////////////////////////////////////////////////////// + + +/* + Ctor; setzt Select-Handler am Menu und traegt Menu + in seinen Parent ein. + */ +SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBindings &rBindings ) + : SfxMenuControl( nSlotId, rBindings ), + pMenu(new PopupMenu), + rParent(rMenu) +{ + rMenu.SetPopupMenu(nSlotId, pMenu); + pMenu->SetSelectHdl(LINK(this, SfxThesSubMenuControl, MenuSelect)); + FillMenu(); +} + + +SfxThesSubMenuControl::~SfxThesSubMenuControl() +{ + delete pMenu; +} + + +/* + Fuellt das Menu mit den aktuellen Verben aus der ViewShell. + */ +void SfxThesSubMenuControl::FillMenu() +{ + pMenu->Clear(); + pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); + SfxViewShell *pView = GetBindings().GetDispatcher()->GetFrame()->GetViewShell(); + if (pView) + { + pMenu->InsertItem( 1, String::CreateFromAscii("bla blub") ); + + } + + rParent.EnableItem( GetId(), (BOOL)pMenu->GetItemCount() ); +} + + +/* + Statusbenachrichtigung; + fuellt gfs. das Menu mit den aktuellen Verben aus der ViewShell. + der DocumentShell. + Ist die Funktionalit"at disabled, wird der entsprechende + Menueeintrag im Parentmenu disabled, andernfalls wird er enabled. + */ +void SfxThesSubMenuControl::StateChanged( + USHORT /*nSID*/, + SfxItemState eState, + const SfxPoolItem* /*pState*/ ) +{ + rParent.EnableItem(GetId(), SFX_ITEM_AVAILABLE == eState ); + if ( SFX_ITEM_AVAILABLE == eState ) + FillMenu(); +} + + +/* + Select-Handler des Menus; + das selektierte Verb mit ausgef"uhrt, + */ +IMPL_LINK_INLINE_START( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu ) +{ + const USHORT nSlotId = pSelMenu->GetCurItemId(); + if( nSlotId ) + GetBindings().Execute(nSlotId); + return 1; +} +IMPL_LINK_INLINE_END( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu ) + + +PopupMenu* SfxThesSubMenuControl::GetPopup() const +{ + return pMenu; +} + + +//////////////////////////////////////////////////////////// + +OUString SfxThesSubMenuHelper::GetText( + const String &rLookUpString, + xub_StrLen nDelimPos ) +{ + return OUString( rLookUpString.Copy( 0, nDelimPos ) ); +} + + +void SfxThesSubMenuHelper::GetLocale( + lang::Locale /*out */ &rLocale, + const String &rLookUpString, + xub_StrLen nDelimPos ) +{ + String aIsoLang( rLookUpString.Copy( nDelimPos + 1) ); + const xub_StrLen nPos = aIsoLang.Search( '-' ); + if (nPos != STRING_NOTFOUND) + { + rLocale.Language = aIsoLang.Copy( 0, nPos ); + rLocale.Country = aIsoLang.Copy( nPos + 1 ); + rLocale.Variant = String::EmptyString(); + } +} + + +SfxThesSubMenuHelper::SfxThesSubMenuHelper() +{ + try + { + uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); + m_xThesarus = uno::Reference< linguistic2::XThesaurus > ( xMSF->createInstance( + OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.linguistic2.Thesaurus" ) ) ), uno::UNO_QUERY_THROW ) ; + } + catch (uno::Exception &e) + { + (void) e; + DBG_ASSERT( 0, "failed to get thesaurus" ); + } +} + + +SfxThesSubMenuHelper::~SfxThesSubMenuHelper() +{ +} + + +bool SfxThesSubMenuHelper::IsSupportedLocale( const lang::Locale & rLocale ) const +{ + return m_xThesarus.is() && m_xThesarus->hasLocale( rLocale ); +} + + +bool SfxThesSubMenuHelper::GetMeanings( + std::vector< OUString > & rSynonyms, + const OUString & rWord, + const lang::Locale & rLocale, + sal_Int16 nMaxSynonms ) +{ + bool bHasMoreSynonyms = false; + rSynonyms.clear(); + if (IsSupportedLocale( rLocale ) && rWord.getLength() && nMaxSynonms > 0) + { + try + { + // get all meannings + const uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeaningSeq( + m_xThesarus->queryMeanings( rWord, rLocale, uno::Sequence< beans::PropertyValue >() )); + const uno::Reference< linguistic2::XMeaning > *pxMeaning = aMeaningSeq.getConstArray(); + const sal_Int32 nMeanings = aMeaningSeq.getLength(); + + // iterate over all meanings until nMaxSynonms are found or all meanings are processed + sal_Int32 nCount = 0; + sal_Int32 i = 0; + for ( ; i < nMeanings && nCount < nMaxSynonms; ++i) + { + const uno::Sequence< OUString > aSynonymSeq( pxMeaning[i]->querySynonyms() ); + const OUString *pSynonyms = aSynonymSeq.getConstArray(); + const sal_Int32 nSynonyms = aSynonymSeq.getLength(); + sal_Int32 k = 0; + for ( ; k < nSynonyms && nCount < nMaxSynonms; ++k) + { + rSynonyms.push_back( pSynonyms[k] ); + ++nCount; + } + bHasMoreSynonyms = k < nSynonyms; // any synonym from this meaning skipped? + } + + bHasMoreSynonyms |= i < nMeanings; // any meaning skipped? + } + catch (uno::Exception &e) + { + (void) e; + DBG_ASSERT( 0, "failed to get synonyms" ); + } + } + return bHasMoreSynonyms; +} + + +//////////////////////////////////////////////////////////// + + diff --git a/sfx2/source/menu/thessubmenu.hxx b/sfx2/source/menu/thessubmenu.hxx new file mode 100755 index 000000000000..845594f4ba6a --- /dev/null +++ b/sfx2/source/menu/thessubmenu.hxx @@ -0,0 +1,103 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thessubmenu.hxx,v $ + * $Revision: 1.0 $ + * + * 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 _THESSUBMENU_HXX_ +#define _THESSUBMENU_HXX_ + +#include + +#include +#include + +class SfxBindings; +class PopupMenu; +class Menu; + +namespace css = ::com::sun::star; + +//////////////////////////////////////////////////////////// + +String GetThesaurusReplaceText_Impl( const ::rtl::OUString &rText ); + +//////////////////////////////////////////////////////////// + +class SfxThesSubMenuControl : public SfxMenuControl +{ + PopupMenu* pMenu; + Menu& rParent; + +private: + void FillMenu(); + virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState ); + DECL_LINK( MenuSelect, Menu * ); + +public: + SfxThesSubMenuControl(USHORT, Menu&, SfxBindings&); + ~SfxThesSubMenuControl(); + + virtual PopupMenu* GetPopup() const; + + SFX_DECL_MENU_CONTROL(); +}; + +//////////////////////////////////////////////////////////// + +class SfxThesSubMenuHelper +{ + css::uno::Reference< css::linguistic2::XThesaurus > m_xThesarus; + +private: + + // don't use copy c-tor and assignment operator + SfxThesSubMenuHelper( const SfxThesSubMenuHelper & ); + SfxThesSubMenuHelper & operator = ( const SfxThesSubMenuHelper & ); + +public: + SfxThesSubMenuHelper(); + ~SfxThesSubMenuHelper(); + + static ::rtl::OUString GetText( const String &rLookUpString, xub_StrLen nDelimPos ); + + // returns the Locale to be used for the selected text when the thesaurus is to be called + static void GetLocale( css::lang::Locale /*out */ &rLocale, const String &rLookUpString, xub_StrLen nDelimPos ); + + // returns true if the locale is upported by the theasaurus + bool IsSupportedLocale( const css::lang::Locale & rLocale ) const; + + // get the first nMax Synonym entries, even if different meanings need to be evaluated + bool GetMeanings( std::vector< ::rtl::OUString > & rSynonyms, const ::rtl::OUString & rWord, const css::lang::Locale & rLocale, sal_Int16 nMaxSynonms ); +}; + +//////////////////////////////////////////////////////////// + +#endif + + -- cgit v1.2.3 From 302b0d4b30348d95c18684b1254693f191d8001b Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 25 Nov 2009 16:50:10 +0000 Subject: #i51258# thesaurus for right click context menu --- svx/inc/svx/editview.hxx | 4 ++- svx/inc/svx/outliner.hxx | 6 ++++ svx/sdi/svx.sdi | 4 +-- svx/source/editeng/editview.cxx | 4 +-- svx/source/outliner/outlvw.cxx | 61 ++++++++++++++++++++++++++++++++++++++++- 5 files changed, 73 insertions(+), 6 deletions(-) diff --git a/svx/inc/svx/editview.hxx b/svx/inc/svx/editview.hxx index 79deaab4dc36..f13d90b9211d 100644 --- a/svx/inc/svx/editview.hxx +++ b/svx/inc/svx/editview.hxx @@ -31,6 +31,8 @@ #ifndef _MyEDITVIEW_HXX #define _MyEDITVIEW_HXX +#include + #include #include #include @@ -114,7 +116,7 @@ public: BOOL HasSelection() const; ESelection GetSelection() const; void SetSelection( const ESelection& rNewSel ); - BOOL SelectCurrentWord(); + BOOL SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); void IndentBlock(); void UnindentBlock(); diff --git a/svx/inc/svx/outliner.hxx b/svx/inc/svx/outliner.hxx index 37e3d8ac71ee..9aafe5ff853e 100644 --- a/svx/inc/svx/outliner.hxx +++ b/svx/inc/svx/outliner.hxx @@ -392,6 +392,12 @@ public: Selection GetSurroundingTextSelection() const; }; + +// some thesaurus functionality to avoid code duplication in different projects... +bool SVX_DLLPUBLIC GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView ); +void SVX_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText ); + + //#if 0 // _SOLAR__PRIVATE DECLARE_LIST(ViewList,OutlinerView*) //#else diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index b414195457bc..c8f38bf98b55 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -10937,7 +10937,7 @@ SdrTextFitToSizeTypeItem TextFitToSize SID_ATTR_TEXT_FITTOSIZE ] //-------------------------------------------------------------------------- -SfxVoidItem Thesaurus SID_THESAURUS +SfxVoidItem ThesaurusDialog SID_THESAURUS () [ /* flags: */ @@ -10946,7 +10946,7 @@ SfxVoidItem Thesaurus SID_THESAURUS FastCall = FALSE, HasCoreId = FALSE, HasDialog = TRUE, - ReadOnlyDoc = TRUE, + ReadOnlyDoc = FALSE, Toggle = FALSE, Container = FALSE, RecordAbsolute = FALSE, diff --git a/svx/source/editeng/editview.cxx b/svx/source/editeng/editview.cxx index 6776f57ea2b6..9ebb01daa3b7 100644 --- a/svx/source/editeng/editview.cxx +++ b/svx/source/editeng/editview.cxx @@ -1260,13 +1260,13 @@ void EditView::SpellIgnoreWord() pImpEditView->SpellIgnoreOrAddWord( sal_False ); } -sal_Bool EditView::SelectCurrentWord() +sal_Bool EditView::SelectCurrentWord( sal_Int16 nWordType ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); EditSelection aCurSel( pImpEditView->GetEditSelection() ); pImpEditView->DrawSelection(); - aCurSel = PIMPEE->SelectWord( aCurSel.Max() ); + aCurSel = PIMPEE->SelectWord( aCurSel.Max(), nWordType ); pImpEditView->SetEditSelection( aCurSel ); pImpEditView->DrawSelection(); ShowCursor( sal_True, sal_False ); diff --git a/svx/source/outliner/outlvw.cxx b/svx/source/outliner/outlvw.cxx index 098a4055ce0f..be45692993bf 100644 --- a/svx/source/outliner/outlvw.cxx +++ b/svx/source/outliner/outlvw.cxx @@ -31,7 +31,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include + +#include + #include +#include #define _OUTLINER_CXX #include @@ -56,6 +60,8 @@ #define OL_SCROLL_HOROFFSET 20 /* in % von VisibleSize.Width */ #define OL_SCROLL_VEROFFSET 20 /* in % von VisibleSize.Height */ +using namespace ::com::sun::star; + DBG_NAME(OutlinerView) @@ -1272,7 +1278,7 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b - // ===================================================================== +// ===================================================================== // ====================== Einfache Durchreicher ======================= // ====================================================================== @@ -1647,3 +1653,56 @@ Selection OutlinerView::GetSurroundingTextSelection() const DBG_CHKTHIS(OutlinerView,0); return pEditView->GetSurroundingTextSelection(); } + + +// ====================================================================== +// ===== some code for thesaurus sub menu within context menu +// ====================================================================== + +// returns: true if a word for thesaurus look-up was found at the current cursor position. +// The status string will be word + iso language string (e.g. "light#en-US") +bool SVX_DLLPUBLIC GetStatusValueForThesaurusFromContext( + String &rStatusVal, + LanguageType &rLang, + const EditView &rEditView ) +{ + // get text and locale for thesaurus look up + String aText; + EditEngine *pEditEngine = rEditView.GetEditEngine(); + ESelection aTextSel( rEditView.GetSelection() ); + if (!aTextSel.HasRange()) + aTextSel = pEditEngine->GetWord( aTextSel, i18n::WordType::DICTIONARY_WORD ); + aText = pEditEngine->GetText( aTextSel ); + aTextSel.Adjust(); + LanguageType nLang = pEditEngine->GetLanguage( aTextSel.nStartPara, aTextSel.nStartPos ); + String aLangText( MsLangId::convertLanguageToIsoString( nLang ) ); + + // set word and locale to look up as status value + String aStatusVal( aText ); + aStatusVal.AppendAscii( "#" ); + aStatusVal += aLangText; + + rStatusVal = aStatusVal; + rLang = nLang; + + return aText.Len() > 0; +} + + +void SVX_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText ) +{ + // get selection to use + ESelection aCurSel( rEditView.GetSelection() ); + if (!rEditView.HasSelection()) + { + // select the same word that was used in GetStatusValueForThesaurusFromContext by calling GetWord. + // (In the end both functions will call ImpEditEngine::SelectWord) + rEditView.SelectCurrentWord( i18n::WordType::DICTIONARY_WORD ); + aCurSel = rEditView.GetSelection(); + } + + // replace word ... + rEditView.InsertText( rSynonmText ); + rEditView.ShowCursor( sal_True, sal_False ); +} + -- cgit v1.2.3 From 26999baa19f28e4916df28bc8c2eca2f88b70cbd Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 25 Nov 2009 16:50:53 +0000 Subject: #i51258# thesaurus for right click context menu --- sd/sdi/drtxtob.sdi | 6 ++++++ sd/source/ui/view/drtxtob.cxx | 29 +++++++++++++++++++++++++++++ sd/source/ui/view/drtxtob1.cxx | 16 ++++++++++++++++ sd/uiconfig/sdraw/menubar/menubar.xml | 2 +- sd/uiconfig/simpress/menubar/menubar.xml | 2 +- 5 files changed, 53 insertions(+), 2 deletions(-) diff --git a/sd/sdi/drtxtob.sdi b/sd/sdi/drtxtob.sdi index 4e2ca49c0b82..f4133f0f4643 100644 --- a/sd/sdi/drtxtob.sdi +++ b/sd/sdi/drtxtob.sdi @@ -202,5 +202,11 @@ shell TextObjectBar ExecMethod = Execute; StateMethod = GetAttrState; ] + SID_THES + [ + ExecMethod = Execute ; + StateMethod = GetAttrState ; + ] + } diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 55980ff02050..7e3e48b7a59d 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -33,14 +33,21 @@ #include "TextObjectBar.hxx" +#include +#include #include #include #include +#include +#include +#include +#include #include #include #include #include +#include #include #include #include @@ -73,6 +80,8 @@ using namespace sd; +using namespace ::com::sun::star; + #define TextObjectBar #include "sdslots.hxx" @@ -373,6 +382,26 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) } break; + case SID_THES: + { + EditView & rEditView = mpView->GetTextEditOutlinerView()->GetEditView();; + String aStatusVal; + LanguageType nLang = LANGUAGE_NONE; + bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView ); + rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); + + // disable "Thesaurus" context menu entry if there is nothing to look up + lang::Locale aLocale( SvxCreateLocale( nLang ) ); + uno::Reference< linguistic2::XThesaurus > xThes( LinguMgr::GetThesaurus() ); + if (!bIsLookUpWord || + !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale )) + rSet.DisableItem( SID_THES ); + + //! avoid puting the same item as SfxBoolItem at the end of this function + nSlotId = 0; + } + break; + default: break; } diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 9c2733c933dd..b128472ac61c 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -33,6 +33,12 @@ #include "TextObjectBar.hxx" +#include + +//#include +#include +#include +#include #include #ifndef _ULSPITEM_HXX @@ -341,6 +347,16 @@ void TextObjectBar::Execute( SfxRequest &rReq ) } break; + case SID_THES: + { + String aReplaceText; + SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False ); + if (pItem2) + aReplaceText = pItem2->GetValue(); + if (aReplaceText.Len() > 0) + ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText ); + } + break; default: { diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml index 04e085c6050f..a7ce6d3f76cb 100644 --- a/sd/uiconfig/sdraw/menubar/menubar.xml +++ b/sd/uiconfig/sdraw/menubar/menubar.xml @@ -214,7 +214,7 @@ - + diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index 2483b61bd01e..fd565d5d7c8c 100644 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -242,7 +242,7 @@ - + -- cgit v1.2.3 From 3a9fc6f40ea0b924d7da66892b136e57f6f9ad73 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 25 Nov 2009 16:51:42 +0000 Subject: #i51258# thesaurus for right click context menu --- sc/sdi/drtxtob.sdi | 2 ++ sc/sdi/editsh.sdi | 1 + sc/source/ui/drawfunc/drtxtob.cxx | 46 +++++++++++++++++++++++++ sc/source/ui/view/editsh.cxx | 36 +++++++++++++++++++ sc/uiconfig/scalc/accelerator/de/default.xml | 2 +- sc/uiconfig/scalc/accelerator/en-GB/default.xml | 2 +- sc/uiconfig/scalc/accelerator/en-US/default.xml | 2 +- sc/uiconfig/scalc/accelerator/es/default.xml | 2 +- sc/uiconfig/scalc/accelerator/fr/default.xml | 2 +- sc/uiconfig/scalc/menubar/menubar.xml | 2 +- sc/uiconfig/scalc/toolbar/toolbar.xml | 4 +-- 11 files changed, 93 insertions(+), 8 deletions(-) diff --git a/sc/sdi/drtxtob.sdi b/sc/sdi/drtxtob.sdi index 3cd9de1a2212..3e48c980e2d6 100644 --- a/sc/sdi/drtxtob.sdi +++ b/sc/sdi/drtxtob.sdi @@ -65,6 +65,8 @@ interface TableDrawText SID_CLIPBOARD_FORMAT_ITEMS [ ExecMethod = Execute; StateMethod = GetClipState; Export = FALSE; ] SID_SELECTALL [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] SID_CHARMAP [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] + SID_THES [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] + SID_THESAURUS [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] // Attribute: -------------------------------------------------- SID_TEXT_STANDARD [ ExecMethod = ExecuteAttr; StateMethod = GetState; Export = FALSE; ] SID_DRAWTEXT_ATTR_DLG [ ExecMethod = ExecuteAttr; StateMethod = GetState; Export = FALSE; ] diff --git a/sc/sdi/editsh.sdi b/sc/sdi/editsh.sdi index 3ae19a4083cf..9ce9e515a305 100644 --- a/sc/sdi/editsh.sdi +++ b/sc/sdi/editsh.sdi @@ -49,6 +49,7 @@ interface TableText SID_SELECTALL [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] SID_CHARMAP [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] FID_INSERT_NAME [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] + SID_THES [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] SID_UNDO [ ExecMethod = ExecuteUndo; StateMethod = GetUndoState; Export = FALSE; ] SID_REDO [ ExecMethod = ExecuteUndo; StateMethod = GetUndoState; Export = FALSE; ] diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index d241843f9745..61d356d748df 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -35,6 +35,9 @@ //------------------------------------------------------------------------- +#include +#include + #include "scitems.hxx" #include @@ -55,6 +58,7 @@ #include #include #include +#include #include #include #include @@ -74,6 +78,7 @@ #include "sc.hrc" #include "globstr.hrc" +#include "scmod.hxx" #include "drtxtob.hxx" #include "fudraw.hxx" #include "viewdata.hxx" @@ -86,6 +91,10 @@ #define ScDrawTextObjectBar #include "scslots.hxx" + +using namespace ::com::sun::star; + + SFX_IMPL_INTERFACE( ScDrawTextObjectBar, SfxShell, ScResId(SCSTR_DRAWTEXTSHELL) ) { SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER, @@ -366,6 +375,24 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) ExecuteGlobal( rReq ); break; #endif + + case SID_THES: + { + String aReplaceText; + SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False ); + if (pItem2) + aReplaceText = pItem2->GetValue(); + if (aReplaceText.Len() > 0) + ReplaceTextWithSynonym( pOutView->GetEditView(), aReplaceText ); + } + break; + + case SID_THESAURUS: + { + pOutView->StartThesaurus(); + } + break; + } } @@ -457,6 +484,25 @@ void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) ); } } + + if ( rSet.GetItemState( SID_THES ) != SFX_ITEM_UNKNOWN || + rSet.GetItemState( SID_THESAURUS ) != SFX_ITEM_UNKNOWN ) + { + SdrView * pView = pViewData->GetScDrawView(); + EditView & rEditView = pView->GetTextEditOutlinerView()->GetEditView(); + + String aStatusVal; + LanguageType nLang = LANGUAGE_NONE; + bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView ); + rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); + + // disable thesaurus main menu and context menu entry if there is nothing to look up + BOOL bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang ); + if (!bIsLookUpWord || !bCanDoThesaurus) + rSet.DisableItem( SID_THES ); + if (!bCanDoThesaurus) + rSet.DisableItem( SID_THESAURUS ); + } } IMPL_LINK( ScDrawTextObjectBar, ClipboardChanged, TransferableDataHelper*, pDataHelper ) diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 022eabdc11cf..b6131c62197b 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -35,6 +35,8 @@ //------------------------------------------------------------------ +#include + #include "scitems.hxx" #include @@ -45,6 +47,8 @@ #include #include #include +#include +#include #include #include #include @@ -94,6 +98,11 @@ #include "scui_def.hxx" //CHINA001 #include "scabstdlg.hxx" //CHINA001 + + +using namespace ::com::sun::star; + + TYPEINIT1( ScEditShell, SfxShell ); SFX_IMPL_INTERFACE(ScEditShell, SfxShell, ScResId(SCSTR_EDITSHELL)) @@ -216,6 +225,17 @@ void ScEditShell::Execute( SfxRequest& rReq ) } break; + case SID_THES: + { + String aReplaceText; + SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , sal_False ); + if (pItem2) + aReplaceText = pItem2->GetValue(); + if (aReplaceText.Len() > 0) + ReplaceTextWithSynonym( *pEditView, aReplaceText ); + } + break; + case SID_COPY: pTableView->Copy(); break; @@ -683,6 +703,22 @@ void __EXPORT ScEditShell::GetState( SfxItemSet& rSet ) case SID_INSERT_ZWSP: ScViewUtil::HideDisabledSlot( rSet, pViewData->GetBindings(), nWhich ); break; + + case SID_THES: + { + String aStatusVal; + LanguageType nLang = LANGUAGE_NONE; + bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, *pActiveView ); + rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); + + // disable thesaurus context menu entry if there is nothing to look up + BOOL bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang ); + if (!bIsLookUpWord || !bCanDoThesaurus) + rSet.DisableItem( SID_THES ); + } + break; + + } nWhich = aIter.NextWhich(); } diff --git a/sc/uiconfig/scalc/accelerator/de/default.xml b/sc/uiconfig/scalc/accelerator/de/default.xml index d14c7294b071..cd7b464cb920 100644 --- a/sc/uiconfig/scalc/accelerator/de/default.xml +++ b/sc/uiconfig/scalc/accelerator/de/default.xml @@ -29,7 +29,7 @@ - + diff --git a/sc/uiconfig/scalc/accelerator/en-GB/default.xml b/sc/uiconfig/scalc/accelerator/en-GB/default.xml index c08df67839d8..13c103e79008 100644 --- a/sc/uiconfig/scalc/accelerator/en-GB/default.xml +++ b/sc/uiconfig/scalc/accelerator/en-GB/default.xml @@ -29,7 +29,7 @@ - + diff --git a/sc/uiconfig/scalc/accelerator/en-US/default.xml b/sc/uiconfig/scalc/accelerator/en-US/default.xml index 1c4dbbd6877e..e9776ce75948 100644 --- a/sc/uiconfig/scalc/accelerator/en-US/default.xml +++ b/sc/uiconfig/scalc/accelerator/en-US/default.xml @@ -29,7 +29,7 @@ - + diff --git a/sc/uiconfig/scalc/accelerator/es/default.xml b/sc/uiconfig/scalc/accelerator/es/default.xml index 359be420a6d1..8fff55d6acb2 100644 --- a/sc/uiconfig/scalc/accelerator/es/default.xml +++ b/sc/uiconfig/scalc/accelerator/es/default.xml @@ -29,7 +29,7 @@ - + diff --git a/sc/uiconfig/scalc/accelerator/fr/default.xml b/sc/uiconfig/scalc/accelerator/fr/default.xml index 58b35dd80243..12851068079f 100644 --- a/sc/uiconfig/scalc/accelerator/fr/default.xml +++ b/sc/uiconfig/scalc/accelerator/fr/default.xml @@ -29,7 +29,7 @@ - + diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml index b97c37979983..66f3bbef164f 100644 --- a/sc/uiconfig/scalc/menubar/menubar.xml +++ b/sc/uiconfig/scalc/menubar/menubar.xml @@ -313,7 +313,7 @@ - + diff --git a/sc/uiconfig/scalc/toolbar/toolbar.xml b/sc/uiconfig/scalc/toolbar/toolbar.xml index 6a34de3a4ebd..e42964a86b0b 100644 --- a/sc/uiconfig/scalc/toolbar/toolbar.xml +++ b/sc/uiconfig/scalc/toolbar/toolbar.xml @@ -8,7 +8,7 @@ - + @@ -20,4 +20,4 @@ - \ No newline at end of file + -- cgit v1.2.3 From 2523b874cd4bad0618a1b20d41fa3fdff3a3f4f4 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 25 Nov 2009 16:52:25 +0000 Subject: #i51258# thesaurus for right click context menu --- sw/inc/cmdid.h | 1 - sw/inc/crsrsh.hxx | 8 +- sw/inc/swcrsr.hxx | 8 +- sw/inc/viewopt.hxx | 14 +++- sw/sdi/_textsh.sdi | 6 ++ sw/sdi/_viewsh.sdi | 2 +- sw/sdi/annotsh.sdi | 9 ++- sw/sdi/drwtxtsh.sdi | 10 ++- sw/sdi/swriter.sdi | 25 ------ sw/source/core/crsr/crstrvl1.cxx | 20 +++-- sw/source/core/crsr/swcrsr.cxx | 12 +-- sw/source/filter/ww8/wrtww8.cxx | 3 +- sw/source/ui/config/viewopt.cxx | 7 +- sw/source/ui/docvw/postit.cxx | 24 +++--- sw/source/ui/inc/view.hxx | 6 ++ sw/source/ui/shells/annotsh.cxx | 42 ++++++++-- sw/source/ui/shells/drwtxtex.cxx | 168 ++++++++++++++++++++++----------------- sw/source/ui/shells/drwtxtsh.cxx | 2 +- sw/source/ui/shells/textsh1.cxx | 52 ++++++++++++ sw/source/ui/uiview/view.src | 4 +- sw/source/ui/uiview/viewling.cxx | 167 +++++++++++++++++++------------------- sw/source/ui/uiview/viewstat.cxx | 2 +- sw/source/ui/web/web.src | 4 +- 23 files changed, 362 insertions(+), 234 deletions(-) diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 05ff8add5dd8..d30ce294f85f 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -721,7 +721,6 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr --------------------------------------------------------------------*/ #define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* Zeilennumerierung */ -#define FN_THESAURUS_DLG (FN_EXTRA + 3 ) /* Thesaurus */ #define FN_HYPHENATE_OPT_DLG (FN_EXTRA + 5 ) /* Silbentrennung */ #define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* Woerter lernen */ #define FN_DICTIONARY_DLG (FN_EXTRA + 8 ) /* Woerterbuecher */ diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 85fea8317ef2..588883852f57 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -30,6 +30,8 @@ #ifndef _CRSRSH_HXX #define _CRSRSH_HXX +#include + #include #include #include @@ -749,9 +751,9 @@ public: BOOL SelectWord( const Point* pPt = 0 ); // Position vom akt. Cursor erfragen - BOOL IsStartWord()const; - BOOL IsEndWord() const; - BOOL IsInWord() const; + BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const; + BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; + BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; BOOL IsStartSentence() const; BOOL IsEndSentence() const; BOOL IsSttPara() const; diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 42597cb62559..adf5e720afaf 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -29,7 +29,9 @@ ************************************************************************/ #ifndef _SWCRSR_HXX #define _SWCRSR_HXX + #include + #include #include #include @@ -132,10 +134,10 @@ public: const SfxItemSet* rReplSet = 0 ); // UI versions - BOOL IsStartWord() const; - BOOL IsEndWord() const; + BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; + BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; + BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; BOOL IsStartEndSentence( bool bEnd ) const; - BOOL IsInWord() const; BOOL GoStartWord(); BOOL GoEndWord(); BOOL GoNextWord(); diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index d650d90cf08e..23dbf2c1b12a 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -44,7 +44,7 @@ class ViewShell; class SwDocShell; namespace svtools{ class ColorConfig;} -#define VIEWOPT_1_IDLE 0x00000001L +//#define VIEWOPT_1_IDLE 0x00000001L no longer used, see new member 'bIdle' #define VIEWOPT_1_TAB 0x00000002L #define VIEWOPT_1_BLANK 0x00000004L #define VIEWOPT_1_HARDBLANK 0x00000008L @@ -168,6 +168,7 @@ protected: BOOL bBookview : 1; // view mode for page preview BOOL mbViewLayoutBookMode : 1; // book view mode for edit view sal_Bool bShowPlaceHolderFields : 1; //only used in printing! + mutable bool bIdle; // Maszstab USHORT nZoom; // Angaben in Prozent @@ -206,9 +207,14 @@ public: ----------------------------------------------------------------------------*/ inline BOOL IsIdle() const - { return nCoreOptions & VIEWOPT_1_IDLE ? TRUE : FALSE; } - inline void SetIdle( BOOL b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_IDLE ) : ( nCoreOptions &= ~VIEWOPT_1_IDLE); } + { return bIdle; } + + // logically this is a const function since it does not modify the viewoptions + // but only effects idle formatting. Of course that member is already implement + // in the wrong place here... Also currently there are many const modifying casts in the code + // just to call this function on otherwise const objects. Thus declaring it as const now. + inline void SetIdle( BOOL b ) const + { bIdle = b; } inline BOOL IsTab(BOOL bHard = FALSE) const { return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) && diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index cd07a642c05d..43ae4cda2c36 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -1601,6 +1601,12 @@ interface BaseText DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents ] + SID_THES + [ + ExecMethod = Execute ; + StateMethod = GetState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents + ] } //ende interface text diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi index 7623da2c3ff0..ac6081637a91 100644 --- a/sw/sdi/_viewsh.sdi +++ b/sw/sdi/_viewsh.sdi @@ -401,7 +401,7 @@ interface BaseTextEditView : View ExecMethod = Execute ; StateMethod = GetState ; ] - FN_THESAURUS_DLG // status(final|play) + SID_THESAURUS // status(final|play) [ ExecMethod = ExecLingu ; StateMethod = GetState ; diff --git a/sw/sdi/annotsh.sdi b/sw/sdi/annotsh.sdi index 591373d034c6..5279d36e42e6 100755 --- a/sw/sdi/annotsh.sdi +++ b/sw/sdi/annotsh.sdi @@ -34,7 +34,7 @@ interface Annotation : _Annotation ] { - FN_THESAURUS_DLG // api: + SID_THESAURUS // api: [ ExecMethod = ExecLingu ; StateMethod = GetLinguState ; @@ -368,6 +368,13 @@ interface Annotation : _Annotation DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] + SID_THES + [ + ExecMethod = ExecLingu ; + StateMethod = GetLinguState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents + ] + } shell SwAnnotationShell diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi index 46c16637742d..dc6aba358d7a 100644 --- a/sw/sdi/drwtxtsh.sdi +++ b/sw/sdi/drwtxtsh.sdi @@ -427,7 +427,7 @@ interface TextDrawText DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] - FN_THESAURUS_DLG // api: + SID_THESAURUS // api: [ ExecMethod = ExecDrawLingu ; StateMethod = GetState ; @@ -535,7 +535,15 @@ interface TextDrawText StateMethod = GetState ; DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] + SID_LANGUAGE_STATUS + [ + ExecMethod = Execute; + StateMethod = GetState; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents + ] + + SID_THES [ ExecMethod = Execute; StateMethod = GetState; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 315d34197715..3f95cbc9181b 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -8343,31 +8343,6 @@ SfxVoidItem TextWrap FN_DRAW_WRAP_DLG GroupId = GID_FORMAT; ] -//-------------------------------------------------------------------------- -SfxVoidItem ThesaurusDialog FN_THESAURUS_DLG -() -[ - /* flags: */ - AutoUpdate = FALSE, - Cachable = Cachable, - FastCall = FALSE, - HasCoreId = FALSE, - HasDialog = TRUE, - ReadOnlyDoc = FALSE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - Asynchron; - - /* config: */ - AccelConfig = TRUE, - MenuConfig = TRUE, - StatusBarConfig = FALSE, - ToolBoxConfig = TRUE, - GroupId = GID_OPTIONS; -] - //-------------------------------------------------------------------------- SfxVoidItem ToggleAnchorType FN_TOOL_ANKER () diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx index dac68007e2dd..6834f4632db3 100644 --- a/sw/source/core/crsr/crstrvl1.cxx +++ b/sw/source/core/crsr/crstrvl1.cxx @@ -36,26 +36,30 @@ #include #include -BOOL SwCrsrShell::IsStartWord() const +BOOL SwCrsrShell::IsStartWord( sal_Int16 nWordType ) const { - return pCurCrsr->IsStartWord(); + return pCurCrsr->IsStartWord( nWordType ); } -BOOL SwCrsrShell::IsEndWord() const + +BOOL SwCrsrShell::IsEndWord( sal_Int16 nWordType ) const +{ + return pCurCrsr->IsEndWord( nWordType ); +} + +BOOL SwCrsrShell::IsInWord( sal_Int16 nWordType ) const { - return pCurCrsr->IsEndWord(); + return pCurCrsr->IsInWord( nWordType ); } + BOOL SwCrsrShell::IsStartSentence() const { return pCurCrsr->IsStartEndSentence( false ); } + BOOL SwCrsrShell::IsEndSentence() const { return pCurCrsr->IsStartEndSentence( true ); } -BOOL SwCrsrShell::IsInWord() const -{ - return pCurCrsr->IsInWord(); -} BOOL SwCrsrShell::GoStartWord() diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index ea5853916b8c..8a80f2d40421 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -1144,19 +1144,19 @@ short SwCursor::MaxReplaceArived() } -BOOL SwCursor::IsStartWord() const +BOOL SwCursor::IsStartWord( sal_Int16 nWordType ) const { - return IsStartWordWT( WordType::ANYWORD_IGNOREWHITESPACES ); + return IsStartWordWT( nWordType ); } -BOOL SwCursor::IsEndWord() const +BOOL SwCursor::IsEndWord( sal_Int16 nWordType ) const { - return IsEndWordWT( WordType::ANYWORD_IGNOREWHITESPACES ); + return IsEndWordWT( nWordType ); } -BOOL SwCursor::IsInWord() const +BOOL SwCursor::IsInWord( sal_Int16 nWordType ) const { - return IsInWordWT( WordType::ANYWORD_IGNOREWHITESPACES ); + return IsInWordWT( nWordType ); } BOOL SwCursor::GoStartWord() diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 53587bca451c..2aecdf0f0b7a 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3575,7 +3575,8 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer void MSWordExportBase::OutputEndNode( const SwEndNode &rNode ) { #ifdef DEBUG - ::std::clog << "" << dbg_out(&rNode) << ::std::endl; +// someone who knows what he wants should make this linkable when building with 'debug=t' ... +// ::std::clog << "" << dbg_out(&rNode) << ::std::endl; #endif ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = mpTableInfo->getTableNodeInfo( &rNode ); diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index 661a73f312ad..1869ef7085ef 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -115,6 +115,7 @@ BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const && bFormView == rOpt.IsFormView() && mbViewLayoutBookMode == rOpt.mbViewLayoutBookMode && bShowPlaceHolderFields == rOpt.bShowPlaceHolderFields + && bIdle == rOpt.bIdle #ifndef PRODUCT // korrespondieren zu den Angaben in ui/config/cfgvw.src && bTest1 == rOpt.IsTest1() @@ -229,7 +230,7 @@ SwViewOption::SwViewOption() : { // Initialisierung ist jetzt etwas einfacher // alle Bits auf 0 - nCoreOptions = VIEWOPT_1_IDLE | VIEWOPT_1_HARDBLANK | VIEWOPT_1_SOFTHYPH | + nCoreOptions = VIEWOPT_1_HARDBLANK | VIEWOPT_1_SOFTHYPH | VIEWOPT_1_REF | VIEWOPT_1_GRAPHIC | VIEWOPT_1_TABLE | VIEWOPT_1_DRAW | VIEWOPT_1_CONTROL | @@ -246,6 +247,8 @@ SwViewOption::SwViewOption() : bSelectionInReadonly = SW_MOD()->GetAccessibilityOptions().IsSelectionInReadonly(); + bIdle = true; + #ifndef PRODUCT // korrespondieren zu den Angaben in ui/config/cfgvw.src bTest1 = bTest2 = bTest3 = bTest4 = @@ -280,6 +283,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt) bBookview = rVOpt.bBookview; mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode; bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields; + bIdle = rVOpt.bIdle; #ifndef PRODUCT bTest1 = rVOpt.bTest1 ; @@ -320,6 +324,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt ) bBookview = rVOpt.bBookview; mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode; bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields; + bIdle = rVOpt.bIdle; #ifndef PRODUCT bTest1 = rVOpt.bTest1 ; diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index e693f87e7a35..caaf26020c23 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -384,26 +384,30 @@ void PostItTxt::Command( const CommandEvent& rCEvt ) } else { - SfxPopupMenuManager* aMgr = mpMarginWin->DocView()->GetViewFrame()->GetDispatcher()->Popup(0, this,&rCEvt.GetMousePosPixel()); - XubString aText = ((PopupMenu*)aMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR ); + SfxPopupMenuManager* pMgr = mpMarginWin->DocView()->GetViewFrame()->GetDispatcher()->Popup( 0, this, &rCEvt.GetMousePosPixel() ); + XubString aText = ((PopupMenu*)pMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR ); SwRewriter aRewriter; aRewriter.AddRule(UNDO_ARG1, mpMarginWin->GetAuthor()); aText = aRewriter.Apply(aText); - ((PopupMenu*)aMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR,aText); - // SwPostItLinkForwarder_Impl aFwd( ((PopupMenu*)aMgr->GetSVMenu())->pSvMenu->GetSelectHdl(), mpPostIt ); - // ((PopupMenu*)aMgr->GetSVMenu())->pSvMenu->SetSelectHdl( LINK(&aFwd, SwPostItLinkForwarder_Impl, Select) ); + ((PopupMenu*)pMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR, aText); - ((PopupMenu*)aMgr->GetSVMenu())->SetSelectHdl( LINK(this, PostItTxt, Select) ); + ((PopupMenu*)pMgr->GetSVMenu())->SetSelectHdl( LINK(this, PostItTxt, Select) ); + Point aPos; if (rCEvt.IsMouseEvent()) - ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,rCEvt.GetMousePosPixel()); + aPos = rCEvt.GetMousePosPixel(); else { const Size aSize = GetSizePixel(); - const Point aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 ); - ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,aPos); + aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 ); } - delete aMgr; + + //!! call different Execute function to get rid of the new thesaurus sub menu + //!! pointer created in the call to Popup. + //!! Otherwise we would have a memory leak (see also #i107205#) + //((PopupMenu*)pMgr->GetSVMenu())->Execute( this, aPos ); + pMgr->Execute( aPos, this ); + delete pMgr; } } else diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 7ddfc2775299..13205e249e0f 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -437,6 +437,12 @@ public: virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE ); virtual void MarginChanged(); + // replace word/selection with text from the thesaurus + // (this code has special handling for "in word" character) + void InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bValidSelection ); + bool IsValidSelectionForThesaurus() const; + String GetThesaurusLookUpText( bool bSelection ) const; + // Shell sofort wechseln -> fuer GetSelectionObject void StopShellTimer(); diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 38d3ca021a72..6e8bc651c1ff 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -30,14 +30,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include -#include #include #include #include #include #include + +#include +#include #include #include #include @@ -121,8 +124,8 @@ #include #include -#include "swabstdlg.hxx" //CHINA001 -#include "chrdlg.hrc" //CHINA001 +#include "swabstdlg.hxx" +#include "chrdlg.hrc" #include "misc.hrc" #include @@ -1132,7 +1135,17 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq) bRestoreSelection = SwLangHelper::SetLanguageStatus(pOLV,rReq,rView,rSh); break; } - case FN_THESAURUS_DLG: + case SID_THES: + { + String aReplaceText; + SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False ); + if (pItem2) + aReplaceText = pItem2->GetValue(); + if (aReplaceText.Len() > 0) + ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText ); + break; + } + case SID_THESAURUS: { pOLV->StartThesaurus(); break; @@ -1240,8 +1253,25 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet) SwLangHelper::GetLanguageStatus(pOLV,rSet); break; } + + case SID_THES: + { + String aStatusVal; + LanguageType nLang = LANGUAGE_NONE; + bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, pOLV->GetEditView() ); + rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); + + // disable "Thesaurus" context menu entry if there is nothing to look up + uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() ); + lang::Locale aLocale( SvxCreateLocale( nLang ) ); + if (!bIsLookUpWord || + !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale )) + rSet.DisableItem( SID_THES ); + break; + } + // disable "Thesaurus" if the language is not supported - case FN_THESAURUS_DLG: + case SID_THESAURUS: { const SfxPoolItem &rItem = rView.GetWrtShell().GetDoc()->GetDefault( GetWhichOfScript( RES_CHRATR_LANGUAGE, @@ -1251,7 +1281,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet) uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() ); if (!xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( SvxCreateLocale( nLang ) )) - rSet.DisableItem( FN_THESAURUS_DLG ); + rSet.DisableItem( SID_THESAURUS ); } break; case SID_HANGUL_HANJA_CONVERSION: diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 11874ca5b151..6e7d31297e8e 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -30,90 +30,84 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _SVX_PARAITEM_HXX //autogen -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _SVX_CNTRITEM_HXX //autogen -#include -#endif -#include -#include -#include -#include -#include -#include -#include +#include + +#include +#include #include -#include #include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include -#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include + +#include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // fuer SpellPointer +#include #include +#include +#include #include -#include #include -#include // fuer SpellPointer -#include #include -#include - -#include -#include +#include +#include +#include +#include -#include -#include -#include #include "swabstdlg.hxx" #include "chrdlg.hrc" #include "misc.hrc" -//modified on Jul. 30th -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include using namespace ::com::sun::star; @@ -151,6 +145,18 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) bRestoreSelection = SwLangHelper::SetLanguageStatus(pOLV,rReq,GetView(),rSh); break; } + + case SID_THES: + { + String aReplaceText; + SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False ); + if (pItem2) + aReplaceText = pItem2->GetValue(); + if (aReplaceText.Len() > 0) + ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText ); + break; + } + case SID_ATTR_CHAR_FONT: case SID_ATTR_CHAR_FONTHEIGHT: case SID_ATTR_CHAR_WEIGHT: @@ -572,7 +578,27 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet) nSlotId = SwLangHelper::GetLanguageStatus(pOLV,rSet);; break; } - case SID_ATTR_PARA_ADJUST_LEFT: eAdjust = SVX_ADJUST_LEFT; goto ASK_ADJUST; + + case SID_THES: + { + String aStatusVal; + LanguageType nLang = LANGUAGE_NONE; + bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, pOLV->GetEditView() ); + rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); + + // disable "Thesaurus" context menu entry if there is nothing to look up + uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() ); + lang::Locale aLocale( SvxCreateLocale( nLang ) ); + if (!bIsLookUpWord || + !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale )) + rSet.DisableItem( SID_THES ); + + //! avoid puting the same item as SfxBoolItem at the end of this function + nSlotId = 0; + break; + } + + case SID_ATTR_PARA_ADJUST_LEFT: eAdjust = SVX_ADJUST_LEFT; goto ASK_ADJUST; case SID_ATTR_PARA_ADJUST_RIGHT: eAdjust = SVX_ADJUST_RIGHT; goto ASK_ADJUST; case SID_ATTR_PARA_ADJUST_CENTER: eAdjust = SVX_ADJUST_CENTER; goto ASK_ADJUST; case SID_ATTR_PARA_ADJUST_BLOCK: eAdjust = SVX_ADJUST_BLOCK; goto ASK_ADJUST; @@ -623,19 +649,17 @@ ASK_ESCAPE: } break; - case FN_THESAURUS_DLG: + case SID_THESAURUS: { // disable "Thesaurus" if the language is not supported const SfxPoolItem &rItem = GetShell().GetDoc()->GetDefault( GetWhichOfScript( RES_CHRATR_LANGUAGE, GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) ); - LanguageType nLang = ((const SvxLanguageItem &) - rItem).GetLanguage(); - // + LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage(); + uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() ); - if (!xThes.is() || nLang == LANGUAGE_NONE || - !xThes->hasLocale( SvxCreateLocale( nLang ) )) - rSet.DisableItem( FN_THESAURUS_DLG ); + if (!xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( SvxCreateLocale( nLang ) )) + rSet.DisableItem( SID_THESAURUS ); nSlotId = 0; } break; diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 40909287d8d6..9a40834daf55 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -400,7 +400,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq) { switch(rReq.GetSlot()) { - case FN_THESAURUS_DLG: + case SID_THESAURUS: pOLV->StartThesaurus(); break; diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 736221981631..6fa27d002415 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -30,7 +30,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + +#include #include + #include #include #include @@ -402,6 +405,23 @@ void SwTextShell::Execute(SfxRequest &rReq) break; } + case SID_THES: + { + // replace word/selection with text from selected sub menu entry + String aReplaceText; + SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , sal_False ); + if (pItem2) + aReplaceText = pItem2->GetValue(); + if (aReplaceText.Len() > 0) + { + SwView &rView = rWrtSh.GetView(); + const bool bSelection = rWrtSh.HasSelection(); + const String aLookUpText = rView.GetThesaurusLookUpText( bSelection ); + rView.InsertThesaurusSynonym( aReplaceText, aLookUpText, bSelection ); + } + } + break; + case SID_CHARMAP: { InsertSymbol( rReq ); @@ -1380,6 +1400,38 @@ void SwTextShell::GetState( SfxItemSet &rSet ) } break; + case SID_THES: + { + // is there a valid selection to get text from? + String aText; + sal_Bool bValid = !rSh.HasSelection() || + (rSh.IsSelOnePara() && !rSh.IsMultiSelection()); + // prevent context menu from showing when cursor is not in or at the end of a word + // (GetCurWord will return the next word if there is none at the current position...) + const sal_Int16 nWordType = ::i18n::WordType::DICTIONARY_WORD; + bool bWord = rSh.IsInWord( nWordType ) || rSh.IsStartWord( nWordType ) || rSh.IsEndWord( nWordType ); + if (bValid && bWord) + aText = rSh.HasSelection()? rSh.GetSelTxt() : rSh.GetCurWord(); + + LanguageType nLang = rSh.GetCurLang(); + lang::Locale aLocale = SvxCreateLocale( nLang ); + String aLangText( MsLangId::convertLanguageToIsoString( nLang ) ); + + // set word and locale to look up as status value + String aStatusVal( aText ); + aStatusVal.AppendAscii( "#" ); + aStatusVal += aLangText; + + rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); + + // disable "Thesaurus" context menu entry if there is nothing to look up + uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() ); + if (aText.Len() == 0 || + !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale )) + rSet.DisableItem( SID_THES ); + } + break; + case FN_NUMBER_NEWSTART : if(!rSh.GetCurNumRule()) rSet.DisableItem(nWhich); diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src index beb4f423ba28..3e830d531530 100644 --- a/sw/source/ui/uiview/view.src +++ b/sw/source/ui/uiview/view.src @@ -302,8 +302,8 @@ ToolBox RID_TOOLS_TOOLBOX }; ToolBoxItem { - Identifier = FN_THESAURUS_DLG; - HelpID = FN_THESAURUS_DLG; + Identifier = SID_THESAURUS; + HelpID = SID_THESAURUS; Hide = TRUE; }; ToolBoxItem diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 588c30a9844d..11f0d2cb3673 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -133,7 +133,7 @@ void SwView::ExecLingu(SfxRequest &rReq) { switch(rReq.GetSlot()) { - case FN_THESAURUS_DLG: + case SID_THESAURUS: StartThesaurus(); rReq.Ignore(); break; @@ -282,47 +282,26 @@ void SwView::StartTextConversion( */ SpellKontext(sal_True); - SwViewOption* pVOpt = (SwViewOption*)pWrtShell->GetViewOptions(); - sal_Bool bOldIdle = pVOpt->IsIdle(); + const SwViewOption* pVOpt = pWrtShell->GetViewOptions(); + const sal_Bool bOldIdle = pVOpt->IsIdle(); pVOpt->SetIdle( sal_False ); sal_Bool bOldIns = pWrtShell->IsInsMode(); pWrtShell->SetInsMode( sal_True ); + sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection() || + pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext(); - { - sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection() || - pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext(); - -// sal_Bool bIsSpellSpecial = sal_True; - - sal_Bool bStart = bSelection || pWrtShell->IsStartOfDoc(); - sal_Bool bOther = !bSelection && !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); + sal_Bool bStart = bSelection || pWrtShell->IsStartOfDoc(); + sal_Bool bOther = !bSelection && !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); -/* - if( bOther && !bIsSpellSpecial ) - // kein Sonderbereich eingeschaltet - { - // Ich will auch in Sonderbereichen trennen - QueryBox aBox( &GetEditWin(), SW_RES( DLG_SPECIAL_FORCED ) ); - if( aBox.Execute() == RET_YES && xProp.is()) - { - sal_Bool bTrue = sal_True; - Any aTmp(&bTrue, ::getBooleanCppuType()); - xProp->setPropertyValue( C2U(UPN_IS_SPELL_SPECIAL), aTmp ); - } - else - return; // Nein Es wird nicht gespellt - } -*/ - { - const uno::Reference< lang::XMultiServiceFactory > xMgr( - comphelper::getProcessServiceFactory() ); - SwHHCWrapper aWrap( this, xMgr, nSourceLang, nTargetLang, pTargetFont, - nOptions, bIsInteractive, - bStart, bOther, bSelection ); - aWrap.Convert(); - } + { + const uno::Reference< lang::XMultiServiceFactory > xMgr( + comphelper::getProcessServiceFactory() ); + SwHHCWrapper aWrap( this, xMgr, nSourceLang, nTargetLang, pTargetFont, + nOptions, bIsInteractive, + bStart, bOther, bSelection ); + aWrap.Convert(); } pWrtShell->SetInsMode( bOldIns ); @@ -569,6 +548,70 @@ void SwView::HyphenateDocument() } } +/*-------------------------------------------------------------------- + --------------------------------------------------------------------*/ + +bool SwView::IsValidSelectionForThesaurus() const +{ + // must not be a multi-selection, and if it is a selection it needs + // to be within a single paragraph + + const bool bMultiSel = pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext(); + const sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection(); + return !bMultiSel && (!bSelection || pWrtShell->IsSelOnePara() ); +} + + +String SwView::GetThesaurusLookUpText( bool bSelection ) const +{ + return bSelection ? pWrtShell->GetSelTxt() : pWrtShell->GetCurWord(); +} + + +void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bSelection ) +{ + sal_Bool bOldIns = pWrtShell->IsInsMode(); + pWrtShell->SetInsMode( sal_True ); + + pWrtShell->StartAllAction(); + pWrtShell->StartUndo(UNDO_DELETE); + + if( !bSelection ) + { + if(pWrtShell->IsEndWrd()) + pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE ); + + pWrtShell->SelWrd(); + + // make sure the selection build later from the + // data below does not include footnotes and other + // "in word" character to the left and right in order + // to preserve those. Therefore count those "in words" + // in order to modify the selection accordingly. + const sal_Unicode* pChar = rLookUpText.GetBuffer(); + xub_StrLen nLeft = 0; + while (pChar && *pChar++ == CH_TXTATR_INWORD) + ++nLeft; + pChar = rLookUpText.Len() ? rLookUpText.GetBuffer() + rLookUpText.Len() - 1 : 0; + xub_StrLen nRight = 0; + while (pChar && *pChar-- == CH_TXTATR_INWORD) + ++nRight; + + // adjust existing selection + SwPaM *pCrsr = pWrtShell->GetCrsr(); + pCrsr->GetPoint()->nContent/*.nIndex*/ -= nRight; + pCrsr->GetMark()->nContent/*.nIndex*/ += nLeft; + } + + pWrtShell->Insert( rSynonmText ); + + pWrtShell->EndUndo(UNDO_DELETE); + pWrtShell->EndAllAction(); + + pWrtShell->SetInsMode( bOldIns ); +} + + /*-------------------------------------------------------------------- Beschreibung: Thesaurus starten --------------------------------------------------------------------*/ @@ -576,10 +619,7 @@ void SwView::HyphenateDocument() void SwView::StartThesaurus() { - if( pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext() ) - return; - sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection(); - if( bSelection && !pWrtShell->IsSelOnePara() ) + if (!IsValidSelectionForThesaurus()) return; SfxErrorContext aContext( ERRCTX_SVX_LINGU_THESAURUS, aEmptyStr, pEditWin, @@ -608,10 +648,9 @@ void SwView::StartThesaurus() Link aOldLnk = pSpell->ChgErrorLink(LINK(this, SwView, SpellError)); #endif - // get initial LookUp text - String aTmp = bSelection ? - pWrtShell->GetSelTxt() : pWrtShell->GetCurWord(); + const sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection(); + String aTmp = GetThesaurusLookUpText( bSelection ); Reference< XThesaurus > xThes( ::GetThesaurus() ); SvxThesaurusDialog *pDlg = NULL; @@ -661,54 +700,12 @@ void SwView::StartThesaurus() } if ( pDlg->Execute()== RET_OK ) - { - sal_Bool bOldIns = pWrtShell->IsInsMode(); - pWrtShell->SetInsMode( sal_True ); - - pWrtShell->StartAllAction(); - pWrtShell->StartUndo(UNDO_DELETE); - - if( !bSelection ) - { - if(pWrtShell->IsEndWrd()) - pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE ); - - pWrtShell->SelWrd(); - - // make sure the selection build later from the - // data below does not include footnotes and other - // "in word" character to the left and right in order - // to preserve those. Therefore count those "in words" - // in order to modify the selection accordingly. - const sal_Unicode* pChar = aTmp.GetBuffer(); - xub_StrLen nLeft = 0; - while (pChar && *pChar++ == CH_TXTATR_INWORD) - ++nLeft; - pChar = aTmp.Len() ? aTmp.GetBuffer() + aTmp.Len() - 1 : 0; - xub_StrLen nRight = 0; - while (pChar && *pChar-- == CH_TXTATR_INWORD) - ++nRight; - - // adjust existing selection - SwPaM *pCrsr = pWrtShell->GetCrsr(); - pCrsr->GetPoint()->nContent/*.nIndex*/ -= nRight; - pCrsr->GetMark()->nContent/*.nIndex*/ += nLeft; - } - - pWrtShell->Insert( pDlg->GetWord() ); - - pWrtShell->EndUndo(UNDO_DELETE); - pWrtShell->EndAllAction(); - - pWrtShell->SetInsMode( bOldIns ); - - } + InsertThesaurusSynonym( pDlg->GetWord(), aTmp, bSelection ); } delete pDlg; pVOpt->SetIdle( bOldIdle ); - } /*-------------------------------------------------------------------- diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index 7563a7b5e779..d9338d49262b 100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -306,7 +306,7 @@ void SwView::GetState(SfxItemSet &rSet) rSet.DisableItem( nWhich ); } break; - case FN_THESAURUS_DLG: + case SID_THESAURUS: { SwWrtShell &rSh = GetWrtShell(); if (2 <= rSh.GetCrsrCnt()) // multi selection? diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src index 06b4da304170..0fa63aabf98c 100644 --- a/sw/source/ui/web/web.src +++ b/sw/source/ui/web/web.src @@ -141,8 +141,8 @@ ToolBox RID_WEBTOOLS_TOOLBOX }; ToolBoxItem { - Identifier = FN_THESAURUS_DLG; - HelpID = FN_THESAURUS_DLG; + Identifier = SID_THESAURUS; + HelpID = SID_THESAURUS; Hide = TRUE; }; ToolBoxItem -- cgit v1.2.3 From eb2b1a667447266ff80d908dfac231065485e327 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 26 Nov 2009 09:21:18 +0000 Subject: #i51258# thesaurus for right click context menu (.uno:Thesaurus -> .uno:ThesaurusDialog) --- configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu b/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu index 6f2cb8c8a313..831f63b17189 100644 --- a/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu +++ b/configmgr/qa/unit/data/org/openoffice/UI/GenericCommands.xcu @@ -2956,7 +2956,7 @@ New FrameSet - + ~Thesaurus... -- cgit v1.2.3 From 2920e86466ecaffcce2c31ed7d066f5e5544b44b Mon Sep 17 00:00:00 2001 From: "Henning Brinkmann[hbrinkm]" Date: Mon, 30 Nov 2009 16:52:00 +0100 Subject: hb33patches1: #i106569# applied patch --- sw/source/filter/ww8/ww8par.cxx | 20 +++++++++++++++++++- sw/source/filter/ww8/ww8par.hxx | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index b9fd20dc1cba..673efc69d0bc 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2589,6 +2589,16 @@ bool SwWW8ImplReader::HandlePageBreakChar() //itself ignores them in this case. if (!nInTable) { + //xushanchuan add for issue106569 + BOOL IsTemp=TRUE; + SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode(); + if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) ) + { + IsTemp = FALSE; + AppendTxtNode(*pPaM->GetPoint()); + pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE)); + } + //xushanchuan end bPgSecBreak = true; pCtrlStck->KillUnlockedAttrs(*pPaM->GetPoint()); /* @@ -2597,7 +2607,9 @@ bool SwWW8ImplReader::HandlePageBreakChar() paragraph end, but nevertheless, numbering (and perhaps other similiar constructs) do not exist on the para. */ - if (!bWasParaEnd) + //xushanchuan add for issue106569 + if (!bWasParaEnd && IsTemp) + //xushanchuan end { bParaEndAdded = true; if (0 >= pPaM->GetPoint()->nContent.GetIndex()) @@ -2633,6 +2645,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) sal_Char cInsert = '\x0'; bool bRet = false; + //xushanchuan add for issue106569 + if ( 0xc != nWCharVal ) + bFirstParaOfPage = false; + //xushanchuan end switch (nWCharVal) { case 0: @@ -3172,6 +3188,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) // <-- rDoc.InsertPoolItem(*pPaM, SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK), 0); + bFirstParaOfPage = true;//xushanchuan add for issue106569 bPgSecBreak = false; } } @@ -3263,6 +3280,7 @@ SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage, bWasParaEnd = false; bDropCap = false; bFirstPara = true; + bFirstParaOfPage = false;//xushanchuan add for issue106569 bParaAutoBefore = false; bParaAutoAfter = false; nProgress = 0; diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 93a20df1576c..94ed0c3d9f4b 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1099,7 +1099,7 @@ private: // the very 1st Line Numbering and ignore the rest) bool bFirstPara; // first paragraph? - + bool bFirstParaOfPage;//cs2c--xushanchuan add for bug11210 bool bParaAutoBefore; bool bParaAutoAfter; -- cgit v1.2.3 From e9e59fc57083f5056a64d3c6c33867b6466af3c8 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 30 Nov 2009 16:54:56 +0100 Subject: #i100778# #i86609# ooxml import: positioning of legend and plot area --- oox/inc/oox/drawingml/chart/chartcontextbase.hxx | 15 +++ oox/inc/oox/drawingml/chart/chartconverter.hxx | 21 ++-- oox/inc/oox/drawingml/chart/converterbase.hxx | 32 ++++-- oox/inc/oox/drawingml/chart/modelbase.hxx | 19 ++++ oox/inc/oox/drawingml/chart/plotareamodel.hxx | 1 - oox/inc/oox/drawingml/chart/titlecontext.hxx | 15 --- oox/inc/oox/drawingml/chart/titlemodel.hxx | 18 ---- oox/source/drawingml/chart/chartcontextbase.cxx | 61 +++++++++++ oox/source/drawingml/chart/chartconverter.cxx | 8 +- oox/source/drawingml/chart/chartspaceconverter.cxx | 22 ++-- oox/source/drawingml/chart/converterbase.cxx | 111 ++++++++++++++++++--- oox/source/drawingml/chart/modelbase.cxx | 20 ++++ oox/source/drawingml/chart/objectformatter.cxx | 4 +- oox/source/drawingml/chart/plotareaconverter.cxx | 26 +++++ oox/source/drawingml/chart/titlecontext.cxx | 59 ----------- oox/source/drawingml/chart/titleconverter.cxx | 61 ++++++++++- oox/source/drawingml/chart/titlemodel.cxx | 19 ---- oox/source/drawingml/graphicshapecontext.cxx | 2 +- oox/source/token/properties.txt | 3 + 19 files changed, 358 insertions(+), 159 deletions(-) diff --git a/oox/inc/oox/drawingml/chart/chartcontextbase.hxx b/oox/inc/oox/drawingml/chart/chartcontextbase.hxx index d1f61bcb3827..517fbb0aba5f 100644 --- a/oox/inc/oox/drawingml/chart/chartcontextbase.hxx +++ b/oox/inc/oox/drawingml/chart/chartcontextbase.hxx @@ -82,6 +82,21 @@ public: // ============================================================================ +struct LayoutModel; + +/** Handler for a chart layout context (c:layout element). + */ +class LayoutContext : public ContextBase< LayoutModel > +{ +public: + explicit LayoutContext( ::oox::core::ContextHandler2Helper& rParent, LayoutModel& rModel ); + virtual ~LayoutContext(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ); +}; + +// ============================================================================ + } // namespace chart } // namespace drawingml } // namespace oox diff --git a/oox/inc/oox/drawingml/chart/chartconverter.hxx b/oox/inc/oox/drawingml/chart/chartconverter.hxx index 63cae67b8af1..d3ca5bf4e610 100644 --- a/oox/inc/oox/drawingml/chart/chartconverter.hxx +++ b/oox/inc/oox/drawingml/chart/chartconverter.hxx @@ -36,14 +36,13 @@ #include namespace com { namespace sun { namespace star { + namespace awt { struct Size; } namespace chart2 { class XChartDocument; } namespace chart2 { namespace data { class XDataProvider; } } namespace chart2 { namespace data { class XDataSequence; } } } } } -namespace oox { namespace core { - class XmlFilterBase; -} } +namespace oox { namespace core { class XmlFilterBase; } } namespace oox { namespace drawingml { @@ -60,11 +59,21 @@ public: explicit ChartConverter(); virtual ~ChartConverter(); - /** Converts the passed OOXML chart model to the passed chart2 document. */ + /** Converts the passed OOXML chart model to the passed chart2 document. + + @param rChartModel The filled MSOOXML chart model structure. + + @param rxChartDoc The UNO chart document model to be initialized. + + @param rChartSize The size of the chart shape in 1/100 mm. Needed for + calculation of position and size of the chart elements (diagram, + titles, legend, etc.) and embedded shapes. + */ void convertFromModel( ::oox::core::XmlFilterBase& rFilter, - ChartSpaceModel& rModel, - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc ); + ChartSpaceModel& rChartModel, + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc, + const ::com::sun::star::awt::Size& rChartSize ); /** Creates an internal data provider. Derived classes may override this function to create an external data provider. */ diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx index f456d955df5d..4f6e04abeee0 100644 --- a/oox/inc/oox/drawingml/chart/converterbase.hxx +++ b/oox/inc/oox/drawingml/chart/converterbase.hxx @@ -36,7 +36,10 @@ #include "oox/drawingml/chart/objectformatter.hxx" namespace com { namespace sun { namespace star { + namespace awt { struct Rectangle; } + namespace awt { struct Size; } namespace lang { class XMultiServiceFactory; } + namespace chart { class XDiagram; } namespace chart2 { class XChartDocument; } } } } @@ -61,16 +64,11 @@ public: explicit ConverterRoot( ::oox::core::XmlFilterBase& rFilter, ChartConverter& rChartConverter, + const ChartSpaceModel& rChartModel, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc, - const ChartSpaceModel& rChartSpace ); + const ::com::sun::star::awt::Size& rChartSize ); virtual ~ConverterRoot(); - /** Creates an instance for the passed service name, using the passed service factory. */ - static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > - createInstance( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxFactory, - const ::rtl::OUString& rServiceName ); - /** Creates an instance for the passed service name, using the process service factory. */ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createInstance( const ::rtl::OUString& rServiceName ) const; @@ -83,8 +81,13 @@ protected: /** Returns the API chart document model. */ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > getChartDocument() const; + /** Returns the position and size of the chart shape in 1/100 mm. */ + const ::com::sun::star::awt::Size& getChartSize() const; /** Returns the object formatter. */ ObjectFormatter& getFormatter() const; + /** Returns the *old* API diagram model. */ + ::com::sun::star::uno::Reference< ::com::sun::star::chart::XDiagram > + getChart1Diagram() const; private: ::boost::shared_ptr< ConverterData > mxData; @@ -109,6 +112,21 @@ protected: // ============================================================================ +/** A layout converter calculates positions and sizes for various chart objects. + */ +class LayoutConverter : public ConverterBase< LayoutModel > +{ +public: + explicit LayoutConverter( const ConverterRoot& rParent, LayoutModel& rModel ); + virtual ~LayoutConverter(); + + /** Tries to calculate the absolute position and size from the contained + OOXML layout model. Returns true, if returned rectangle is valid. */ + bool calcAbsRectangle( ::com::sun::star::awt::Rectangle& orRect ); +}; + +// ============================================================================ + } // namespace chart } // namespace drawingml } // namespace oox diff --git a/oox/inc/oox/drawingml/chart/modelbase.hxx b/oox/inc/oox/drawingml/chart/modelbase.hxx index b1e5ae088f0d..cb8557cfb723 100644 --- a/oox/inc/oox/drawingml/chart/modelbase.hxx +++ b/oox/inc/oox/drawingml/chart/modelbase.hxx @@ -117,6 +117,25 @@ struct NumberFormat // ============================================================================ +struct LayoutModel +{ + double mfX; /// Left position of this object. + double mfY; /// Top position of this object. + double mfW; /// Width of this object. + double mfH; /// Height of this object. + sal_Int32 mnXMode; /// Mode for left position. + sal_Int32 mnYMode; /// Mode for top position. + sal_Int32 mnWMode; /// Mode for width. + sal_Int32 mnHMode; /// Mode for height. + sal_Int32 mnTarget; /// Layout target for plot area. + bool mbAutoLayout; /// True = automatic positioning. + + explicit LayoutModel(); + ~LayoutModel(); +}; + +// ============================================================================ + } // namespace chart } // namespace drawingml } // namespace oox diff --git a/oox/inc/oox/drawingml/chart/plotareamodel.hxx b/oox/inc/oox/drawingml/chart/plotareamodel.hxx index bc8a359ddac6..008e2f9547db 100644 --- a/oox/inc/oox/drawingml/chart/plotareamodel.hxx +++ b/oox/inc/oox/drawingml/chart/plotareamodel.hxx @@ -34,7 +34,6 @@ #include "oox/drawingml/shape.hxx" #include "oox/drawingml/chart/axismodel.hxx" #include "oox/drawingml/chart/seriesmodel.hxx" -#include "oox/drawingml/chart/titlemodel.hxx" #include "oox/drawingml/chart/typegroupmodel.hxx" namespace oox { diff --git a/oox/inc/oox/drawingml/chart/titlecontext.hxx b/oox/inc/oox/drawingml/chart/titlecontext.hxx index 73238bcad7e6..609d07328295 100644 --- a/oox/inc/oox/drawingml/chart/titlecontext.hxx +++ b/oox/inc/oox/drawingml/chart/titlecontext.hxx @@ -40,21 +40,6 @@ namespace chart { // ============================================================================ -struct LayoutModel; - -/** Handler for a chart layout context (c:layout element). - */ -class LayoutContext : public ContextBase< LayoutModel > -{ -public: - explicit LayoutContext( ::oox::core::ContextHandler2Helper& rParent, LayoutModel& rModel ); - virtual ~LayoutContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ); -}; - -// ============================================================================ - struct TextModel; /** Handler for a chart text context (c:tx element). diff --git a/oox/inc/oox/drawingml/chart/titlemodel.hxx b/oox/inc/oox/drawingml/chart/titlemodel.hxx index ee66a655fa70..13b7a057eacd 100644 --- a/oox/inc/oox/drawingml/chart/titlemodel.hxx +++ b/oox/inc/oox/drawingml/chart/titlemodel.hxx @@ -41,24 +41,6 @@ namespace chart { // ============================================================================ -struct LayoutModel -{ - double mfX; /// Left position of this object. - double mfY; /// Top position of this object. - double mfW; /// Width of this object. - double mfH; /// Height of this object. - sal_Int32 mnXMode; /// Mode for left position. - sal_Int32 mnYMode; /// Mode for top position. - sal_Int32 mnWMode; /// Mode for width. - sal_Int32 mnHMode; /// Mode for height. - sal_Int32 mnTarget; /// Layout target for plot area. - - explicit LayoutModel(); - ~LayoutModel(); -}; - -// ============================================================================ - struct TextModel { typedef ModelRef< DataSequenceModel > DataSequenceRef; diff --git a/oox/source/drawingml/chart/chartcontextbase.cxx b/oox/source/drawingml/chart/chartcontextbase.cxx index a65f56dbfc5f..a1b557f5af83 100644 --- a/oox/source/drawingml/chart/chartcontextbase.cxx +++ b/oox/source/drawingml/chart/chartcontextbase.cxx @@ -31,6 +31,7 @@ #include "oox/drawingml/chart/chartcontextbase.hxx" #include "oox/drawingml/shapepropertiescontext.hxx" +#include "oox/drawingml/chart/modelbase.hxx" using ::oox::core::ContextHandler2Helper; using ::oox::core::ContextHandlerRef; @@ -57,6 +58,66 @@ ContextHandlerRef ShapePrWrapperContext::onCreateContext( sal_Int32 nElement, co // ============================================================================ +LayoutContext::LayoutContext( ContextHandler2Helper& rParent, LayoutModel& rModel ) : + ContextBase< LayoutModel >( rParent, rModel ) +{ +} + +LayoutContext::~LayoutContext() +{ +} + +ContextHandlerRef LayoutContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) +{ + switch( getCurrentElement() ) + { + case C_TOKEN( layout ): + switch( nElement ) + { + case C_TOKEN( manualLayout ): + mrModel.mbAutoLayout = false; + return this; + } + break; + + case C_TOKEN( manualLayout ): + switch( nElement ) + { + case C_TOKEN( x ): + mrModel.mfX = rAttribs.getDouble( XML_val, 0.0 ); + return 0; + case C_TOKEN( y ): + mrModel.mfY = rAttribs.getDouble( XML_val, 0.0 ); + return 0; + case C_TOKEN( w ): + mrModel.mfW = rAttribs.getDouble( XML_val, 0.0 ); + return 0; + case C_TOKEN( h ): + mrModel.mfH = rAttribs.getDouble( XML_val, 0.0 ); + return 0; + case C_TOKEN( xMode ): + mrModel.mnXMode = rAttribs.getToken( XML_val, XML_factor ); + return 0; + case C_TOKEN( yMode ): + mrModel.mnYMode = rAttribs.getToken( XML_val, XML_factor ); + return 0; + case C_TOKEN( wMode ): + mrModel.mnWMode = rAttribs.getToken( XML_val, XML_factor ); + return 0; + case C_TOKEN( hMode ): + mrModel.mnHMode = rAttribs.getToken( XML_val, XML_factor ); + return 0; + case C_TOKEN( layoutTarget ): + mrModel.mnTarget = rAttribs.getToken( XML_val, XML_outer ); + return 0; + } + break; + } + return 0; +} + +// ============================================================================ + } // namespace chart } // namespace drawingml } // namespace oox diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx index f4633e3cad66..59698bb91e45 100644 --- a/oox/source/drawingml/chart/chartconverter.cxx +++ b/oox/source/drawingml/chart/chartconverter.cxx @@ -37,6 +37,7 @@ using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Exception; +using ::com::sun::star::awt::Size; using ::com::sun::star::chart2::XChartDocument; using ::com::sun::star::chart2::data::XDataProvider; using ::com::sun::star::chart2::data::XDataSequence; @@ -57,13 +58,14 @@ ChartConverter::~ChartConverter() } void ChartConverter::convertFromModel( XmlFilterBase& rFilter, - ChartSpaceModel& rModel, const Reference< XChartDocument >& rxChartDoc ) + ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc, + const Size& rChartSize ) { OSL_ENSURE( rxChartDoc.is(), "ChartConverter::convertFromModel - missing chart document" ); if( rxChartDoc.is() ) { - ConverterRoot aConvBase( rFilter, *this, rxChartDoc, rModel ); - ChartSpaceConverter aSpaceConv( aConvBase, rModel ); + ConverterRoot aConvBase( rFilter, *this, rChartModel, rxChartDoc, rChartSize ); + ChartSpaceConverter aSpaceConv( aConvBase, rChartModel ); aSpaceConv.convertFromModel(); } } diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index e6e62af3b5d2..ebb5af23a368 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -30,11 +30,11 @@ ************************************************************************/ #include "oox/drawingml/chart/chartspaceconverter.hxx" +#include #include #include #include #include -#include #include "oox/core/xmlfilterbase.hxx" #include "oox/drawingml/chart/chartconverter.hxx" #include "oox/drawingml/chart/chartspacemodel.hxx" @@ -85,8 +85,8 @@ void ChartSpaceConverter::convertFromModel() } // formatting of the chart background - PropertySet aPropSet( getChartDocument()->getPageBackground() ); - getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE ); + PropertySet aBackPropSet( getChartDocument()->getPageBackground() ); + getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE ); // convert plot area (container of all chart type groups) PlotAreaConverter aPlotAreaConv( *this, mrModel.mxPlotArea.getOrCreate() ); @@ -125,10 +125,10 @@ void ChartSpaceConverter::convertFromModel() } // legend - if( mrModel.mxLegend.is() ) + if( xDiagram.is() && mrModel.mxLegend.is() ) { LegendConverter aLegendConv( *this, *mrModel.mxLegend ); - aLegendConv.convertFromModel( getChartDocument()->getFirstDiagram() ); + aLegendConv.convertFromModel( xDiagram ); } // treatment of missing values @@ -146,13 +146,11 @@ void ChartSpaceConverter::convertFromModel() aDiaProp.setProperty( PROP_MissingValueTreatment, nMissingValues ); } - // set the IncludeHiddenCells property via the old API as only this ensures that the data provider and al created sequences get this flag correctly - Reference< com::sun::star::chart::XChartDocument > xStandardApiChartDoc( getChartDocument(), UNO_QUERY ); - if( xStandardApiChartDoc.is() ) - { - PropertySet aStandardApiDiagramProp( xStandardApiChartDoc->getDiagram() ); - aStandardApiDiagramProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly ); - } + /* Set the IncludeHiddenCells property via the old API as only this + ensures that the data provider and all created sequences get this flag + correctly. */ + PropertySet aOldDiaProp( getChart1Diagram() ); + aOldDiaProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly ); } // ============================================================================ diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index c9b91e308414..369b71fc6b48 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "oox/core/xmlfilterbase.hxx" #include "oox/drawingml/theme.hxx" @@ -41,9 +42,12 @@ using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; using ::com::sun::star::uno::Exception; +using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::frame::XModel; +using ::com::sun::star::awt::Rectangle; +using ::com::sun::star::awt::Size; using ::com::sun::star::chart2::XChartDocument; using ::oox::core::XmlFilterBase; @@ -55,16 +59,18 @@ namespace chart { struct ConverterData { + ObjectFormatter maFormatter; XmlFilterBase& mrFilter; ChartConverter& mrConverter; Reference< XChartDocument > mxDoc; - ObjectFormatter maFormatter; + Size maSize; explicit ConverterData( XmlFilterBase& rFilter, ChartConverter& rChartConverter, + const ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc, - const ChartSpaceModel& rChartSpace ); + const Size& rChartSize ); ~ConverterData(); }; @@ -73,12 +79,14 @@ struct ConverterData ConverterData::ConverterData( XmlFilterBase& rFilter, ChartConverter& rChartConverter, + const ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc, - const ChartSpaceModel& rChartSpace ) : + const Size& rChartSize ) : + maFormatter( rFilter, rxChartDoc, rChartModel ), mrFilter( rFilter ), mrConverter( rChartConverter ), mxDoc( rxChartDoc ), - maFormatter( rFilter, rxChartDoc, rChartSpace ) + maSize( rChartSize ) { OSL_ENSURE( mxDoc.is(), "ConverterData::ConverterData - missing chart document" ); // lock the model to suppress internal updates during conversion @@ -110,9 +118,10 @@ ConverterData::~ConverterData() ConverterRoot::ConverterRoot( XmlFilterBase& rFilter, ChartConverter& rChartConverter, + const ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc, - const ChartSpaceModel& rChartSpace ) : - mxData( new ConverterData( rFilter, rChartConverter, rxChartDoc, rChartSpace ) ) + const Size& rChartSize ) : + mxData( new ConverterData( rFilter, rChartConverter, rChartModel, rxChartDoc, rChartSize ) ) { } @@ -120,13 +129,12 @@ ConverterRoot::~ConverterRoot() { } -Reference< XInterface > ConverterRoot::createInstance( - const Reference< XMultiServiceFactory >& rxFactory, const OUString& rServiceName ) +Reference< XInterface > ConverterRoot::createInstance( const OUString& rServiceName ) const { Reference< XInterface > xInt; - if( rxFactory.is() ) try + try { - xInt = rxFactory->createInstance( rServiceName ); + xInt = mxData->mrFilter.getGlobalFactory()->createInstance( rServiceName ); } catch( Exception& ) { @@ -135,11 +143,6 @@ Reference< XInterface > ConverterRoot::createInstance( return xInt; } -Reference< XInterface > ConverterRoot::createInstance( const OUString& rServiceName ) const -{ - return createInstance( mxData->mrFilter.getGlobalFactory(), rServiceName ); -} - XmlFilterBase& ConverterRoot::getFilter() const { return mxData->mrFilter; @@ -155,11 +158,89 @@ Reference< XChartDocument > ConverterRoot::getChartDocument() const return mxData->mxDoc; } +const Size& ConverterRoot::getChartSize() const +{ + return mxData->maSize; +} + ObjectFormatter& ConverterRoot::getFormatter() const { return mxData->maFormatter; } +Reference< ::com::sun::star::chart::XDiagram > ConverterRoot::getChart1Diagram() const +{ + Reference< ::com::sun::star::chart::XDiagram > xDiagram; + Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( mxData->mxDoc, UNO_QUERY ); + if( xChart1Doc.is() ) + xDiagram = xChart1Doc->getDiagram(); + return xDiagram; +} + +// ============================================================================ + +namespace { + +sal_Int32 lclCalcPosition( sal_Int32 nChartSize, double fPos, sal_Int32 nPosMode ) +{ + switch( nPosMode ) + { + case XML_edge: // absolute start position as factor of chart size + return getLimitedValue< sal_Int32, double >( nChartSize * fPos + 0.5, 0, nChartSize ); + case XML_factor: // position relative to object default position + OSL_ENSURE( false, "lclCalcPosition - relative positioning not supported" ); + return -1; + }; + + OSL_ENSURE( false, "lclCalcPosition - unknown positioning mode" ); + return -1; +} + +sal_Int32 lclCalcSize( sal_Int32 nPos, sal_Int32 nChartSize, double fSize, sal_Int32 nSizeMode ) +{ + sal_Int32 nValue = getLimitedValue< sal_Int32, double >( nChartSize * fSize + 0.5, 0, nChartSize ); + switch( nSizeMode ) + { + case XML_factor: // size as factor of chart size + return nValue; + case XML_edge: // absolute end position as factor of chart size + return nValue - nPos + 1; + }; + + OSL_ENSURE( false, "lclCalcSize - unknown size mode" ); + return -1; +} + +} // namespace + +// ---------------------------------------------------------------------------- + +LayoutConverter::LayoutConverter( const ConverterRoot& rParent, LayoutModel& rModel ) : + ConverterBase< LayoutModel >( rParent, rModel ) +{ +} + +LayoutConverter::~LayoutConverter() +{ +} + +bool LayoutConverter::calcAbsRectangle( Rectangle& orRect ) +{ + if( !mrModel.mbAutoLayout ) + { + const Size& rChartSize = getChartSize(); + orRect.X = lclCalcPosition( rChartSize.Width, mrModel.mfX, mrModel.mnXMode ); + orRect.Y = lclCalcPosition( rChartSize.Height, mrModel.mfY, mrModel.mnYMode ); + if( (orRect.X >= 0) && (orRect.Y >= 0) ) + { + orRect.Width = lclCalcSize( orRect.X, rChartSize.Width, mrModel.mfW, mrModel.mnWMode ); + orRect.Height = lclCalcSize( orRect.Y, rChartSize.Height, mrModel.mfH, mrModel.mnHMode ); + return (orRect.Width > 0) && (orRect.Height > 0); + } + } + return false; +} + // ============================================================================ } // namespace chart diff --git a/oox/source/drawingml/chart/modelbase.cxx b/oox/source/drawingml/chart/modelbase.cxx index a7ff9c2641b0..2c71fd0028df 100644 --- a/oox/source/drawingml/chart/modelbase.cxx +++ b/oox/source/drawingml/chart/modelbase.cxx @@ -54,6 +54,26 @@ void NumberFormat::setAttributes( const AttributeList& rAttribs ) // ============================================================================ +LayoutModel::LayoutModel() : + mfX( 0.0 ), + mfY( 0.0 ), + mfW( 0.0 ), + mfH( 0.0 ), + mnXMode( XML_factor ), + mnYMode( XML_factor ), + mnWMode( XML_factor ), + mnHMode( XML_factor ), + mnTarget( XML_outer ), + mbAutoLayout( true ) +{ +} + +LayoutModel::~LayoutModel() +{ +} + +// ============================================================================ + } // namespace chart } // namespace drawingml } // namespace oox diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 46253e92dd68..a82f0193f832 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1199,12 +1199,12 @@ void ObjectFormatter::convertAutomaticFill( PropertySet& rPropSet, ObjectType eO pFormat->convertAutomaticFill( rPropSet, nSeriesIdx ); } -bool ObjectFormatter::isAutomaticLine( const ModelRef< Shape >& rxShapeProp ) +/*static*/ bool ObjectFormatter::isAutomaticLine( const ModelRef< Shape >& rxShapeProp ) { return !rxShapeProp || !rxShapeProp->getLineProperties().maLineFill.moFillType.has(); } -bool ObjectFormatter::isAutomaticFill( const ModelRef< Shape >& rxShapeProp ) +/*static*/ bool ObjectFormatter::isAutomaticFill( const ModelRef< Shape >& rxShapeProp ) { return !rxShapeProp || !rxShapeProp->getFillProperties().moFillType.has(); } diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index b4345af3f088..278de57ef7cb 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -32,6 +32,7 @@ #include "oox/drawingml/chart/plotareaconverter.hxx" #include #include +#include #include #include #include @@ -45,6 +46,8 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY_THROW; +using ::com::sun::star::awt::Rectangle; +using ::com::sun::star::chart::XDiagramPositioning; using ::com::sun::star::chart2::XCoordinateSystem; using ::com::sun::star::chart2::XCoordinateSystemContainer; using ::com::sun::star::chart2::XDiagram; @@ -408,6 +411,29 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) PropertySet aPropSet( xDiagram->getWall() ); getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, OBJECTTYPE_PLOTAREA2D ); } + + // plot area position and size + LayoutModel& rLayout = mrModel.mxLayout.getOrCreate(); + LayoutConverter aLayoutConv( *this, rLayout ); + Rectangle aDiagramRect; + if( aLayoutConv.calcAbsRectangle( aDiagramRect ) ) try + { + Reference< XDiagramPositioning > xPositioning( getChart1Diagram(), UNO_QUERY_THROW ); + switch( rLayout.mnTarget ) + { + case XML_inner: + xPositioning->setDiagramPositionExcludingAxes( aDiagramRect ); + break; + case XML_outer: + xPositioning->setDiagramPositionIncludingAxes( aDiagramRect ); + break; + default: + OSL_ENSURE( false, "PlotAreaConverter::convertFromModel - unknown positioning target" ); + } + } + catch( Exception& ) + { + } } // ============================================================================ diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx index 05006ce2f8fd..1ab0ee5bb938 100644 --- a/oox/source/drawingml/chart/titlecontext.cxx +++ b/oox/source/drawingml/chart/titlecontext.cxx @@ -45,65 +45,6 @@ namespace chart { // ============================================================================ -LayoutContext::LayoutContext( ContextHandler2Helper& rParent, LayoutModel& rModel ) : - ContextBase< LayoutModel >( rParent, rModel ) -{ -} - -LayoutContext::~LayoutContext() -{ -} - -ContextHandlerRef LayoutContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) -{ - switch( getCurrentElement() ) - { - case C_TOKEN( layout ): - switch( nElement ) - { - case C_TOKEN( manualLayout ): - return this; - } - break; - - case C_TOKEN( manualLayout ): - switch( nElement ) - { - case C_TOKEN( x ): - mrModel.mfX = rAttribs.getDouble( XML_val, 0.0 ); - return 0; - case C_TOKEN( y ): - mrModel.mfY = rAttribs.getDouble( XML_val, 0.0 ); - return 0; - case C_TOKEN( w ): - mrModel.mfW = rAttribs.getDouble( XML_val, 0.0 ); - return 0; - case C_TOKEN( h ): - mrModel.mfH = rAttribs.getDouble( XML_val, 0.0 ); - return 0; - case C_TOKEN( xMode ): - mrModel.mnXMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; - case C_TOKEN( yMode ): - mrModel.mnYMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; - case C_TOKEN( wMode ): - mrModel.mnWMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; - case C_TOKEN( hMode ): - mrModel.mnHMode = rAttribs.getToken( XML_val, XML_factor ); - return 0; - case C_TOKEN( layoutTarget ): - mrModel.mnTarget = rAttribs.getToken( XML_val, XML_outer ); - return 0; - } - break; - } - return 0; -} - -// ============================================================================ - TextContext::TextContext( ContextHandler2Helper& rParent, TextModel& rModel ) : ContextBase< TextModel >( rParent, rModel ) { diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index 7c866666c844..4d7d1d29f423 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -30,11 +30,15 @@ ************************************************************************/ #include "oox/drawingml/chart/titleconverter.hxx" +#include +#include +#include #include #include #include #include #include +#include "properties.hxx" #include "oox/drawingml/textbody.hxx" #include "oox/drawingml/textparagraph.hxx" #include "oox/drawingml/chart/datasourceconverter.hxx" @@ -45,6 +49,7 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY_THROW; +using ::com::sun::star::awt::Rectangle; using ::com::sun::star::chart2::XDiagram; using ::com::sun::star::chart2::XFormattedString; using ::com::sun::star::chart2::XLegend; @@ -198,12 +203,66 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) { if( rxDiagram.is() ) try { + namespace cssc2 = ::com::sun::star::chart2; + // create the legend Reference< XLegend > xLegend( createInstance( CREATE_OUSTRING( "com.sun.star.chart2.Legend" ) ), UNO_QUERY_THROW ); rxDiagram->setLegend( xLegend ); + PropertySet aPropSet( xLegend ); + aPropSet.setProperty( PROP_Show, true ); + + // legend position and expansion + LayoutModel& rLayout = mrModel.mxLayout.getOrCreate(); + LayoutConverter aLayoutConv( *this, rLayout ); + Rectangle aLegendRect; + bool bManualLayout = aLayoutConv.calcAbsRectangle( aLegendRect ); + if( bManualLayout ) + { + // relative position + cssc2::RelativePosition aRelPos; + aRelPos.Primary = getLimitedValue< double, double >( rLayout.mfX, 0.0, 1.0 ); + aRelPos.Secondary = getLimitedValue< double, double >( rLayout.mfY, 0.0, 1.0 ); + aRelPos.Anchor = ::com::sun::star::drawing::Alignment_TOP_LEFT; + aPropSet.setProperty( PROP_AnchorPosition, cssc2::LegendPosition_CUSTOM ); + aPropSet.setProperty( PROP_RelativePosition, aRelPos ); + + // #i71697# it is not possible to set the size directly, do some magic here + cssc2::LegendExpansion eLegendExpand = cssc2::LegendExpansion_BALANCED; + double fRatio = static_cast< double >( aLegendRect.Width ) / aLegendRect.Height; + if( fRatio > 1.5 ) + eLegendExpand = cssc2::LegendExpansion_WIDE; + else if( fRatio < 0.75 ) + eLegendExpand = cssc2::LegendExpansion_HIGH; + aPropSet.setProperty( PROP_Expansion, eLegendExpand ); + } + else // automatic layout + { + cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_LINE_END; + cssc2::LegendExpansion eLegendExpand = cssc2::LegendExpansion_HIGH; + switch( mrModel.mnPosition ) + { + case XML_l: + eLegendPos = cssc2::LegendPosition_LINE_START; + eLegendExpand = cssc2::LegendExpansion_HIGH; + break; + case XML_r: + eLegendPos = cssc2::LegendPosition_LINE_END; + eLegendExpand = cssc2::LegendExpansion_HIGH; + break; + case XML_t: + eLegendPos = cssc2::LegendPosition_PAGE_START; + eLegendExpand = cssc2::LegendExpansion_WIDE; + break; + case XML_b: + eLegendPos = cssc2::LegendPosition_PAGE_END; + eLegendExpand = cssc2::LegendExpansion_WIDE; + break; + } + aPropSet.setProperty( PROP_AnchorPosition, eLegendPos ); + aPropSet.setProperty( PROP_Expansion, eLegendExpand ); + } // legend formatting - PropertySet aPropSet( xLegend ); getFormatter().convertFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxTextProp, OBJECTTYPE_LEGEND ); } catch( Exception& ) diff --git a/oox/source/drawingml/chart/titlemodel.cxx b/oox/source/drawingml/chart/titlemodel.cxx index 0a317396bb0b..95fea2020adc 100644 --- a/oox/source/drawingml/chart/titlemodel.cxx +++ b/oox/source/drawingml/chart/titlemodel.cxx @@ -37,25 +37,6 @@ namespace chart { // ============================================================================ -LayoutModel::LayoutModel() : - mfX( 0.0 ), - mfY( 0.0 ), - mfW( 0.0 ), - mfH( 0.0 ), - mnXMode( XML_factor ), - mnYMode( XML_factor ), - mnWMode( XML_factor ), - mnHMode( XML_factor ), - mnTarget( XML_outer ) -{ -} - -LayoutModel::~LayoutModel() -{ -} - -// ============================================================================ - TextModel::TextModel() { } diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 1d7ebc888cf3..c13e90c74a36 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -386,7 +386,7 @@ void CreateChartCallback::onXShapeCreated( const Reference< drawing::XShape >& r // convert imported chart model to chart document Reference< chart2::XChartDocument > xChartDoc( xDocModel, UNO_QUERY_THROW ); - mrFilter.getChartConverter().convertFromModel( mrFilter, aModel, xChartDoc ); + mrFilter.getChartConverter().convertFromModel( mrFilter, aModel, xChartDoc, rxShape->getSize() ); } catch( Exception& ) { diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 0ecd40ee6595..1ce24e4abc2f 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -6,6 +6,7 @@ Adjust AdjustContrast AdjustLuminance Align +AnchorPosition ArrangeOrder Aspect AttachedAxisIndex @@ -115,6 +116,7 @@ ErrorBarX ErrorBarY ErrorMessage ErrorTitle +Expansion ExternalDocLinks ExternalLinks FileFormat @@ -293,6 +295,7 @@ ReferenceDevice RegularExpressions RelId RelativeHorizontalTabbarWidth +RelativePosition Repeat RepeatDelay Representation -- cgit v1.2.3 From cb7912347aa85b106865f7a385d31af92a9d88f5 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Tue, 1 Dec 2009 10:46:20 +0000 Subject: 'deprecated' comment added --- sfx2/inc/sfx2/mnumgr.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sfx2/inc/sfx2/mnumgr.hxx b/sfx2/inc/sfx2/mnumgr.hxx index afef61884bcf..a30dca7d2876 100644 --- a/sfx2/inc/sfx2/mnumgr.hxx +++ b/sfx2/inc/sfx2/mnumgr.hxx @@ -120,12 +120,20 @@ public: SfxPopupMenuManager( PopupMenu*, SfxBindings& ); ~SfxPopupMenuManager(); static void ExecutePopup( const ResId&, SfxViewFrame* pViewFrame, const Point& rPoint, Window* pWindow ); + // @deprecated!! + // Don't use this method any longer. The whole class will be removed in the future. + // Changing code which relies on Popup would need much more effort. + // Please contact cd@openoffice.org if you have questions or need help static SfxPopupMenuManager* Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, Window* pWindow ); USHORT Execute( const Point& rPos, Window *pWindow ); USHORT Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 ); USHORT Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1 ... ); + // @deprecated (start)!! + // Don't use these methods any longer. The whole class will be removed in the future. + // Changing code which relies on these methods would need much more effort! + // Please contact cd@openoffice.org if you have questions or need help void StartInsert(); void EndInsert(); void CheckItem( USHORT, BOOL ); @@ -133,6 +141,8 @@ public: void InsertItem( USHORT, const String&, MenuItemBits, USHORT nPos = MENU_APPEND ); void InsertSeparator( USHORT nPos = MENU_APPEND ); + // @deprecated (end) + void RemoveDisabledEntries(); void AddClipboardFunctions(); Menu* GetSVMenu(); -- cgit v1.2.3 From 0cd4e15a401ccefb853cdce12a0e80ef94bb674b Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Wed, 2 Dec 2009 16:32:36 +0100 Subject: chartpositioning: #i86609# set manual position for legend, title, axis titles --- oox/inc/oox/drawingml/chart/converterbase.hxx | 6 +- oox/source/drawingml/chart/axisconverter.cxx | 3 +- oox/source/drawingml/chart/converterbase.cxx | 19 +++++- oox/source/drawingml/chart/titleconverter.cxx | 84 +++++++++++++-------------- oox/source/dump/biffdumper.ini | 2 +- 5 files changed, 68 insertions(+), 46 deletions(-) diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx index 4f6e04abeee0..25a6428018aa 100644 --- a/oox/inc/oox/drawingml/chart/converterbase.hxx +++ b/oox/inc/oox/drawingml/chart/converterbase.hxx @@ -122,7 +122,11 @@ public: /** Tries to calculate the absolute position and size from the contained OOXML layout model. Returns true, if returned rectangle is valid. */ - bool calcAbsRectangle( ::com::sun::star::awt::Rectangle& orRect ); + 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. */ + bool convertFromModel( PropertySet& rPropSet ); }; // ============================================================================ diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index 1fd8dbd61f31..36a18117fd04 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -305,7 +305,8 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo // axis title --------------------------------------------------------- - if( mrModel.mxTitle.is() ) + // in radar charts, title objects may exist, but are not shown + if( mrModel.mxTitle.is() && (rTypeGroup.getTypeInfo().meTypeCategory != TYPECATEGORY_RADAR) ) { Reference< XTitled > xTitled( xAxis, UNO_QUERY_THROW ); TitleConverter aTitleConv( *this, *mrModel.mxTitle ); diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index 369b71fc6b48..22b359ab0866 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -35,6 +35,8 @@ #include #include #include +#include +#include "properties.hxx" #include "oox/core/xmlfilterbase.hxx" #include "oox/drawingml/theme.hxx" @@ -48,6 +50,7 @@ using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::frame::XModel; using ::com::sun::star::awt::Rectangle; using ::com::sun::star::awt::Size; +using ::com::sun::star::chart2::RelativePosition; using ::com::sun::star::chart2::XChartDocument; using ::oox::core::XmlFilterBase; @@ -224,7 +227,7 @@ LayoutConverter::~LayoutConverter() { } -bool LayoutConverter::calcAbsRectangle( Rectangle& orRect ) +bool LayoutConverter::calcAbsRectangle( Rectangle& orRect ) const { if( !mrModel.mbAutoLayout ) { @@ -241,6 +244,20 @@ bool LayoutConverter::calcAbsRectangle( Rectangle& orRect ) return false; } +bool LayoutConverter::convertFromModel( PropertySet& rPropSet ) +{ + if( !mrModel.mbAutoLayout && (mrModel.mfX >= 0.0) && (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; + rPropSet.setProperty( PROP_RelativePosition, aPos ); + return true; + } + return false; +} + // ============================================================================ } // namespace chart diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index 4d7d1d29f423..fdb8cdc7793e 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -32,7 +32,6 @@ #include "oox/drawingml/chart/titleconverter.hxx" #include #include -#include #include #include #include @@ -181,6 +180,10 @@ void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, con OSL_ENSURE( !mrModel.mxTextProp || !rText.mxTextBody, "TitleConverter::convertFromModel - multiple text properties" ); ModelRef< TextBody > xTextProp = mrModel.mxTextProp.is() ? mrModel.mxTextProp : rText.mxTextBody; getFormatter().convertTextRotation( aPropSet, xTextProp, true ); + + // frame position + LayoutConverter aLayoutConv( *this, mrModel.mxLayout.getOrCreate() ); + aLayoutConv.convertFromModel( aPropSet ); } catch( Exception& ) { @@ -211,59 +214,56 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) PropertySet aPropSet( xLegend ); aPropSet.setProperty( PROP_Show, true ); - // legend position and expansion + // legend formatting + getFormatter().convertFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxTextProp, OBJECTTYPE_LEGEND ); + + // predefined legend position and expansion + cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_CUSTOM; + cssc2::LegendExpansion eLegendExpand = cssc2::LegendExpansion_HIGH; + switch( mrModel.mnPosition ) + { + case XML_l: + eLegendPos = cssc2::LegendPosition_LINE_START; + eLegendExpand = cssc2::LegendExpansion_HIGH; + break; + case XML_r: + eLegendPos = cssc2::LegendPosition_LINE_END; + eLegendExpand = cssc2::LegendExpansion_HIGH; + break; + case XML_t: + eLegendPos = cssc2::LegendPosition_PAGE_START; + eLegendExpand = cssc2::LegendExpansion_WIDE; + break; + case XML_b: + eLegendPos = cssc2::LegendPosition_PAGE_END; + eLegendExpand = cssc2::LegendExpansion_WIDE; + break; + case XML_tr: + eLegendPos = cssc2::LegendPosition_LINE_END; // top-right not supported + eLegendExpand = cssc2::LegendExpansion_HIGH; + break; + } + + // manual positioning LayoutModel& rLayout = mrModel.mxLayout.getOrCreate(); LayoutConverter aLayoutConv( *this, rLayout ); + aLayoutConv.convertFromModel( aPropSet ); Rectangle aLegendRect; - bool bManualLayout = aLayoutConv.calcAbsRectangle( aLegendRect ); - if( bManualLayout ) + if( aLayoutConv.calcAbsRectangle( aLegendRect ) ) { - // relative position - cssc2::RelativePosition aRelPos; - aRelPos.Primary = getLimitedValue< double, double >( rLayout.mfX, 0.0, 1.0 ); - aRelPos.Secondary = getLimitedValue< double, double >( rLayout.mfY, 0.0, 1.0 ); - aRelPos.Anchor = ::com::sun::star::drawing::Alignment_TOP_LEFT; - aPropSet.setProperty( PROP_AnchorPosition, cssc2::LegendPosition_CUSTOM ); - aPropSet.setProperty( PROP_RelativePosition, aRelPos ); - // #i71697# it is not possible to set the size directly, do some magic here - cssc2::LegendExpansion eLegendExpand = cssc2::LegendExpansion_BALANCED; double fRatio = static_cast< double >( aLegendRect.Width ) / aLegendRect.Height; if( fRatio > 1.5 ) eLegendExpand = cssc2::LegendExpansion_WIDE; else if( fRatio < 0.75 ) eLegendExpand = cssc2::LegendExpansion_HIGH; - aPropSet.setProperty( PROP_Expansion, eLegendExpand ); - } - else // automatic layout - { - cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_LINE_END; - cssc2::LegendExpansion eLegendExpand = cssc2::LegendExpansion_HIGH; - switch( mrModel.mnPosition ) - { - case XML_l: - eLegendPos = cssc2::LegendPosition_LINE_START; - eLegendExpand = cssc2::LegendExpansion_HIGH; - break; - case XML_r: - eLegendPos = cssc2::LegendPosition_LINE_END; - eLegendExpand = cssc2::LegendExpansion_HIGH; - break; - case XML_t: - eLegendPos = cssc2::LegendPosition_PAGE_START; - eLegendExpand = cssc2::LegendExpansion_WIDE; - break; - case XML_b: - eLegendPos = cssc2::LegendPosition_PAGE_END; - eLegendExpand = cssc2::LegendExpansion_WIDE; - break; - } - aPropSet.setProperty( PROP_AnchorPosition, eLegendPos ); - aPropSet.setProperty( PROP_Expansion, eLegendExpand ); + else + eLegendExpand = cssc2::LegendExpansion_BALANCED; } - // legend formatting - getFormatter().convertFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxTextProp, OBJECTTYPE_LEGEND ); + // set position and expansion properties + aPropSet.setProperty( PROP_AnchorPosition, eLegendPos ); + aPropSet.setProperty( PROP_Expansion, eLegendExpand ); } catch( Exception& ) { diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini index cc9a5d11427a..defc0b3e6ae3 100644 --- a/oox/source/dump/biffdumper.ini +++ b/oox/source/dump/biffdumper.ini @@ -254,7 +254,7 @@ end multilist=RECORD-NAMES-BIFF3 include=RECORD-NAMES-BIFF2 # worksheet records - exclude=0x0006,0x0008,0x0009,0x000B,0x0018,0x0020,0x0021,0x0023,0x0024,0x0025,0x0031,0x0036,0x0037,0x003E,0x0043,0x0044,0x0045 + exclude=0x0006,0x0008,0x0009,0x000B,0x0018,0x0020,0x0023,0x0024,0x0025,0x0031,0x0036,0x0037,0x003E,0x0043,0x0044,0x0045 0x0050=,,,,,,BUILTINFMTCOUNT, 0x0058=TOOLBAR,XCT,CRN,FILESHARING,WRITEACCESS,OBJ,UNCALCED,SAFERECALC 0x0060=TEMPLATE,INTL,,OBJECTPROTECT,,,, -- cgit v1.2.3 From 71b8656b0ca1c24834f27ddfd0f6e0ef46736eaf Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Thu, 3 Dec 2009 14:22:57 +0100 Subject: chartpositioning: #i86609# add trendline label converter class --- oox/inc/oox/drawingml/chart/seriesconverter.hxx | 12 ++++++++++++ oox/source/drawingml/chart/seriesconverter.cxx | 21 +++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/oox/inc/oox/drawingml/chart/seriesconverter.hxx b/oox/inc/oox/drawingml/chart/seriesconverter.hxx index 28944d45d671..55674aa828dd 100644 --- a/oox/inc/oox/drawingml/chart/seriesconverter.hxx +++ b/oox/inc/oox/drawingml/chart/seriesconverter.hxx @@ -104,6 +104,18 @@ private: // ============================================================================ +class TrendlineLabelConverter : public ConverterBase< TrendlineLabelModel > +{ +public: + explicit TrendlineLabelConverter( const ConverterRoot& rParent, TrendlineLabelModel& rModel ); + virtual ~TrendlineLabelConverter(); + + /** Converts the OOXML trendline label. */ + void convertFromModel( PropertySet& rPropSet ); +}; + +// ============================================================================ + class TrendlineConverter : public ConverterBase< TrendlineModel > { public: diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 1c9931ae6177..173264697f8f 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -348,6 +348,23 @@ Reference< XLabeledDataSequence > ErrorBarConverter::createLabeledDataSequence( // ============================================================================ +TrendlineLabelConverter::TrendlineLabelConverter( const ConverterRoot& rParent, TrendlineLabelModel& rModel ) : + ConverterBase< TrendlineLabelModel >( rParent, rModel ) +{ +} + +TrendlineLabelConverter::~TrendlineLabelConverter() +{ +} + +void TrendlineLabelConverter::convertFromModel( PropertySet& rPropSet ) +{ + // formatting + getFormatter().convertFormatting( rPropSet, mrModel.mxShapeProp, mrModel.mxTextProp, OBJECTTYPE_TRENDLINELABEL ); +} + +// ============================================================================ + TrendlineConverter::TrendlineConverter( const ConverterRoot& rParent, TrendlineModel& rModel ) : ConverterBase< TrendlineModel >( rParent, rModel ) { @@ -389,8 +406,8 @@ void TrendlineConverter::convertFromModel( const Reference< XDataSeries >& rxDat // #i83100# formatting of the equation text box if( mrModel.mbDispEquation || mrModel.mbDispRSquared ) { - TrendlineLabelModel& rLabel = mrModel.mxLabel.getOrCreate(); - getFormatter().convertFormatting( aLabelProp, rLabel.mxShapeProp, rLabel.mxTextProp, OBJECTTYPE_TRENDLINELABEL ); + TrendlineLabelConverter aLabelConv( *this, mrModel.mxLabel.getOrCreate() ); + aLabelConv.convertFromModel( aLabelProp ); } // unsupported: #i5085# manual trendline size -- cgit v1.2.3 From da986c92475a27a026ab1e12308559a0c5756a2b Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 4 Dec 2009 13:02:38 +0100 Subject: chartpositioning: #i86609# dump more BIFF8 chart records written by XL2K7 --- oox/inc/oox/dump/biffdumper.hxx | 5 ++ oox/inc/oox/xls/biffhelper.hxx | 7 +++ oox/source/dump/biffdumper.cxx | 120 +++++++++++++++++++++++++++++++++++++-- oox/source/dump/biffdumper.ini | 123 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 244 insertions(+), 11 deletions(-) diff --git a/oox/inc/oox/dump/biffdumper.hxx b/oox/inc/oox/dump/biffdumper.hxx index a7f021ed5244..cf3a60dd536e 100644 --- a/oox/inc/oox/dump/biffdumper.hxx +++ b/oox/inc/oox/dump/biffdumper.hxx @@ -450,6 +450,11 @@ private: void dumpObjRecFmla( const String& rName, sal_uInt16 nFmlaSize ); void dumpObjRecPictFmla( sal_uInt16 nFmlaSize ); + typedef ::std::pair< sal_uInt8, ::rtl::OUString > ChFrExtPropInfo; + + void dumpChFrExtProps(); + ChFrExtPropInfo dumpChFrExtPropHeader(); + private: NameListRef mxColors; NameListRef mxBorderStyles; diff --git a/oox/inc/oox/xls/biffhelper.hxx b/oox/inc/oox/xls/biffhelper.hxx index 60efb9e856a6..869e8f347dde 100644 --- a/oox/inc/oox/xls/biffhelper.hxx +++ b/oox/inc/oox/xls/biffhelper.hxx @@ -298,8 +298,15 @@ const sal_uInt16 BIFF_ID_CHFRAME = 0x1032; const sal_uInt16 BIFF_ID_CHFRAMEPOS = 0x104F; const sal_uInt16 BIFF_ID_CHFRBLOCKBEGIN = 0x0852; const sal_uInt16 BIFF_ID_CHFRBLOCKEND = 0x0853; +const sal_uInt16 BIFF_ID_CHFRCATEGORYPROPS = 0x0856; +const sal_uInt16 BIFF_ID_CHFREXTPROPS = 0x089E; +const sal_uInt16 BIFF_ID_CHFREXTPROPSCONT = 0x089F; const sal_uInt16 BIFF_ID_CHFRINFO = 0x0850; const sal_uInt16 BIFF_ID_CHFRLABELPROPS = 0x086B; +const sal_uInt16 BIFF_ID_CHFRLAYOUT = 0x089D; +const sal_uInt16 BIFF_ID_CHFRPLOTAREALAYOUT = 0x08A7; +const sal_uInt16 BIFF_ID_CHFRSHAPEPROPS = 0x08A4; +const sal_uInt16 BIFF_ID_CHFRTEXTPROPS = 0x08A5; const sal_uInt16 BIFF_ID_CHFRUNITPROPS = 0x0857; const sal_uInt16 BIFF_ID_CHFRWRAPPER = 0x0851; const sal_uInt16 BIFF_ID_CHLABELRANGE = 0x1020; diff --git a/oox/source/dump/biffdumper.cxx b/oox/source/dump/biffdumper.cxx index 2e42d2dc8ca8..14b3c7b1403a 100644 --- a/oox/source/dump/biffdumper.cxx +++ b/oox/source/dump/biffdumper.cxx @@ -1729,12 +1729,6 @@ void WorkbookStreamObject::implDumpRecordBody() dumpHex< sal_uInt16 >( "flags", "CHCHART3D-FLAGS" ); break; - case BIFF_ID_CHTYPEGROUP: - dumpUnused( 16 ); - dumpHex< sal_uInt16 >( "flags", "CHTYPEGROUP-FLAGS" ); - if( eBiff >= BIFF5 ) dumpDec< sal_uInt16 >( "group-idx" ); - break; - case BIFF_ID_CHDATAFORMAT: dumpDec< sal_Int16 >( "point-idx", "CHDATAFORMAT-POINTIDX" ); dumpDec< sal_Int16 >( "series-idx" ); @@ -1772,6 +1766,25 @@ void WorkbookStreamObject::implDumpRecordBody() dumpUnused( 6 ); break; + case BIFF_ID_CHFRCATEGORYPROPS: + dumpFrHeader( true, false ); + dumpDec< sal_uInt16 >( "label-offset", "CONV-PERCENT" ); + dumpDec< sal_uInt16 >( "alignment", "CHFRCATEGORYPROPS-ALIGN" ); + dumpHex< sal_uInt16 >( "flags", "CHFRCATEGORYPROPS-FLAGS" ); + break; + + case BIFF_ID_CHFREXTPROPS: + { + dumpFrHeader( true, true ); + dumpDec< sal_uInt32 >( "data-size" ); + dumpDec< sal_uInt8 >( "version" ); + dumpUnused( 1 ); + dumpDec< sal_uInt16 >( "parent", "CHFREXTPROPS-PARENT" ); + dumpChFrExtProps(); + dumpUnused( 4 ); + } + break; + case BIFF_ID_CHFRINFO: { dumpFrHeader( true, false ); @@ -1790,6 +1803,45 @@ void WorkbookStreamObject::implDumpRecordBody() dumpUniString( "separator", BIFF_STR_SMARTFLAGS ); break; + case BIFF_ID_CHFRLAYOUT: + dumpFrHeader( true, true ); + dumpHex< sal_uInt32 >( "checksum" ); + dumpHex< sal_uInt16 >( "flags", "CHFRLAYOUT-FLAGS" ); + dumpDec< sal_uInt16 >( "mode-x", "CHFRLAYOUT-MODE" ); + dumpDec< sal_uInt16 >( "mode-y", "CHFRLAYOUT-MODE" ); + dumpDec< sal_uInt16 >( "mode-w", "CHFRLAYOUT-MODE" ); + dumpDec< sal_uInt16 >( "mode-h", "CHFRLAYOUT-MODE" ); + dumpRect< double >( "position" ); + dumpUnused( 2 ); + break; + + case BIFF_ID_CHFRPLOTAREALAYOUT: + dumpFrHeader( true, true ); + dumpHex< sal_uInt32 >( "checksum" ); + dumpHex< sal_uInt16 >( "flags", "CHFRPLOTAREALAYOUT-FLAGS" ); + dumpRect< sal_Int16 >( "position" ); + dumpDec< sal_uInt16 >( "mode-x", "CHFRLAYOUT-MODE" ); + dumpDec< sal_uInt16 >( "mode-y", "CHFRLAYOUT-MODE" ); + dumpDec< sal_uInt16 >( "mode-w", "CHFRLAYOUT-MODE" ); + dumpDec< sal_uInt16 >( "mode-h", "CHFRLAYOUT-MODE" ); + dumpRect< double >( "position" ); + dumpUnused( 2 ); + break; + + case BIFF_ID_CHFRSHAPEPROPS: + dumpFrHeader( true, true ); + dumpDec< sal_uInt16 >( "context" ); + dumpUnused( 2 ); + dumpHex< sal_uInt32 >( "checksum" ); + dumpDec< sal_uInt32 >( "xml-size" ); + break; + + case BIFF_ID_CHFRTEXTPROPS: + dumpFrHeader( true, true ); + dumpHex< sal_uInt32 >( "checksum" ); + dumpDec< sal_uInt32 >( "xml-size" ); + break; + case BIFF_ID_CHFRUNITPROPS: dumpFrHeader( true, false ); dumpDec< sal_Int16 >( "preset", "CHFRUNITPROPS-PRESET" ); @@ -1961,6 +2013,12 @@ void WorkbookStreamObject::implDumpRecordBody() if( eBiff == BIFF8 ) dumpDec< sal_uInt16 >( "label-rotation", "TEXTROTATION" ); break; + case BIFF_ID_CHTYPEGROUP: + dumpUnused( 16 ); + dumpHex< sal_uInt16 >( "flags", "CHTYPEGROUP-FLAGS" ); + if( eBiff >= BIFF5 ) dumpDec< sal_uInt16 >( "group-idx" ); + break; + case BIFF_ID_CHVALUERANGE: dumpDec< double >( "minimum" ); dumpDec< double >( "maximum" ); @@ -3653,6 +3711,56 @@ void WorkbookStreamObject::dumpObjRecPictFmla( sal_uInt16 nFmlaSize ) } } +void WorkbookStreamObject::dumpChFrExtProps() +{ + BiffInputStream& rStrm = getBiffStream(); + bool bValid = true; + while( bValid && (rStrm.getRemaining() > 4) ) + { + ChFrExtPropInfo aInfo = dumpChFrExtPropHeader(); + IndentGuard aIndGuard( out() ); + switch( aInfo.first ) + { + case 0: // start + case 1: // end + break; + case 2: // bool + dumpBoolean( "value" ); + dumpUnused( 1 ); + break; + case 3: // double + dumpUnused( 4 ); + dumpDec< double >( "value", aInfo.second ); + break; + case 4: // int32 + dumpDec< sal_Int32 >( "value", aInfo.second ); + break; + case 5: // string + dumpUnicodeArray( "value", rStrm.readInt32() ); + break; + case 6: // uint16 + dumpDec< sal_uInt16 >( "value", aInfo.second ); + break; + case 7: // blob + dumpBinary( "value", rStrm.readuInt32() ); + break; + default: + bValid = false; + } + } +} + +WorkbookStreamObject::ChFrExtPropInfo WorkbookStreamObject::dumpChFrExtPropHeader() +{ + MultiItemsGuard aMultiGuard( out() ); + ChFrExtPropInfo aInfo; + aInfo.first = dumpDec< sal_uInt8 >( "datatype", "CHFREXTPROPS-TYPE" ); + dumpUnused( 1 ); + sal_uInt16 nTag = dumpDec< sal_uInt16 >( "tag", "CHFREXTPROPS-TAG" ); + aInfo.second = cfg().getName( "CHFREXTPROPS-TAG-NAMELIST", nTag ); + return aInfo; +} + // ============================================================================ PivotCacheStreamObject::PivotCacheStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, BiffType eBiff, const ::rtl::OUString& rSysFileName ) diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini index defc0b3e6ae3..98901625c0d2 100644 --- a/oox/source/dump/biffdumper.ini +++ b/oox/source/dump/biffdumper.ini @@ -318,7 +318,7 @@ multilist=RECORD-NAMES-BIFF5 # chart records exclude=0x1004,0x102D,0x102F,0x1036,0x1037,0x1038,0x103B 0x1040=CHRADARAREA,CHAXESSET,,CHLEGENDENTRY,CHPROPERTIES,CHSERGROUP,CHUSEDAXESSETS, - 0x1048=CHPIVOTREF,,CHSERPARENT,CHSERTRENDLINE,,,CHFORMAT,CHPOS + 0x1048=CHPIVOTREF,,CHSERPARENT,CHSERTRENDLINE,,,CHFORMAT,CHFRAMEPOS 0x1050=CHFORMATRUNS,CHSOURCELINK,,,,,, 0x1058=,,,CHSERERRORBAR,,CHSERIESFORMAT,, end @@ -343,12 +343,15 @@ multilist=RECORD-NAMES-BIFF8 0x01B0=CFHEADER,CFRULE,DATAVALIDATIONS,,,DCONBINAME,TXO,REFRESHALL 0x01B8=HYPERLINK,NLRDELNAME,CODENAME,PCDFSQLTYPE,PROT4REVPASS,,DATAVALIDATION, 0x01C0=XL9FILE,,,,,,, + # future records 0x0800=SCREENTIP,,,WEBQRYSETTINGS,WEBQRYTABLES,,, - 0x0850=CHFRINFO,CHFRWRAPPER,CHFRBLOCKBEGIN,CHFRBLOCKEND,,,,CHFRUNITPROPS + 0x0850=CHFRINFO,CHFRWRAPPER,CHFRBLOCKBEGIN,CHFRBLOCKEND,,,CHFRCATEGORYPROPS,CHFRUNITPROPS 0x0858=CHPIVOTREF,CHPIVOTFLAGS,,,,,, 0x0860=,,SHEETLAYOUT,,,,,SHEETPROTECTION 0x0868=,,,CHFRLABELPROPS,,,, 0x0890=,,STYLEEXT,,,,, + 0x0898=,,,,,CHFRLAYOUT,CHFREXTPROPS,CHFREXTPROPSCONT + 0x08A0=,,,,CHFRSHAPEPROPS,CHFRTEXTPROPS,,CHFRPLOTAREALAYOUT # chart records 0x1058=,,,,,,,CH3DDATAFORMAT 0x1060=CHFONTBASE,CHPIEEXT,CHLABELRANGE2,CHDATATABLE,CHPLOTGROWTH,CHSERINDEX,CHESCHERFORMAT,CHPIEEXTSETT @@ -696,9 +699,98 @@ shortlist=CHFRAMEPOS-SIZEMODE,1,manual,auto shortlist=CHFRBLOCK-TYPE,0,axes-set,,text,,axis,type-group,data-table,frame,,legend,legend-exception,,series,chart,data-format,drop-bar +# CHFRCATEGORYPROPS ---------------------------------------------------------- + +shortlist=CHFRCATEGORYPROPS-ALIGN,1,top-left,center,bottom-right + +flagslist=CHFRCATEGORYPROPS-FLAGS + ignore=0xFFFE + 0x0001=auto-label-frequency +end + +# CHFREXTPROPS --------------------------------------------------------------- + +constlist=CHFREXTPROPS-PARENT + 0x0001=log-scaling + 0x0002=style + 0x0004=category-scaling + 0x0005=chart-props + 0x000F=legend + 0x0013=marker + 0x0016=plot-area + 0x0019=chart-title + 0x0037=3d-props +end + +constlist=CHFREXTPROPS-TYPE + 0=start + 1=end + 2=bool + 3=double + 4=int32 + 5=string + 6=uint16 + 7=blob +end + +constlist=CHFREXTPROPS-TAG + 0x0000=log-base + 0x0003=style + 0x001E=chart-formatting + 0x0020=text-formatting + 0x0022=symbol-type + 0x002E=no-multi-level + 0x002F=overlay + 0x0033=theme-override + 0x0034=color-mapping-override + 0x0035=backwall-thickness + 0x0036=floor-thickness + 0x004D=perspective + 0x004E=rotation-x + 0x004F=rotation-y + 0x0050=right-angled-axes-off + 0x0052=tick-mark-skip + 0x0051=tick-label-skip + 0x0053=major-unit + 0x0054=minor-unit + 0x0055=max + 0x0056=min + 0x0059=side-wall + 0x005B=show-data-labels-over-max + 0x005C=tick-label-pos + 0x005E=pie-combination + 0x005F=basetime-unit + 0x0064=format-code + 0x0065=height-percent + 0x0066=display-blanks-as + 0x006A=major-unit-type + 0x006B=minor-unit-type + 0x0076=edit-language +end + +constlist=CHFREXTPROPS-TAG-NAMELIST + default= + 0x0022=CHFREXTPROPS-SYMBOLTYPE + 0x0035=CONV-PERCENT + 0x0036=CONV-PERCENT + 0x004E=CONV-DEG + 0x004F=CONV-DEG + 0x005C=CHFREXTPROPS-TICKLABELPOS + 0x005F=CHFREXTPROPS-TIMEUNIT + 0x0065=CONV-PERCENT + 0x0066=CHFREXTPROPS-DISPBLANKSAS + 0x006A=CHFREXTPROPS-TIMEUNIT + 0x006B=CHFREXTPROPS-TIMEUNIT +end + +shortlist=CHFREXTPROPS-DISPBLANKSAS,0x0067,gap,,spanned +shortlist=CHFREXTPROPS-SYMBOLTYPE,0x0023,none,diamond,square,triangle,x,star,dot,dash,circle,plus +shortlist=CHFREXTPROPS-TICKLABELPOS,0x005D,center +shortlist=CHFREXTPROPS-TIMEUNIT,0x0060,days,months,years + # CHFRINFO ------------------------------------------------------------------- -shortlist=CHFRINFO-APPVERSION,9,excel-2000,excel-xp-2003,excel-2007 +shortlist=CHFRINFO-APPVERSION,9,excel-2000,excel-xp-2003,,excel-2007 # CHFRLABELPROPS ------------------------------------------------------------- @@ -710,6 +802,26 @@ flagslist=CHFRLABELPROPS-FLAGS 0x0010=show-bubble end +# CHFRLAYOUT ----------------------------------------------------------------- + +combilist=CHFRLAYOUT-FLAGS + 0x001E=uint8,dec,legend-pos,CHFRLAYOUT-LEGENDPOS +end + +shortlist=CHFRLAYOUT-LEGENDPOS,0,bottom,top-right,top,right,left + +shortlist=CHFRLAYOUT-MODE,0,auto,factor,egde + +# CHFRPLOTAREALAYOUT --------------------------------------------------------- + +flagslist=CHFRPLOTAREALAYOUT-FLAGS + 0x0001=!outer!inner +end + +shortlist=CHFRLAYOUT-LEGENDPOS,0,bottom,top-right,top,right,left + +shortlist=CHFRLAYOUT-MODE,0,auto,factor,egde + # CHFRUNITPROPS -------------------------------------------------------------- shortlist=CHFRUNITPROPS-PRESET,-1,manual,none,hundred,thousand,10000,100000,million,10-million,100-million,billion,trillion @@ -741,7 +853,7 @@ end # CHLEGEND ------------------------------------------------------------------- -shortlist=CHLEGEND-DOCKPOS,0,bottom,top-left,top,right,left,,,manual +shortlist=CHLEGEND-DOCKPOS,0,bottom,top-right,top,right,left,,,manual shortlist=CHLEGEND-SPACING,0,close,medium,open flagslist=CHLEGEND-FLAGS @@ -836,10 +948,11 @@ end shortlist=CHPROPERTIES-EMPTYCELLS,0,do-not-plot,as-zero,interpolated flagslist=CHPROPERTIES-FLAGS - 0x0001=manual-format + 0x0001=manual-series 0x0002=plot-visible-only 0x0004=fixed-size 0x0008=manual-plotarea + 0x0010=apply-plotarea-pos end # CHSCATTER ------------------------------------------------------------------ -- cgit v1.2.3 From 28687b22eef200c32a37f6901cd40c0328b8766d Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 16 Dec 2009 11:55:37 +0000 Subject: #i107721# thesaurus dialog redesign --- svx/inc/helpid.hrc | 2 + svx/inc/svx/thesdlg.hxx | 15 +++-- svx/source/dialog/makefile.mk | 2 +- svx/source/dialog/thesdlg.cxx | 122 +++++++++++++++++++++++++++++++++++++-- svx/source/dialog/thesdlg.hrc | 6 +- svx/source/dialog/thesdlg.src | 131 ++++++++++++++++++++++++++---------------- 6 files changed, 214 insertions(+), 64 deletions(-) diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index 3cac79c92f80..48accc405276 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -450,6 +450,8 @@ #define HID_GRFFILTER_EMBOSS_LIGHT (HID_SVX_START + 408) +#define HID_CT_THES_ALTERNATIVES (HID_SVX_START + 409) + #define HID_GALLERY_NEWTHEME (HID_SVX_START + 410) #define HID_GALLERY_THEMELIST (HID_SVX_START + 411) diff --git a/svx/inc/svx/thesdlg.hxx b/svx/inc/svx/thesdlg.hxx index 4ca5376ad8a7..74a9f0c45b56 100644 --- a/svx/inc/svx/thesdlg.hxx +++ b/svx/inc/svx/thesdlg.hxx @@ -31,29 +31,26 @@ #define _SVX_THESDLG_HXX // include --------------------------------------------------------------- -#ifndef _EDIT_HXX //autogen #include -#endif -#ifndef _BUTTON_HXX //autogen #include -#endif -#ifndef _LSTBOX_HXX //autogen #include -#endif -#ifndef _FIXED_HXX //autogen #include -#endif #include #include #include #include + +#include + #include "svx/svxdllapi.h" + // forward --------------------------------------------------------------- struct ThesDlg_Impl; class SvxThesaurusLanguageDlg_Impl; +class ThesaurusAlternativesCtrl_Impl; namespace com { namespace sun { namespace star { namespace linguistic2 { @@ -91,6 +88,8 @@ private: ListBox aMeanLB; FixedText aSynonymText; ListBox aSynonymLB; + FixedText m_aAlternativesText; + boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT; FixedLine aVarFL; OKButton aOkBtn; diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk index c54081365a11..e24fad3ec7d9 100644 --- a/svx/source/dialog/makefile.mk +++ b/svx/source/dialog/makefile.mk @@ -82,6 +82,7 @@ SRC2FILES = \ LIB1TARGET=$(SLB)$/$(TARGET)-core.lib LIB1OBJFILES= \ + $(SLO)$/checklbx.obj \ $(SLO)$/dialmgr.obj\ $(SLO)$/dlgutil.obj \ $(SLO)$/framelink.obj\ @@ -100,7 +101,6 @@ LIB2TARGET=$(SLB)$/$(TARGET).lib LIB2OBJFILES= \ $(SLO)$/charmap.obj \ - $(SLO)$/checklbx.obj \ $(SLO)$/connctrl.obj \ $(SLO)$/contwnd.obj \ $(SLO)$/ctredlin.obj \ diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index 7a5497181b59..ad63b347327e 100644 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -30,15 +30,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" + #include #include +#include +#include #include -#ifndef _MSGBOX_HXX //autogen #include -#endif -#ifndef _APP_HXX //autogen #include -#endif + #include #include @@ -54,6 +54,7 @@ #include "thesdlg.hrc" #include #include +#include using namespace ::com::sun::star; @@ -67,6 +68,7 @@ using namespace ::com::sun::star::linguistic2; //#define S2U(s) StringToOUString(s, CHARSET_SYSTEM) //#define U2S(s) OUStringToString(s, CHARSET_SYSTEM) +#define A2S(x) String::CreateFromAscii( x ) // GetReplaceEditString ------------------------------- @@ -97,6 +99,116 @@ static void GetReplaceEditString( String &rText ) rText.EraseLeadingAndTrailingChars( sal_Unicode(' ') ); } +// class ThesaurusAlternativesCtrl_Impl ---------------------------------- + +class AlternativesUserData_Impl +{ + String sText; + bool bHeader; + +public: + AlternativesUserData_Impl( const String &rText, bool bIsHeader ) : + sText(rText), + bHeader(bIsHeader) + { + } + + bool IsHeader() const { return bHeader; } + const String& GetText() const { return sText; } +}; + + +class AlternativesString_Impl : public SvLBoxString +{ +public: + + AlternativesString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) + : SvLBoxString( pEntry, nFlags, rStr ) {} + + virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry); +}; + + +void AlternativesString_Impl::Paint( + const Point& rPos, + SvLBox& rDev, USHORT, + SvLBoxEntry* pEntry ) +{ + AlternativesUserData_Impl* pData = (AlternativesUserData_Impl*)pEntry->GetUserData(); + Point aPos( rPos ); + Font aOldFont( rDev.GetFont()); + if (pData && pData->IsHeader()) + { + Font aFont( aOldFont ); + aFont.SetWeight( WEIGHT_BOLD ); + rDev.SetFont( aFont ); + aPos.X() = 0; + } + else + aPos.X() += 5; + rDev.DrawText( aPos, GetText() ); + rDev.SetFont( aOldFont ); +} + + +class ThesaurusAlternativesCtrl_Impl : + public SvxCheckListBox +{ + std::vector< SvLBoxEntry * > m_aEntries; + + + SvLBoxEntry * AddEntry( const String &rText, bool bIsHeader ); + + // disable copy c-tor and assignment operator + ThesaurusAlternativesCtrl_Impl( const ThesaurusAlternativesCtrl_Impl & ); + ThesaurusAlternativesCtrl_Impl & operator = ( const ThesaurusAlternativesCtrl_Impl & ); + +public: + ThesaurusAlternativesCtrl_Impl( Window* pParent ); + virtual ~ThesaurusAlternativesCtrl_Impl(); +}; + + +ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl( + Window* pParent ) : + SvxCheckListBox( pParent, SVX_RES( CT_THES_ALTERNATIVES ) ) +{ + FreeResource(); + + SetWindowBits( WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE ); + SetHighlightRange(); +// SetSelectHdl( LINK( this, SvxEditModulesDlg, SelectHdl_Impl )); +// SetCheckButtonHdl( LINK( this, SvxEditModulesDlg, BoxCheckButtonHdl_Impl) ); + +// AddEntry( A2S("klein"), true ); +// AddEntry( A2S("1. alpha"), false ); +// AddEntry( A2S("2. beta"), false ); + +// AddEntry( A2S("gross"), true ); +// AddEntry( A2S("1. ALPHA"), false ); +// AddEntry( A2S("2. BETA"), false ); +// AddEntry( A2S("3. GAMMA"), false ); +} + + +ThesaurusAlternativesCtrl_Impl::~ThesaurusAlternativesCtrl_Impl() +{ +} + + +SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( const String &rText, bool bIsHeader ) +{ + SvLBoxEntry* pEntry = new SvLBoxEntry; + String sEmpty; + pEntry->AddItem( new SvLBoxString( pEntry, 0, sEmpty) ); // Leerspalte +// pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0)); // Sonst Puff! + pEntry->AddItem( new AlternativesString_Impl( pEntry, 0, rText ) ); + + m_aEntries.push_back( pEntry ); + return pEntry; +} + + // struct ThesDlg_Impl --------------------------------------------------- struct ThesDlg_Impl @@ -203,6 +315,8 @@ SvxThesaurusDialog::SvxThesaurusDialog( Window* pParent, Reference< XThesaurus > aSynonymText( this, SVX_RES( FT_SYNON ) ), aSynonymLB ( this, SVX_RES( LB_SYNON ) ), aVarFL ( this, SVX_RES( FL_VAR ) ), + m_aAlternativesText ( this, SVX_RES( FT_THES_ALTERNATIVES ) ), + m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( this ) ), aOkBtn ( this, SVX_RES( BTN_THES_OK ) ), aCancelBtn ( this, SVX_RES( BTN_THES_CANCEL ) ), aLookUpBtn ( this, SVX_RES( BTN_LOOKUP ) ), diff --git a/svx/source/dialog/thesdlg.hrc b/svx/source/dialog/thesdlg.hrc index 4292de929236..5c488123aed8 100644 --- a/svx/source/dialog/thesdlg.hrc +++ b/svx/source/dialog/thesdlg.hrc @@ -45,14 +45,16 @@ #define LB_SYNON 20 #define FT_REPL 21 #define ED_REPL 22 -#define FL_VAR 23 +#define FL_VAR 23 +#define FT_THES_ALTERNATIVES 24 +#define CT_THES_ALTERNATIVES 25 #define STR_ERR_WORDNOTFOUND 30 // LanguageDialog -------------------------------------------------------- #define LB_THES_LANGUAGE 10 -#define FL_THES_LANGUAGE 11 +#define FL_THES_LANGUAGE 11 #define BTN_LANG_OK 12 #define BTN_LANG_CANCEL 12 #define BTN_LANG_HELP 13 diff --git a/svx/source/dialog/thesdlg.src b/svx/source/dialog/thesdlg.src index 661a046175e2..40b5361bb170 100644 --- a/svx/source/dialog/thesdlg.src +++ b/svx/source/dialog/thesdlg.src @@ -39,99 +39,132 @@ ModalDialog RID_SVXDLG_THESAURUS { HelpId = SID_THESAURUS ; OutputSize = TRUE ; - Size = MAP_APPFONT ( 285 , 116 ) ; +// Size = MAP_APPFONT ( 285, 116 ) ; + Size = MAP_APPFONT ( 220, 230 ) ; Text [ en-US ] = "Thesaurus" ; Moveable = TRUE ; SvLook = TRUE ; - OkButton BTN_THES_OK - { - Pos = MAP_APPFONT ( 219 , 6 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton BTN_THES_CANCEL + + FixedText FT_WORD { - Pos = MAP_APPFONT ( 219 , 23 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; + Pos = MAP_APPFONT ( 5 , 5 ) ; + Size = MAP_APPFONT ( 143 , 8 ) ; + Text [ en-US ] = "Current ~word" ; + LEFT = TRUE ; }; - PushButton BTN_LOOKUP + ListBox LB_WORD { - Pos = MAP_APPFONT ( 219 , 40 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "~Search" ; + DropDown = TRUE ; + Pos = MAP_APPFONT ( 5 , 16 ) ; + Size = MAP_APPFONT ( 143 , 12 ) ; }; PushButton BTN_LANGUAGE { - Pos = MAP_APPFONT ( 219 , 57 ) ; + Pos = MAP_APPFONT ( 154 , 16 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Language..." ; }; - HelpButton BTN_THES_HELP - { - Pos = MAP_APPFONT ( 219 , 77 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - }; - FixedText FT_WORD - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 96 , 8 ) ; - Text [ en-US ] = "~Word" ; - LEFT = TRUE ; - }; - ListBox LB_WORD - { - DropDown = TRUE ; - Pos = MAP_APPFONT ( 12 , 25 ) ; - Size = MAP_APPFONT ( 96 , 65 ) ; - }; + FixedText FT_MEAN { - Pos = MAP_APPFONT ( 12 , 43 ) ; - Size = MAP_APPFONT ( 96 , 8 ) ; + Pos = MAP_APPFONT ( 5 , 33 ) ; + Size = MAP_APPFONT ( 100 , 8 ) ; Text [ en-US ] = "~Meaning " ; LEFT = TRUE ; }; ListBox LB_MEAN { BORDER = TRUE ; - Pos = MAP_APPFONT ( 12 , 55 ) ; - Size = MAP_APPFONT ( 96 , 50 ) ; + Pos = MAP_APPFONT ( 5 , 45 ) ; + Size = MAP_APPFONT ( 100 , 50 ) ; AutoHScroll = TRUE ; }; FixedText FT_SYNON { - Pos = MAP_APPFONT ( 111 , 43 ) ; - Size = MAP_APPFONT ( 96 , 8 ) ; + Pos = MAP_APPFONT ( 115 , 33 ) ; + Size = MAP_APPFONT ( 100 , 8 ) ; Text [ en-US ] = "Sy~nonym" ; LEFT = TRUE ; }; ListBox LB_SYNON { BORDER = TRUE ; - Pos = MAP_APPFONT ( 111 , 55 ) ; - Size = MAP_APPFONT ( 96 , 50 ) ; + Pos = MAP_APPFONT ( 115 , 45 ) ; + Size = MAP_APPFONT ( 100 , 50 ) ; AutoHScroll = TRUE ; }; + + FixedText FT_THES_ALTERNATIVES + { + Pos = MAP_APPFONT ( 5 , 101 ) ; + Size = MAP_APPFONT ( 220 , 8 ) ; + Text [ en-US ] = "~Alternatives" ; + LEFT = TRUE ; + }; + Control CT_THES_ALTERNATIVES + { + HelpID = HID_CT_THES_ALTERNATIVES ; + Pos = MAP_APPFONT ( 5 , 112 ) ; + Size = MAP_APPFONT ( 209 , 50 ) ; + Border = TRUE; + TabStop = TRUE ; +// DialogControl = TRUE; +// ??? OutputSize = TRUE ; +/* + ScrollBar VB_ALTERNATIVES_VSCROLL + { + Pos = MAP_APPFONT ( 228 , 10 ) ; + Size = MAP_APPFONT ( 8 , 124 ) ; + VScroll = TRUE; + }; +*/ + }; + FixedText FT_REPL { - Pos = MAP_APPFONT ( 111 , 14 ) ; - Size = MAP_APPFONT ( 96 , 8 ) ; - Text [ en-US ] = "~Replace" ; + Pos = MAP_APPFONT ( 5 , 173 ) ; + Size = MAP_APPFONT ( 143 , 8 ) ; + Text [ en-US ] = "~Replace with" ; LEFT = TRUE ; }; Edit ED_REPL { BORDER = TRUE ; - Pos = MAP_APPFONT ( 111 , 25 ) ; - Size = MAP_APPFONT ( 96 , 12 ) ; + Pos = MAP_APPFONT ( 5 , 184 ) ; + Size = MAP_APPFONT ( 143 , 12 ) ; LEFT = TRUE ; }; + PushButton BTN_LOOKUP + { + Pos = MAP_APPFONT ( 154 , 184 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + Text [ en-US ] = "Look ~Up" ; + }; FixedLine FL_VAR { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 207 , 8 ) ; - Text [ en-US ] = "Variations" ; + Pos = MAP_APPFONT ( 0 , 200 ) ; + Size = MAP_APPFONT ( 220 , 8 ) ; +// Text [ en-US ] = "Variations" ; }; + + + HelpButton BTN_THES_HELP + { + Pos = MAP_APPFONT ( 5 , 210 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + }; + OkButton BTN_THES_OK + { + Pos = MAP_APPFONT ( 88 , 210 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + DefButton = TRUE ; + }; + CancelButton BTN_THES_CANCEL + { + Pos = MAP_APPFONT ( 154 , 210 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + }; + String STR_ERR_WORDNOTFOUND { Text [ en-US ] = "Word not found in thesaurus" ; -- cgit v1.2.3 From 45d709a4307f622996ac98df784aacf7b7b4c691 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 18 Dec 2009 20:18:54 +0100 Subject: chartpositioning: #i86609# BIFF and OOXML import: object positioning in charts (chart title, plot area) --- sc/source/filter/excel/xechart.cxx | 88 +++++++++----------- sc/source/filter/excel/xeescher.cxx | 4 +- sc/source/filter/excel/xichart.cxx | 156 ++++++++++++++++++++++++++---------- sc/source/filter/excel/xiescher.cxx | 2 +- sc/source/filter/excel/xlchart.cxx | 33 ++++---- sc/source/filter/excel/xlroot.cxx | 41 ++++++++++ sc/source/filter/inc/xechart.hxx | 10 +-- sc/source/filter/inc/xichart.hxx | 26 ++++-- sc/source/filter/inc/xlchart.hxx | 72 ++++++++--------- sc/source/filter/inc/xlroot.hxx | 7 ++ 10 files changed, 283 insertions(+), 156 deletions(-) diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index d1fed27bbec1..f3a4d58326fb 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -161,13 +161,15 @@ bool lclIsAutoAnyOrGetScaledValue( double& rfValue, const Any& rAny, bool bLogSc // Common ===================================================================== /** Stores global data needed in various classes of the Chart export filter. */ -class XclExpChRootData : public XclChRootData +struct XclExpChRootData : public XclChRootData { -public: - explicit XclExpChRootData( XclExpChChart* pChartData ); + typedef ::std::vector< XclChFrBlock > XclChFrBlockVector; + + XclExpChChart& mrChartData; /// The chart data object. + XclChFrBlockVector maWrittenFrBlocks; /// Stack of future record levels already written out. + XclChFrBlockVector maUnwrittenFrBlocks; /// Stack of future record levels not yet written out. - /** Returns a reference to the parent chart data object. */ - inline XclExpChChart& GetChartData() const { return *mpChartData; } + inline explicit XclExpChRootData( XclExpChChart& rChartData ) : mrChartData( rChartData ) {} /** Registers a new future record level. */ void RegisterFutureRecBlock( const XclChFrBlock& rFrBlock ); @@ -175,22 +177,10 @@ public: void InitializeFutureRecBlock( XclExpStream& rStrm ); /** Finalizes the current future record level (writes CHFRBLOCKEND record if needed). */ void FinalizeFutureRecBlock( XclExpStream& rStrm ); - -private: - typedef ::std::vector< XclChFrBlock > XclChFrBlockVector; - - XclExpChChart* mpChartData; /// Pointer to the chart data object. - XclChFrBlockVector maWrittenFrBlocks; /// Stack of future record levels already written out. - XclChFrBlockVector maUnwrittenFrBlocks; /// Stack of future record levels not yet written out. }; // ---------------------------------------------------------------------------- -XclExpChRootData::XclExpChRootData( XclExpChChart* pChartData ) : - mpChartData( pChartData ) -{ -} - void XclExpChRootData::RegisterFutureRecBlock( const XclChFrBlock& rFrBlock ) { maUnwrittenFrBlocks.push_back( rFrBlock ); @@ -239,9 +229,9 @@ void XclExpChRootData::FinalizeFutureRecBlock( XclExpStream& rStrm ) // ---------------------------------------------------------------------------- -XclExpChRoot::XclExpChRoot( const XclExpRoot& rRoot, XclExpChChart* pChartData ) : +XclExpChRoot::XclExpChRoot( const XclExpRoot& rRoot, XclExpChChart& rChartData ) : XclExpRoot( rRoot ), - mxChData( new XclExpChRootData( pChartData ) ) + mxChData( new XclExpChRootData( rChartData ) ) { } @@ -251,27 +241,27 @@ XclExpChRoot::~XclExpChRoot() XclExpChChart& XclExpChRoot::GetChartData() const { - return mxChData->GetChartData(); + return mxChData->mrChartData; } const XclChTypeInfo& XclExpChRoot::GetChartTypeInfo( XclChTypeId eType ) const { - return mxChData->GetTypeInfoProvider().GetTypeInfo( eType ); + return mxChData->mxTypeInfoProv->GetTypeInfo( eType ); } const XclChTypeInfo& XclExpChRoot::GetChartTypeInfo( const OUString& rServiceName ) const { - return mxChData->GetTypeInfoProvider().GetTypeInfoFromService( rServiceName ); + return mxChData->mxTypeInfoProv->GetTypeInfoFromService( rServiceName ); } const XclChFormatInfo& XclExpChRoot::GetFormatInfo( XclChObjectType eObjType ) const { - return mxChData->GetFormatInfoProvider().GetFormatInfo( eObjType ); + return mxChData->mxFmtInfoProv->GetFormatInfo( eObjType ); } -void XclExpChRoot::InitConversion( XChartDocRef xChartDoc ) const +void XclExpChRoot::InitConversion( XChartDocRef xChartDoc, const Rectangle& rChartRect ) const { - mxChData->InitConversion( xChartDoc ); + mxChData->InitConversion( GetRoot(), xChartDoc, rChartRect ); } void XclExpChRoot::FinishConversion() const @@ -296,7 +286,7 @@ void XclExpChRoot::ConvertLineFormat( XclChLineFormat& rLineFmt, const ScfPropertySet& rPropSet, XclChPropertyMode ePropMode ) const { GetChartPropSetHelper().ReadLineProperties( - rLineFmt, mxChData->GetLineDashTable(), rPropSet, ePropMode ); + rLineFmt, *mxChData->mxLineDashTable, rPropSet, ePropMode ); } bool XclExpChRoot::ConvertAreaFormat( XclChAreaFormat& rAreaFmt, @@ -310,7 +300,7 @@ void XclExpChRoot::ConvertEscherFormat( const ScfPropertySet& rPropSet, XclChPropertyMode ePropMode ) const { GetChartPropSetHelper().ReadEscherProperties( rEscherFmt, rPicFmt, - mxChData->GetGradientTable(), mxChData->GetHatchTable(), mxChData->GetBitmapTable(), rPropSet, ePropMode ); + *mxChData->mxGradientTable, *mxChData->mxHatchTable, *mxChData->mxBitmapTable, rPropSet, ePropMode ); } sal_uInt16 XclExpChRoot::ConvertFont( const ScfPropertySet& rPropSet, sal_Int16 nScript ) const @@ -1185,31 +1175,33 @@ bool XclExpChText::ConvertDataLabel( const ScfPropertySet& rPropSet, ConvertRotationBase( GetChRoot(), rPropSet, false ); // label placement sal_Int32 nPlacement = 0; + sal_uInt16 nLabelPos = EXC_CHTEXT_POS_AUTO; if( rPropSet.GetProperty( nPlacement, EXC_CHPROP_LABELPLACEMENT ) ) { using namespace ::com::sun::star::chart::DataLabelPlacement; if( nPlacement == rTypeInfo.mnDefaultLabelPos ) { - maData.mnPlacement = EXC_CHTEXT_POS_DEFAULT; + nLabelPos = EXC_CHTEXT_POS_DEFAULT; } else switch( nPlacement ) { - case AVOID_OVERLAP: maData.mnPlacement = EXC_CHTEXT_POS_AUTO; break; - case CENTER: maData.mnPlacement = EXC_CHTEXT_POS_CENTER; break; - case TOP: maData.mnPlacement = EXC_CHTEXT_POS_ABOVE; break; - case TOP_LEFT: maData.mnPlacement = EXC_CHTEXT_POS_LEFT; break; - case LEFT: maData.mnPlacement = EXC_CHTEXT_POS_LEFT; break; - case BOTTOM_LEFT: maData.mnPlacement = EXC_CHTEXT_POS_LEFT; break; - case BOTTOM: maData.mnPlacement = EXC_CHTEXT_POS_BELOW; break; - case BOTTOM_RIGHT: maData.mnPlacement = EXC_CHTEXT_POS_RIGHT; break; - case RIGHT: maData.mnPlacement = EXC_CHTEXT_POS_RIGHT; break; - case TOP_RIGHT: maData.mnPlacement = EXC_CHTEXT_POS_RIGHT; break; - case INSIDE: maData.mnPlacement = EXC_CHTEXT_POS_INSIDE; break; - case OUTSIDE: maData.mnPlacement = EXC_CHTEXT_POS_OUTSIDE; break; - case NEAR_ORIGIN: maData.mnPlacement = EXC_CHTEXT_POS_AXIS; break; + case AVOID_OVERLAP: nLabelPos = EXC_CHTEXT_POS_AUTO; break; + case CENTER: nLabelPos = EXC_CHTEXT_POS_CENTER; break; + case TOP: nLabelPos = EXC_CHTEXT_POS_ABOVE; break; + case TOP_LEFT: nLabelPos = EXC_CHTEXT_POS_LEFT; break; + case LEFT: nLabelPos = EXC_CHTEXT_POS_LEFT; break; + case BOTTOM_LEFT: nLabelPos = EXC_CHTEXT_POS_LEFT; break; + case BOTTOM: nLabelPos = EXC_CHTEXT_POS_BELOW; break; + case BOTTOM_RIGHT: nLabelPos = EXC_CHTEXT_POS_RIGHT; break; + case RIGHT: nLabelPos = EXC_CHTEXT_POS_RIGHT; break; + case TOP_RIGHT: nLabelPos = EXC_CHTEXT_POS_RIGHT; break; + case INSIDE: nLabelPos = EXC_CHTEXT_POS_INSIDE; break; + case OUTSIDE: nLabelPos = EXC_CHTEXT_POS_OUTSIDE; break; + case NEAR_ORIGIN: nLabelPos = EXC_CHTEXT_POS_AXIS; break; default: DBG_ERRORFILE( "XclExpChText::ConvertDataLabel - unknown label placement type" ); } } + ::insert_value( maData.mnFlags2, nLabelPos, 0, 4 ); // source link (contains number format) mxSrcLink.reset( new XclExpChSourceLink( GetChRoot(), EXC_CHSRCLINK_TITLE ) ); if( bShowValue || bShowPercent ) @@ -1280,7 +1272,7 @@ void XclExpChText::WriteBody( XclExpStream& rStrm ) if( GetBiff() == EXC_BIFF8 ) { rStrm << GetPalette().GetColorIndex( mnTextColorId ) - << maData.mnPlacement + << maData.mnFlags2 << maData.mnRotation; } } @@ -2958,10 +2950,10 @@ void XclExpChAxesSet::WriteBody( XclExpStream& rStrm ) // The chart object =========================================================== XclExpChChart::XclExpChChart( const XclExpRoot& rRoot, - Reference< XChartDocument > xChartDoc, const Size& rSize ) : - XclExpChGroupBase( XclExpChRoot( rRoot, this ), EXC_CHFRBLOCK_TYPE_CHART, EXC_ID_CHCHART, 16 ) + Reference< XChartDocument > xChartDoc, const Rectangle& rChartRect ) : + XclExpChGroupBase( XclExpChRoot( rRoot, *this ), EXC_CHFRBLOCK_TYPE_CHART, EXC_ID_CHCHART, 16 ) { - Size aPtSize = OutputDevice::LogicToLogic( rSize, MapMode( MAP_100TH_MM ), MapMode( MAP_POINT ) ); + Size aPtSize = OutputDevice::LogicToLogic( rChartRect.GetSize(), MapMode( MAP_100TH_MM ), MapMode( MAP_POINT ) ); // rectangle is stored in 16.16 fixed-point format maRect.mnX = maRect.mnY = 0; maRect.mnWidth = static_cast< sal_Int32 >( aPtSize.Width() << 16 ); @@ -2986,7 +2978,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot, ::set_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISIBLEONLY, !bIncludeHidden ); // initialize API conversion (remembers xChartDoc internally) - InitConversion( xChartDoc ); + InitConversion( xChartDoc, rChartRect ); // chart frame ScfPropertySet aFrameProp( xChartDoc->getPageBackground() ); @@ -3076,7 +3068,7 @@ void XclExpChChart::WriteBody( XclExpStream& rStrm ) // ---------------------------------------------------------------------------- -XclExpChart::XclExpChart( const XclExpRoot& rRoot, Reference< XModel > xModel, const Size& rSize ) : +XclExpChart::XclExpChart( const XclExpRoot& rRoot, Reference< XModel > xModel, const Rectangle& rChartRect ) : XclExpSubStream( EXC_BOF_CHART ), XclExpRoot( rRoot ) { @@ -3085,7 +3077,7 @@ XclExpChart::XclExpChart( const XclExpRoot& rRoot, Reference< XModel > xModel, c AppendNewRecord( new XclExpUInt16Record( EXC_ID_CHUNITS, EXC_CHUNITS_TWIPS ) ); Reference< XChartDocument > xChartDoc( xModel, UNO_QUERY ); - AppendNewRecord( new XclExpChChart( rRoot, xChartDoc, rSize ) ); + AppendNewRecord( new XclExpChChart( rRoot, xChartDoc, rChartRect ) ); } // ============================================================================ diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index af1a90291b99..15c9e652c641 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -806,8 +806,8 @@ XclExpChartObj::XclExpChartObj( const XclExpRoot& rRoot, Reference< XShape > xSh aShapeProp.GetProperty( xModel, CREATE_OUSTRING( "Model" ) ); ::com::sun::star::awt::Rectangle aBoundRect; aShapeProp.GetProperty( aBoundRect, CREATE_OUSTRING( "BoundRect" ) ); - Size aSize( aBoundRect.Width, aBoundRect.Height ); - mxChart.reset( new XclExpChart( rRoot, xModel, aSize ) ); + Rectangle aChartRect( aBoundRect.X, aBoundRect.Y, aBoundRect.Width, aBoundRect.Height ); + mxChart.reset( new XclExpChart( rRoot, xModel, aChartRect ) ); } XclExpChartObj::~XclExpChartObj() diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index dc542a1c1eeb..346ed2671f06 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -93,6 +95,7 @@ using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::frame::XModel; using ::com::sun::star::util::XNumberFormatsSupplier; +using ::com::sun::star::drawing::XShape; using ::com::sun::star::chart2::XChartDocument; using ::com::sun::star::chart2::XDiagram; @@ -109,6 +112,7 @@ using ::com::sun::star::chart2::XScaling; using ::com::sun::star::chart2::ScaleData; using ::com::sun::star::chart2::IncrementData; using ::com::sun::star::chart2::SubIncrement; +using ::com::sun::star::chart2::RelativePosition; using ::com::sun::star::chart2::XLegend; using ::com::sun::star::chart2::XTitled; using ::com::sun::star::chart2::XTitle; @@ -153,28 +157,18 @@ void lclSetExpValueOrClearAny( Any& rAny, double fValue, bool bLogScale, bool bC // Common ===================================================================== /** Stores global data needed in various classes of the Chart import filter. */ -class XclImpChRootData : public XclChRootData +struct XclImpChRootData : public XclChRootData { -public: - explicit XclImpChRootData( XclImpChChart* pChartData ); + XclImpChChart& mrChartData; /// The chart data object. - /** Returns a reference to the parent chart data object. */ - inline XclImpChChart& GetChartData() const { return *mpChartData; } - -private: - XclImpChChart* mpChartData; /// Pointer to the chart data object. + inline explicit XclImpChRootData( XclImpChChart& rChartData ) : mrChartData( rChartData ) {} }; -XclImpChRootData::XclImpChRootData( XclImpChChart* pChartData ) : - mpChartData( pChartData ) -{ -} - // ---------------------------------------------------------------------------- -XclImpChRoot::XclImpChRoot( const XclImpRoot& rRoot, XclImpChChart* pChartData ) : +XclImpChRoot::XclImpChRoot( const XclImpRoot& rRoot, XclImpChChart& rChartData ) : XclImpRoot( rRoot ), - mxChData( new XclImpChRootData( pChartData ) ) + mxChData( new XclImpChRootData( rChartData ) ) { } @@ -184,22 +178,22 @@ XclImpChRoot::~XclImpChRoot() XclImpChChart& XclImpChRoot::GetChartData() const { - return mxChData->GetChartData(); + return mxChData->mrChartData; } const XclChTypeInfo& XclImpChRoot::GetChartTypeInfo( XclChTypeId eType ) const { - return mxChData->GetTypeInfoProvider().GetTypeInfo( eType ); + return mxChData->mxTypeInfoProv->GetTypeInfo( eType ); } const XclChTypeInfo& XclImpChRoot::GetChartTypeInfo( sal_uInt16 nRecId ) const { - return mxChData->GetTypeInfoProvider().GetTypeInfoFromRecId( nRecId ); + return mxChData->mxTypeInfoProv->GetTypeInfoFromRecId( nRecId ); } const XclChFormatInfo& XclImpChRoot::GetFormatInfo( XclChObjectType eObjType ) const { - return mxChData->GetFormatInfoProvider().GetFormatInfo( eObjType ); + return mxChData->mxFmtInfoProv->GetFormatInfo( eObjType ); } Color XclImpChRoot::GetFontAutoColor() const @@ -220,10 +214,10 @@ Color XclImpChRoot::GetSeriesFillAutoColor( sal_uInt16 nFormatIdx ) const return ScfTools::GetMixedColor( aColor, rPal.GetColor( EXC_COLOR_CHWINDOWBACK ), nTrans ); } -void XclImpChRoot::InitConversion( Reference< XChartDocument > xChartDoc ) const +void XclImpChRoot::InitConversion( Reference< XChartDocument > xChartDoc, const Rectangle& rChartRect ) const { // create formatting object tables - mxChData->InitConversion( xChartDoc ); + mxChData->InitConversion( GetRoot(), xChartDoc, rChartRect ); // lock the model to suppress any internal updates Reference< XModel > xModel( xChartDoc, UNO_QUERY ); @@ -250,7 +244,7 @@ void XclImpChRoot::FinishConversion( ScfProgressBar& rProgress ) const { rProgress.Progress( EXC_CHART_PROGRESS_SIZE ); // unlock the model - Reference< XModel > xModel( mxChData->GetChartDoc(), UNO_QUERY ); + Reference< XModel > xModel( mxChData->mxChartDoc, UNO_QUERY ); if( xModel.is() ) xModel->unlockControllers(); rProgress.Progress( EXC_CHART_PROGRESS_SIZE ); @@ -260,14 +254,34 @@ void XclImpChRoot::FinishConversion( ScfProgressBar& rProgress ) const Reference< XDataProvider > XclImpChRoot::GetDataProvider() const { - return mxChData->GetChartDoc()->getDataProvider(); + return mxChData->mxChartDoc->getDataProvider(); +} + +sal_Int32 XclImpChRoot::CalcHmmFromChartX( sal_uInt16 nPosX ) const +{ + return static_cast< sal_Int32 >( mxChData->mfUnitSizeX * nPosX + mxChData->mnBorderGapX + 0.5 ); +} + +sal_Int32 XclImpChRoot::CalcHmmFromChartY( sal_uInt16 nPosY ) const +{ + return static_cast< sal_Int32 >( mxChData->mfUnitSizeY * nPosY + mxChData->mnBorderGapY + 0.5 ); +} + +double XclImpChRoot::CalcRelativeFromChartX( sal_uInt16 nPosX ) const +{ + return static_cast< double >( CalcHmmFromChartX( nPosX ) ) / mxChData->maChartRect.GetWidth(); +} + +double XclImpChRoot::CalcRelativeFromChartY( sal_uInt16 nPosY ) const +{ + return static_cast< double >( CalcHmmFromChartY( nPosY ) ) / mxChData->maChartRect.GetHeight(); } void XclImpChRoot::ConvertLineFormat( ScfPropertySet& rPropSet, const XclChLineFormat& rLineFmt, XclChPropertyMode ePropMode ) const { GetChartPropSetHelper().WriteLineProperties( - rPropSet, mxChData->GetLineDashTable(), rLineFmt, ePropMode ); + rPropSet, *mxChData->mxLineDashTable, rLineFmt, ePropMode ); } void XclImpChRoot::ConvertAreaFormat( ScfPropertySet& rPropSet, @@ -281,7 +295,7 @@ void XclImpChRoot::ConvertEscherFormat( ScfPropertySet& rPropSet, XclChPropertyMode ePropMode ) const { GetChartPropSetHelper().WriteEscherProperties( rPropSet, - mxChData->GetGradientTable(), mxChData->GetHatchTable(), mxChData->GetBitmapTable(), + *mxChData->mxGradientTable, *mxChData->mxHatchTable, *mxChData->mxBitmapTable, rEscherFmt, rPicFmt, ePropMode ); } @@ -352,7 +366,7 @@ void XclImpChGroupBase::SkipBlock( XclImpStream& rStrm ) void XclImpChFramePos::ReadChFramePos( XclImpStream& rStrm ) { - rStrm >> maData.mnObjType >> maData.mnSizeMode >> maData.maRect; + rStrm >> maData.mnTLMode >> maData.mnBRMode >> maData.maRect; } // ---------------------------------------------------------------------------- @@ -841,9 +855,7 @@ void XclImpChText::ReadHeaderRecord( XclImpStream& rStrm ) // #116397# BIFF8: index into palette used instead of RGB data maData.maTextColor = GetPalette().GetColor( rStrm.ReaduInt16() ); // placement and rotation - rStrm >> maData.mnPlacement >> maData.mnRotation; - // lower 4 bits used for placement, other bits contain garbage - maData.mnPlacement &= 0x000F; + rStrm >> maData.mnFlags2 >> maData.mnRotation; } else { @@ -857,6 +869,10 @@ void XclImpChText::ReadSubRecord( XclImpStream& rStrm ) { switch( rStrm.GetRecId() ) { + case EXC_ID_CHFRAMEPOS: + mxFramePos.reset( new XclImpChFramePos ); + mxFramePos->ReadChFramePos( rStrm ); + break; case EXC_ID_CHFONT: mxFont.reset( new XclImpChFont ); mxFont->ReadChFont( rStrm ); @@ -997,7 +1013,7 @@ void XclImpChText::ConvertDataLabel( ScfPropertySet& rPropSet, const XclChTypeIn // label placement using namespace ::com::sun::star::chart::DataLabelPlacement; sal_Int32 nPlacement = rTypeInfo.mnDefaultLabelPos; - switch( maData.mnPlacement ) + switch( ::extract_value< sal_uInt16 >( maData.mnFlags2, 0, 4 ) ) { case EXC_CHTEXT_POS_DEFAULT: nPlacement = rTypeInfo.mnDefaultLabelPos; break; case EXC_CHTEXT_POS_OUTSIDE: nPlacement = OUTSIDE; break; @@ -1043,6 +1059,43 @@ Reference< XTitle > XclImpChText::CreateTitle() const return xTitle; } +void XclImpChText::ConvertMainTitlePos( const Reference< XShape >& rxTitle ) const +{ + if( mxFramePos.is() && rxTitle.is() ) + { + const XclChFramePos& rPosData = mxFramePos->GetFramePosData(); + OSL_ENSURE( (rPosData.mnTLMode == EXC_CHFRAMEPOS_PARENT) && (rPosData.mnBRMode == EXC_CHFRAMEPOS_PARENT), + "XclImpChText::ConvertMainTitlePos - unexpected frame position mode" ); + // title moved manually? + if( (rPosData.mnTLMode == EXC_CHFRAMEPOS_PARENT) && ((rPosData.maRect.mnX != 0) || (rPosData.maRect.mnY != 0)) ) + { + // the call to XShape.getSize() may recalc the chart view + ::com::sun::star::awt::Size aTitleSize = rxTitle->getSize(); + // rotated titles need special handling... + sal_Int32 nScRot = XclTools::GetScRotation( GetRotation(), 0 ); + double fRad = nScRot * F_PI18000; + double fSin = fabs( sin( fRad ) ); + double fCos = fabs( cos( fRad ) ); + ::com::sun::star::awt::Size aBoundSize( + static_cast< sal_Int32 >( fCos * aTitleSize.Width + fSin * aTitleSize.Height + 0.5 ), + static_cast< sal_Int32 >( fSin * aTitleSize.Width + fCos * aTitleSize.Height + 0.5 ) ); + // title position is given relative to the default position + // default X = left edge of centered title, default Y = 85 chart units + ::com::sun::star::awt::Point aTitlePos( + CalcHmmFromChartX( rPosData.maRect.mnX + EXC_CHART_TOTALUNITS / 2 ) - aBoundSize.Width / 2, + CalcHmmFromChartY( rPosData.maRect.mnY + 85 ) ); + // add part of height to X direction, if title is rotated down + if( nScRot > 18000 ) + aTitlePos.X += static_cast< sal_Int32 >( fSin * aTitleSize.Height + 0.5 ); + // add part of width to Y direction, if title is rotated up + else if( nScRot > 0 ) + aTitlePos.Y += static_cast< sal_Int32 >( fSin * aTitleSize.Width + 0.5 ); + // set the resulting position at the title shape + rxTitle->setPosition( aTitlePos ); + } + } +} + void XclImpChText::ReadChFrLabelProps( XclImpStream& rStrm ) { if( GetBiff() == EXC_BIFF8 ) @@ -3383,7 +3436,7 @@ void XclImpChAxesSet::ConvertBackground( Reference< XDiagram > xDiagram ) const // The chart object =========================================================== XclImpChChart::XclImpChChart( const XclImpRoot& rRoot ) : - XclImpChRoot( rRoot, this ) + XclImpChRoot( rRoot, *this ) { mxPrimAxesSet.reset( new XclImpChAxesSet( GetChRoot(), EXC_CHAXESSET_PRIMARY ) ); mxSecnAxesSet.reset( new XclImpChAxesSet( GetChRoot(), EXC_CHAXESSET_SECONDARY ) ); @@ -3483,17 +3536,19 @@ XclImpChTextRef XclImpChChart::GetDefaultText( XclChTextType eTextType ) const return maDefTexts.get( nDefTextId ); } -void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressBar& rProgress ) const +void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressBar& rProgress, const Rectangle& rChartRect ) const { // initialize conversion (locks the model to suppress any internal updates) - InitConversion( xChartDoc ); + InitConversion( xChartDoc, rChartRect ); - // chart frame and title + // chart frame formatting if( mxFrame.is() ) { ScfPropertySet aFrameProp( xChartDoc->getPageBackground() ); mxFrame->Convert( aFrameProp ); } + + // chart title if( mxTitle.is() ) { Reference< XTitled > xTitled( xChartDoc, UNO_QUERY ); @@ -3515,13 +3570,25 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB if( xDiagram.is() && mxLegend.is() ) xDiagram->setLegend( mxLegend->CreateLegend() ); - // set the IncludeHiddenCells property via the old API as only this ensures that the data provider and al created sequences get this flag correctly - Reference< com::sun::star::chart::XChartDocument > xStandardApiChartDoc( xChartDoc, UNO_QUERY ); - if( xStandardApiChartDoc.is() ) + /* Following all conversions needing the old Chart1 API that involves full + initialization of the chart view. */ + Reference< com::sun::star::chart::XChartDocument > xChart1Doc( xChartDoc, UNO_QUERY ); + if( xChart1Doc.is() ) { - ScfPropertySet aDiagramProp( xStandardApiChartDoc->getDiagram() ); - bool bShowVisCells = (maProps.mnFlags & EXC_CHPROPS_SHOWVISIBLEONLY); - aDiagramProp.SetBoolProperty( EXC_CHPROP_INCLUDEHIDDENCELLS, !bShowVisCells ); + /* Set the 'IncludeHiddenCells' property via the old API as only this + ensures that the data provider and all created sequences get this + flag correctly. */ + ScfPropertySet aDiaProp( xChart1Doc->getDiagram() ); + bool bShowVisCells = ::get_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISIBLEONLY ); + aDiaProp.SetBoolProperty( EXC_CHPROP_INCLUDEHIDDENCELLS, !bShowVisCells ); + + // chart title position + ScfPropertySet aDocProp( xChart1Doc ); + if( aDocProp.GetBoolProperty( EXC_CHPROP_HASMAINTITLE ) ) + mxTitle->ConvertMainTitlePos( xChart1Doc->getTitle() ); + + // plot area position and size (there is no real automatic mode in BIFF5 charts) + bool bManualPlotArea = (GetBiff() <= EXC_BIFF5) || ::get_flag( maProps.mnFlags, EXC_CHPROPS_USEMANPLOTAREA ); } // unlock the model @@ -3751,11 +3818,14 @@ sal_Size XclImpChart::GetProgressSize() const return mxChartData.is() ? mxChartData->GetProgressSize() : 0; } -void XclImpChart::Convert( Reference< XModel > xModel, ScfProgressBar& rProgress ) const +void XclImpChart::Convert( Reference< XModel > xModel, ScfProgressBar& rProgress, const Rectangle& rChartRect ) const { Reference< XChartDocument > xChartDoc( xModel, UNO_QUERY ); - if( mxChartData.is() && xChartDoc.is() ) - mxChartData->Convert( xChartDoc, rProgress ); + if( xChartDoc.is() ) + { + if( mxChartData.is() ) + mxChartData->Convert( xChartDoc, rProgress, rChartRect ); + } } void XclImpChart::ReadChChart( XclImpStream& rStrm ) diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 599b33f9c8aa..ae7851c9d9f7 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -1579,7 +1579,7 @@ SdrObject* XclImpChartObj::DoCreateSdrObj( const Rectangle& rAnchorRect, ScfProg if( svt::EmbeddedObjectRef::TryRunningState( xEmbObj ) ) { Reference< XModel > xModel( xEmbObj->getComponent(), UNO_QUERY ); - mxChart->Convert( xModel, rProgress ); + mxChart->Convert( xModel, rProgress, rAnchorRect ); Reference< XEmbedPersist > xPers( xEmbObj, UNO_QUERY ); if( xPers.is() ) diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx index d5664c088e29..c2ca153548f4 100644 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -58,9 +58,8 @@ #include #include "global.hxx" -#include "xlconst.hxx" +#include "xlroot.hxx" #include "xlstyle.hxx" -#include "xltools.hxx" using ::rtl::OUString; using ::com::sun::star::uno::Any; @@ -107,8 +106,8 @@ XclChFrBlock::XclChFrBlock( sal_uInt16 nType ) : // Frame formatting =========================================================== XclChFramePos::XclChFramePos() : - mnObjType( EXC_CHFRAMEPOS_ANY ), - mnSizeMode( EXC_CHFRAMEPOS_AUTOSIZE ) + mnTLMode( EXC_CHFRAMEPOS_PARENT ), + mnBRMode( EXC_CHFRAMEPOS_PARENT ) { } @@ -192,7 +191,7 @@ XclChText::XclChText() : mnVAlign( EXC_CHTEXT_ALIGN_CENTER ), mnBackMode( EXC_CHTEXT_TRANSPARENT ), mnFlags( EXC_CHTEXT_AUTOCOLOR | EXC_CHTEXT_AUTOFILL ), - mnPlacement( EXC_CHTEXT_POS_DEFAULT ), + mnFlags2( EXC_CHTEXT_POS_DEFAULT ), mnRotation( EXC_ROT_NONE ) { } @@ -1306,7 +1305,9 @@ ScfPropSetHelper& XclChPropSetHelper::GetHatchHelper( XclChPropertyMode ePropMod XclChRootData::XclChRootData() : mxTypeInfoProv( new XclChTypeInfoProvider ), - mxFmtInfoProv( new XclChFormatInfoProvider ) + mxFmtInfoProv( new XclChFormatInfoProvider ), + mnBorderGapX( 0 ), + mnBorderGapY( 0 ) { } @@ -1314,17 +1315,19 @@ XclChRootData::~XclChRootData() { } -Reference< XChartDocument > XclChRootData::GetChartDoc() const +void XclChRootData::InitConversion( const XclRoot& rRoot, const Reference< XChartDocument >& rxChartDoc, const Rectangle& rChartRect ) { - DBG_ASSERT( mxChartDoc.is(), "XclChRootData::GetChartDoc - missing chart document" ); - return mxChartDoc; -} + // remember chart document reference and chart shape position/size + DBG_ASSERT( rxChartDoc.is(), "XclChRootData::InitConversion - missing chart document" ); + mxChartDoc = rxChartDoc; + maChartRect = rChartRect; -void XclChRootData::InitConversion( XChartDocRef xChartDoc ) -{ - // remember chart document reference - DBG_ASSERT( xChartDoc.is(), "XclChRootData::InitConversion - missing chart document" ); - mxChartDoc = xChartDoc; + // Excel excludes a border of 5 pixels in each direction from chart area + mnBorderGapX = rRoot.GetHmmFromPixelX( 5.0 ); + mnBorderGapY = rRoot.GetHmmFromPixelY( 5.0 ); + + mfUnitSizeX = static_cast< double >( maChartRect.GetWidth() - 2 * mnBorderGapX ) / EXC_CHART_TOTALUNITS; + mfUnitSizeY = static_cast< double >( maChartRect.GetHeight() - 2 * mnBorderGapY ) / EXC_CHART_TOTALUNITS; // create object tables Reference< XMultiServiceFactory > xFactory( mxChartDoc, UNO_QUERY ); diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 0b6af9da2e63..0af823a24b68 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -31,7 +31,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" #include "xlroot.hxx" +#include +#include +#include #include +#include #include #include #include @@ -61,6 +65,15 @@ namespace ApiScriptType = ::com::sun::star::i18n::ScriptType; using ::rtl::OUString; +using ::com::sun::star::uno::Exception; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::UNO_QUERY_THROW; +using ::com::sun::star::uno::UNO_SET_THROW; +using ::com::sun::star::awt::XDevice; +using ::com::sun::star::awt::DeviceInfo; +using ::com::sun::star::frame::XFrame; +using ::com::sun::star::frame::XFramesSupplier; +using ::com::sun::star::lang::XMultiServiceFactory; // Global data ================================================================ @@ -92,6 +105,8 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium, mxFontPropSetHlp( new XclFontPropSetHelper ), mxChPropSetHlp( new XclChPropSetHelper ), mxRD( new RootData ),//! + mfScreenPixelX( 50.0 ), + mfScreenPixelY( 50.0 ), mnCharWidth( 110 ), mnScTab( 0 ), mbExport( bExport ) @@ -135,6 +150,22 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium, mxExtDocOpt.reset( new ScExtDocOptions( *pOldDocOpt ) ); else mxExtDocOpt.reset( new ScExtDocOptions ); + + // screen pixel size + try + { + Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_SET_THROW ); + Reference< XFramesSupplier > xFramesSupp( xFactory->createInstance( CREATE_OUSTRING( "com.sun.star.frame.Desktop" ) ), UNO_QUERY_THROW ); + Reference< XFrame > xFrame( xFramesSupp->getActiveFrame(), UNO_SET_THROW ); + Reference< XDevice > xDevice( xFrame->getContainerWindow(), UNO_QUERY_THROW ); + DeviceInfo aDeviceInfo = xDevice->getInfo(); + mfScreenPixelX = (aDeviceInfo.PixelPerMeterX > 0) ? (100000.0 / aDeviceInfo.PixelPerMeterX) : 50.0; + mfScreenPixelY = (aDeviceInfo.PixelPerMeterY > 0) ? (100000.0 / aDeviceInfo.PixelPerMeterY) : 50.0; + } + catch( Exception& ) + { + OSL_ENSURE( false, "XclRootData::XclRootData - cannot get output device info" ); + } } XclRootData::~XclRootData() @@ -205,6 +236,16 @@ void XclRoot::SetCharWidth( const XclFontData& rFontData ) } } +sal_Int32 XclRoot::GetHmmFromPixelX( double fPixelX ) const +{ + return static_cast< sal_Int32 >( fPixelX * mrData.mfScreenPixelX + 0.5 ); +} + +sal_Int32 XclRoot::GetHmmFromPixelY( double fPixelY ) const +{ + return static_cast< sal_Int32 >( fPixelY * mrData.mfScreenPixelY + 0.5 ); +} + String XclRoot::RequestPassword( ::comphelper::IDocPasswordVerifier& rVerifier ) const { ::std::vector< OUString > aDefaultPasswords; diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index 8a724aab1457..98f32a1dfef3 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -67,7 +67,7 @@ namespace com { namespace sun { namespace star { // Common ===================================================================== -class XclExpChRootData; +struct XclExpChRootData; class XclExpChChart; /** Base class for complex chart classes, provides access to other components @@ -82,7 +82,7 @@ public: typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > XChartDocRef; public: - explicit XclExpChRoot( const XclExpRoot& rRoot, XclExpChChart* pChartData ); + explicit XclExpChRoot( const XclExpRoot& rRoot, XclExpChChart& rChartData ); virtual ~XclExpChRoot(); /** Returns this root instance - for code readability in derived classes. */ @@ -98,7 +98,7 @@ public: const XclChFormatInfo& GetFormatInfo( XclChObjectType eObjType ) const; /** Starts the API chart document conversion. Must be called once before all API conversion. */ - void InitConversion( XChartDocRef xChartDoc ) const; + void InitConversion( XChartDocRef xChartDoc, const Rectangle& rChartRect ) const; /** Finishes the API chart document conversion. Must be called once after all API conversion. */ void FinishConversion() const; @@ -1166,7 +1166,7 @@ public: public: explicit XclExpChChart( const XclExpRoot& rRoot, - XChartDocRef xChartDoc, const Size& rSize ); + XChartDocRef xChartDoc, const Rectangle& rChartRect ); /** Creates, registers and returns a new data series object. */ XclExpChSeriesRef CreateSeries(); @@ -1205,7 +1205,7 @@ public: public: explicit XclExpChart( const XclExpRoot& rRoot, - XModelRef xModel, const Size& rSize ); + XModelRef xModel, const Rectangle& rChartRect ); }; // ============================================================================ diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index 1798242df3c6..814187760667 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -49,6 +49,10 @@ namespace com { namespace sun { namespace star { { class XModel; } + namespace drawing + { + class XShape; + } namespace chart2 { struct ScaleData; @@ -77,7 +81,7 @@ struct XclObjFillData; // Common ===================================================================== class ScfProgressBar; -class XclImpChRootData; +struct XclImpChRootData; class XclImpChChart; class ScTokenArray; @@ -89,7 +93,7 @@ public: typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > XDataProviderRef; public: - explicit XclImpChRoot( const XclImpRoot& rRoot, XclImpChChart* pChartData ); + explicit XclImpChRoot( const XclImpRoot& rRoot, XclImpChChart& rChartData ); virtual ~XclImpChRoot(); /** Returns this root instance - for code readability in derived classes. */ @@ -111,13 +115,19 @@ public: Color GetSeriesFillAutoColor( sal_uInt16 nFormatIdx ) const; /** Starts the API chart document conversion. Must be called once before all API conversion. */ - void InitConversion( XChartDocRef xChartDoc ) const; + void InitConversion( XChartDocRef xChartDoc, const Rectangle& rChartRect ) const; /** Finishes the API chart document conversion. Must be called once after all API conversion. */ void FinishConversion( ScfProgressBar& rProgress ) const; /** Returns the data provider for the chart document. */ XDataProviderRef GetDataProvider() const; + sal_Int32 CalcHmmFromChartX( sal_uInt16 nPosX ) const; + sal_Int32 CalcHmmFromChartY( sal_uInt16 nPosY ) const; + + double CalcRelativeFromChartX( sal_uInt16 nPosX ) const; + double CalcRelativeFromChartY( sal_uInt16 nPosY ) const; + /** Writes all line properties to the passed property set. */ void ConvertLineFormat( ScfPropertySet& rPropSet, @@ -186,6 +196,9 @@ public: /** Reads the CHFRAMEPOS record (frame position and size). */ void ReadChFramePos( XclImpStream& rStrm ); + /** Returns read-only access to the imported frame position data. */ + inline const XclChFramePos& GetFramePosData() const { return maData; } + private: XclChFramePos maData; /// Position of the frame. }; @@ -506,6 +519,8 @@ public: void ConvertDataLabel( ScfPropertySet& rPropSet, const XclChTypeInfo& rTypeInfo ) const; /** Creates a title text object. */ XTitleRef CreateTitle() const; + /** Converts the manual position of the main title */ + void ConvertMainTitlePos( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxTitle ) const; private: using XclImpChRoot::ConvertFont; @@ -519,6 +534,7 @@ private: XclChText maData; /// Contents of the CHTEXT record. XclChObjectLink maObjLink; /// Link target for this text object. XclFormatRunVec maFormats; /// Formatting runs (CHFORMATRUNS record). + XclImpChFramePosRef mxFramePos; /// Relative text frame position (CHFRAMEPOS record). XclImpChSourceLinkRef mxSrcLink; /// Linked data (CHSOURCELINK with CHSTRING record). XclImpChFrameRef mxFrame; /// Text object frame properties (CHFRAME group). XclImpChFontRef mxFont; /// Index into font buffer (CHFONT record). @@ -1353,7 +1369,7 @@ public: inline sal_Size GetProgressSize() const { return 2 * EXC_CHART_PROGRESS_SIZE; } /** Converts and writes all properties to the passed chart. */ - void Convert( XChartDocRef xChartDoc, ScfProgressBar& rProgress ) const; + void Convert( XChartDocRef xChartDoc, ScfProgressBar& rProgress, const Rectangle& rChartRect ) const; private: /** Reads a CHSERIES group (data series source and formatting). */ @@ -1421,7 +1437,7 @@ public: inline bool IsPivotChart() const { return mbIsPivotChart; } /** Creates the chart object in the passed component. */ - void Convert( XModelRef xModel, ScfProgressBar& rProgress ) const; + void Convert( XModelRef xModel, ScfProgressBar& rProgress, const Rectangle& rChartRect ) const; private: /** Reads the CHCHART group (entire chart data). */ diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index 7e3873b1f1cf..1f10c26a0b01 100644 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -37,6 +37,7 @@ #define EXC_CHART2_3DBAR_HAIRLINES_ONLY 1 #include +#include #include "fapihelper.hxx" namespace com { namespace sun { namespace star { @@ -45,6 +46,8 @@ namespace com { namespace sun { namespace star { namespace chart2 { class XChartDocument; } } } } +class XclRoot; + // Property names ============================================================= // service names @@ -100,6 +103,7 @@ namespace com { namespace sun { namespace star { #define EXC_CHPROP_FILLSTYLE CREATE_OUSTRING( "FillStyle" ) #define EXC_CHPROP_GAPWIDTHSEQ CREATE_OUSTRING( "GapwidthSequence" ) #define EXC_CHPROP_GEOMETRY3D CREATE_OUSTRING( "Geometry3D" ) +#define EXC_CHPROP_HASMAINTITLE CREATE_OUSTRING( "HasMainTitle" ) #define EXC_CHPROP_INCLUDEHIDDENCELLS CREATE_OUSTRING( "IncludeHiddenCells" ) #define EXC_CHPROP_JAPANESE CREATE_OUSTRING( "Japanese" ) #define EXC_CHPROP_LABEL CREATE_OUSTRING( "Label" ) @@ -171,6 +175,8 @@ const sal_Int32 EXC_CHART_AXESSET_NONE = -1; /// For internal use const sal_Int32 EXC_CHART_AXESSET_PRIMARY = 0; /// API primary axes set index. const sal_Int32 EXC_CHART_AXESSET_SECONDARY = 1; /// API secondary axes set index. +const sal_Int32 EXC_CHART_TOTALUNITS = 4000; /// Chart objects are positioned in 1/4000 of chart area. + // (0x0850) CHFRINFO ---------------------------------------------------------- const sal_uInt16 EXC_ID_CHFRINFO = 0x0850; @@ -604,7 +610,8 @@ const sal_uInt16 EXC_ID_CHPROPERTIES = 0x1044; const sal_uInt16 EXC_CHPROPS_MANSERIES = 0x0001; /// Manual series allocation. const sal_uInt16 EXC_CHPROPS_SHOWVISIBLEONLY = 0x0002; /// Show visible cells only. const sal_uInt16 EXC_CHPROPS_NORESIZE = 0x0004; /// Do not resize chart with window. -const sal_uInt16 EXC_CHPROPS_MANPLOTAREA = 0x0008; /// Plot area with CHFRAMEPOS records. +const sal_uInt16 EXC_CHPROPS_MANPLOTAREA = 0x0008; /// Manual plot area mode. +const sal_uInt16 EXC_CHPROPS_USEMANPLOTAREA = 0x0010; /// Manual plot area layout in CHFRAMEPOS record. const sal_uInt8 EXC_CHPROPS_EMPTY_SKIP = 0; /// Skip empty values. const sal_uInt8 EXC_CHPROPS_EMPTY_ZERO = 1; /// Plot empty values as zero. @@ -643,11 +650,11 @@ const sal_uInt16 EXC_ID_CHFORMAT = 0x104E; const sal_uInt16 EXC_ID_CHFRAMEPOS = 0x104F; -const sal_uInt16 EXC_CHFRAMEPOS_ANY = 2; -const sal_uInt16 EXC_CHFRAMEPOS_LEGEND = 5; - -const sal_uInt16 EXC_CHFRAMEPOS_MANUALSIZE = 1; -const sal_uInt16 EXC_CHFRAMEPOS_AUTOSIZE = 2; +const sal_uInt16 EXC_CHFRAMEPOS_POINTS = 0; +const sal_uInt16 EXC_CHFRAMEPOS_ABSSIZE_POINTS = 1; +const sal_uInt16 EXC_CHFRAMEPOS_PARENT = 2; +const sal_uInt16 EXC_CHFRAMEPOS_DEFOFFSET_PLOT = 3; +const sal_uInt16 EXC_CHFRAMEPOS_CHARTSIZE = 5; // (0x1050) CHFORMATRUNS ------------------------------------------------------ @@ -774,8 +781,8 @@ struct XclChFrBlock struct XclChFramePos { XclChRectangle maRect; /// Object dependent position data. - sal_uInt16 mnObjType; /// Object type. - sal_uInt16 mnSizeMode; /// Size mode (manual, automatic). + sal_uInt16 mnTLMode; /// Top-left position mode. + sal_uInt16 mnBRMode; /// Bottom-right position mode. explicit XclChFramePos(); }; @@ -885,7 +892,7 @@ struct XclChText sal_uInt8 mnVAlign; /// Vertical alignment. sal_uInt16 mnBackMode; /// Background mode: transparent, opaque. sal_uInt16 mnFlags; /// Additional flags. - sal_uInt16 mnPlacement; /// Text object placement (BIFF8+). + sal_uInt16 mnFlags2; /// Text object placement and text direction (BIFF8+). sal_uInt16 mnRotation; /// Text object rotation (BIFF8+). explicit XclChText(); @@ -1429,45 +1436,36 @@ private: // ============================================================================ /** Base struct for internal root data structs for import and export. */ -class XclChRootData +struct XclChRootData { -public: - typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > XChartDocRef; - -public: - explicit XclChRootData(); - virtual ~XclChRootData(); - - /** Returns the API reference of the chart document. */ - XChartDocRef GetChartDoc() const; - - /** Returns the chart type info provider, that contains data about all chart types. */ - inline XclChTypeInfoProvider& GetTypeInfoProvider() const { return *mxTypeInfoProv; } - /** Returns the chart type info provider, that contains data about all chart types. */ - inline XclChFormatInfoProvider& GetFormatInfoProvider() const { return *mxFmtInfoProv; } - - inline XclChObjectTable& GetLineDashTable() const { return *mxLineDashTable; } - inline XclChObjectTable& GetGradientTable() const { return *mxGradientTable; } - inline XclChObjectTable& GetHatchTable() const { return *mxHatchTable; } - inline XclChObjectTable& GetBitmapTable() const { return *mxBitmapTable; } - - /** Starts the API chart document conversion. Must be called once before any API access. */ - void InitConversion( XChartDocRef xChartDoc ); - /** Finishes the API chart document conversion. Must be called once before any API access. */ - void FinishConversion(); - -private: typedef ScfRef< XclChTypeInfoProvider > XclChTypeProvRef; typedef ScfRef< XclChFormatInfoProvider > XclChFmtInfoProvRef; typedef ScfRef< XclChObjectTable > XclChObjectTableRef; - XChartDocRef mxChartDoc; /// The chart document. + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > + mxChartDoc; /// The chart document. + Rectangle maChartRect; /// Position and size of the chart shape. XclChTypeProvRef mxTypeInfoProv; /// Provides info about chart types. XclChFmtInfoProvRef mxFmtInfoProv; /// Provides info about auto formatting. XclChObjectTableRef mxLineDashTable; /// Container for line dash styles. XclChObjectTableRef mxGradientTable; /// Container for gradient fill styles. XclChObjectTableRef mxHatchTable; /// Container for hatch fill styles. XclChObjectTableRef mxBitmapTable; /// Container for bitmap fill styles. + sal_Int32 mnBorderGapX; /// Border gap to chart space in 1/100mm. + sal_Int32 mnBorderGapY; /// Border gap to chart space in 1/100mm. + double mfUnitSizeX; /// Size of a chart X unit (1/4000 of chart width) in 1/100 mm. + double mfUnitSizeY; /// Size of a chart Y unit (1/4000 of chart height) in 1/100 mm. + + explicit XclChRootData(); + virtual ~XclChRootData(); + + /** Starts the API chart document conversion. Must be called once before any API access. */ + void InitConversion( + const XclRoot& rRoot, + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc, + const Rectangle& rChartRect ); + /** Finishes the API chart document conversion. Must be called once before any API access. */ + void FinishConversion(); }; // ============================================================================ diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx index 8b0873b25475..7b4ecbec9104 100644 --- a/sc/source/filter/inc/xlroot.hxx +++ b/sc/source/filter/inc/xlroot.hxx @@ -116,6 +116,8 @@ struct XclRootData XclTracerRef mxTracer; /// Filter tracer. RootDataRef mxRD; /// Old RootData struct. Will be removed. + double mfScreenPixelX; /// Width of a screen pixel (1/100 mm). + double mfScreenPixelY; /// Height of a screen pixel (1/100 mm). long mnCharWidth; /// Width of '0' in default font (twips). SCTAB mnScTab; /// Current Calc sheet index. const bool mbExport; /// false = Import, true = Export. @@ -180,6 +182,11 @@ public: /** Returns the current Calc sheet index. */ inline SCTAB GetCurrScTab() const { return mrData.mnScTab; } + /** Calculates the width of the passed number of pixels in 1/100 mm. */ + sal_Int32 GetHmmFromPixelX( double fPixelX ) const; + /** Calculates the height of the passed number of pixels in 1/100 mm. */ + sal_Int32 GetHmmFromPixelY( double fPixelY ) const; + /** Returns the medium to import from. */ inline SfxMedium& GetMedium() const { return mrData.mrMedium; } /** Returns the document URL of the imported/exported file. */ -- cgit v1.2.3 From 7267e9e4e310b51a749e25ceee48427af160a81a Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 18 Dec 2009 20:18:54 +0100 Subject: chartpositioning: #i86609# BIFF and OOXML import: object positioning in charts (chart title, plot area) --- oox/inc/oox/drawingml/chart/converterbase.hxx | 11 ++-- oox/source/drawingml/chart/chartspaceconverter.cxx | 70 ++++++++++++++++++++-- oox/source/drawingml/chart/converterbase.cxx | 46 ++++++++++---- oox/source/drawingml/chart/objectformatter.cxx | 15 ++--- oox/source/drawingml/chart/plotareaconverter.cxx | 26 -------- oox/source/drawingml/chart/titleconverter.cxx | 4 -- oox/source/dump/biffdumper.cxx | 8 +-- oox/source/dump/biffdumper.ini | 26 ++++---- oox/source/token/properties.txt | 1 + 9 files changed, 134 insertions(+), 73 deletions(-) diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx index 25a6428018aa..69e1843ce11d 100644 --- a/oox/inc/oox/drawingml/chart/converterbase.hxx +++ b/oox/inc/oox/drawingml/chart/converterbase.hxx @@ -38,9 +38,8 @@ namespace com { namespace sun { namespace star { namespace awt { struct Rectangle; } namespace awt { struct Size; } - namespace lang { class XMultiServiceFactory; } - namespace chart { class XDiagram; } namespace chart2 { class XChartDocument; } + namespace drawing { class XShape; } } } } namespace oox { namespace core { @@ -85,9 +84,6 @@ protected: const ::com::sun::star::awt::Size& getChartSize() const; /** Returns the object formatter. */ ObjectFormatter& getFormatter() const; - /** Returns the *old* API diagram model. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart::XDiagram > - getChart1Diagram() const; private: ::boost::shared_ptr< ConverterData > mxData; @@ -127,6 +123,11 @@ public: /** Tries to set the position from the contained OOXML layout model. Returns true, if a manual position 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( + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape, + double fRotationAngle ); }; // ============================================================================ diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index ebb5af23a368..f0d647f0415a 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -32,6 +32,7 @@ #include "oox/drawingml/chart/chartspaceconverter.hxx" #include #include +#include #include #include #include @@ -47,7 +48,9 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; +using ::com::sun::star::awt::Rectangle; using ::com::sun::star::util::XNumberFormatsSupplier; +using ::com::sun::star::chart::XDiagramPositioning; using ::com::sun::star::chart2::XDiagram; using ::com::sun::star::chart2::XTitled; using ::com::sun::star::chart2::data::XDataReceiver; @@ -58,6 +61,23 @@ namespace chart { // ============================================================================ +namespace { + +double lclGetTitleRotation( const Reference< XTitled >& rxTitled ) +{ + double fAngle = 0.0; + if( rxTitled.is() ) + { + PropertySet aTitleProp( rxTitled->getTitleObject() ); + aTitleProp.getProperty( fAngle, PROP_TextRotation ); + } + return fAngle; +} + +} // namespace + +// ---------------------------------------------------------------------------- + ChartSpaceConverter::ChartSpaceConverter( const ConverterRoot& rParent, ChartSpaceModel& rModel ) : ConverterBase< ChartSpaceModel >( rParent, rModel ) { @@ -146,11 +166,51 @@ void ChartSpaceConverter::convertFromModel() aDiaProp.setProperty( PROP_MissingValueTreatment, nMissingValues ); } - /* Set the IncludeHiddenCells property via the old API as only this - ensures that the data provider and all created sequences get this flag - correctly. */ - PropertySet aOldDiaProp( getChart1Diagram() ); - aOldDiaProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly ); + /* Following all conversions needing the old Chart1 API that involves full + initialization of the chart view. */ + Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( getChartDocument(), UNO_QUERY ); + if( xChart1Doc.is() ) + { + /* Set the IncludeHiddenCells property via the old API as only this + ensures that the data provider and all created sequences get this + flag correctly. */ + PropertySet aDiaProp( xChart1Doc->getDiagram() ); + aDiaProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly ); + + // title position + PropertySet aDocProp( xChart1Doc ); + if( aDocProp.getBoolProperty( PROP_HasMainTitle ) ) + { + Reference< XTitled > xTitled( getChartDocument(), UNO_QUERY ); + double fAngle = lclGetTitleRotation( xTitled ); + LayoutModel& rLayout = mrModel.mxTitle.getOrCreate().mxLayout.getOrCreate(); + LayoutConverter aLayoutConv( *this, rLayout ); + aLayoutConv.convertFromModel( xChart1Doc->getTitle(), fAngle ); + } + + // plot area position and size + LayoutModel& rLayout = mrModel.mxPlotArea.getOrCreate().mxLayout.getOrCreate(); + LayoutConverter aLayoutConv( *this, rLayout ); + Rectangle aDiagramRect; + if( aLayoutConv.calcAbsRectangle( aDiagramRect ) ) try + { + Reference< XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW ); + switch( rLayout.mnTarget ) + { + case XML_inner: + xPositioning->setDiagramPositionExcludingAxes( aDiagramRect ); + break; + case XML_outer: + xPositioning->setDiagramPositionIncludingAxes( aDiagramRect ); + break; + default: + OSL_ENSURE( false, "ChartSpaceConverter::convertFromModel - unknown positioning target" ); + } + } + catch( Exception& ) + { + } + } } // ============================================================================ diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index 22b359ab0866..fba7e285aeab 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -36,6 +36,7 @@ #include #include #include +#include // for F_PI180 #include "properties.hxx" #include "oox/core/xmlfilterbase.hxx" #include "oox/drawingml/theme.hxx" @@ -48,10 +49,12 @@ using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::frame::XModel; +using ::com::sun::star::awt::Point; using ::com::sun::star::awt::Rectangle; using ::com::sun::star::awt::Size; using ::com::sun::star::chart2::RelativePosition; using ::com::sun::star::chart2::XChartDocument; +using ::com::sun::star::drawing::XShape; using ::oox::core::XmlFilterBase; namespace oox { @@ -171,19 +174,11 @@ ObjectFormatter& ConverterRoot::getFormatter() const return mxData->maFormatter; } -Reference< ::com::sun::star::chart::XDiagram > ConverterRoot::getChart1Diagram() const -{ - Reference< ::com::sun::star::chart::XDiagram > xDiagram; - Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( mxData->mxDoc, UNO_QUERY ); - if( xChart1Doc.is() ) - xDiagram = xChart1Doc->getDiagram(); - return xDiagram; -} - // ============================================================================ namespace { +/** Returns a position value in the chart area in 1/100 mm. */ sal_Int32 lclCalcPosition( sal_Int32 nChartSize, double fPos, sal_Int32 nPosMode ) { switch( nPosMode ) @@ -199,6 +194,7 @@ sal_Int32 lclCalcPosition( sal_Int32 nChartSize, double fPos, sal_Int32 nPosMode return -1; } +/** Returns a size value in the chart area in 1/100 mm. */ sal_Int32 lclCalcSize( sal_Int32 nPos, sal_Int32 nChartSize, double fSize, sal_Int32 nSizeMode ) { sal_Int32 nValue = getLimitedValue< sal_Int32, double >( nChartSize * fSize + 0.5, 0, nChartSize ); @@ -246,7 +242,9 @@ bool LayoutConverter::calcAbsRectangle( Rectangle& orRect ) const bool LayoutConverter::convertFromModel( PropertySet& rPropSet ) { - if( !mrModel.mbAutoLayout && (mrModel.mfX >= 0.0) && (mrModel.mfY >= 0.0) ) + if( !mrModel.mbAutoLayout && + (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 ); @@ -258,6 +256,34 @@ bool LayoutConverter::convertFromModel( PropertySet& rPropSet ) return false; } +bool LayoutConverter::convertFromModel( const Reference< XShape >& rxShape, double fRotationAngle ) +{ + if( !mrModel.mbAutoLayout ) + { + const Size& rChartSize = getChartSize(); + Point aShapePos( + lclCalcPosition( rChartSize.Width, mrModel.mfX, mrModel.mnXMode ), + lclCalcPosition( rChartSize.Height, mrModel.mfY, mrModel.mnYMode ) ); + if( (aShapePos.X >= 0) && (aShapePos.Y >= 0) ) + { + // the call to XShape.getSize() may recalc the chart view + Size aShapeSize = rxShape->getSize(); + // rotated shapes need special handling... + double fSin = fabs( sin( fRotationAngle * F_PI180 ) ); + // add part of height to X direction, if title is rotated down + if( fRotationAngle > 180.0 ) + aShapePos.X += static_cast< sal_Int32 >( fSin * aShapeSize.Height + 0.5 ); + // add part of width to Y direction, if title is rotated up + else if( fRotationAngle > 0.0 ) + aShapePos.Y += static_cast< sal_Int32 >( fSin * aShapeSize.Width + 0.5 ); + // set the resulting position at the shape + rxShape->setPosition( aShapePos ); + return true; + } + } + return false; +} + // ============================================================================ } // namespace chart diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index a82f0193f832..fd4b6c7b5889 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1146,18 +1146,19 @@ void ObjectFormatter::convertTextRotation( PropertySet& rPropSet, const ModelRef { if( rxTextProp.is() ) { - /* Chart2 expects rotation angle as double value in range of [0,360). - OOXML counts clockwise, Chart2 counts counterclockwise. */ - double fAngle = rxTextProp->getTextProperties().moRotation.get( 0 ); - fAngle = getDoubleIntervalValue< double >( -fAngle / 60000.0, 0.0, 360.0 ); - rPropSet.setProperty( PROP_TextRotation, fAngle ); - + bool bStacked = false; if( bSupportsStacked ) { sal_Int32 nVert = rxTextProp->getTextProperties().moVert.get( XML_horz ); - bool bStacked = (nVert == XML_wordArtVert) || (nVert == XML_wordArtVertRtl); + bStacked = (nVert == XML_wordArtVert) || (nVert == XML_wordArtVertRtl); rPropSet.setProperty( PROP_StackCharacters, bStacked ); } + + /* Chart2 expects rotation angle as double value in range of [0,360). + OOXML counts clockwise, Chart2 counts counterclockwise. */ + double fAngle = static_cast< double >( bStacked ? 0 : rxTextProp->getTextProperties().moRotation.get( 0 ) ); + fAngle = getDoubleIntervalValue< double >( -fAngle / 60000.0, 0.0, 360.0 ); + rPropSet.setProperty( PROP_TextRotation, fAngle ); } } diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index 278de57ef7cb..b4345af3f088 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -32,7 +32,6 @@ #include "oox/drawingml/chart/plotareaconverter.hxx" #include #include -#include #include #include #include @@ -46,8 +45,6 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY_THROW; -using ::com::sun::star::awt::Rectangle; -using ::com::sun::star::chart::XDiagramPositioning; using ::com::sun::star::chart2::XCoordinateSystem; using ::com::sun::star::chart2::XCoordinateSystemContainer; using ::com::sun::star::chart2::XDiagram; @@ -411,29 +408,6 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) PropertySet aPropSet( xDiagram->getWall() ); getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, OBJECTTYPE_PLOTAREA2D ); } - - // plot area position and size - LayoutModel& rLayout = mrModel.mxLayout.getOrCreate(); - LayoutConverter aLayoutConv( *this, rLayout ); - Rectangle aDiagramRect; - if( aLayoutConv.calcAbsRectangle( aDiagramRect ) ) try - { - Reference< XDiagramPositioning > xPositioning( getChart1Diagram(), UNO_QUERY_THROW ); - switch( rLayout.mnTarget ) - { - case XML_inner: - xPositioning->setDiagramPositionExcludingAxes( aDiagramRect ); - break; - case XML_outer: - xPositioning->setDiagramPositionIncludingAxes( aDiagramRect ); - break; - default: - OSL_ENSURE( false, "PlotAreaConverter::convertFromModel - unknown positioning target" ); - } - } - catch( Exception& ) - { - } } // ============================================================================ diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index fdb8cdc7793e..bcddb7fec602 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -180,10 +180,6 @@ void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, con OSL_ENSURE( !mrModel.mxTextProp || !rText.mxTextBody, "TitleConverter::convertFromModel - multiple text properties" ); ModelRef< TextBody > xTextProp = mrModel.mxTextProp.is() ? mrModel.mxTextProp : rText.mxTextBody; getFormatter().convertTextRotation( aPropSet, xTextProp, true ); - - // frame position - LayoutConverter aLayoutConv( *this, mrModel.mxLayout.getOrCreate() ); - aLayoutConv.convertFromModel( aPropSet ); } catch( Exception& ) { diff --git a/oox/source/dump/biffdumper.cxx b/oox/source/dump/biffdumper.cxx index 14b3c7b1403a..1ecf1ab05046 100644 --- a/oox/source/dump/biffdumper.cxx +++ b/oox/source/dump/biffdumper.cxx @@ -1746,8 +1746,8 @@ void WorkbookStreamObject::implDumpRecordBody() break; case BIFF_ID_CHFRAMEPOS: - dumpDec< sal_uInt16 >( "object-type", "CHFRAMEPOS-OBJTYPE" ); - dumpDec< sal_uInt16 >( "size-mode", "CHFRAMEPOS-SIZEMODE" ); + dumpDec< sal_uInt16 >( "tl-mode", "CHFRAMEPOS-POSMODE" ); + dumpDec< sal_uInt16 >( "br-mode", "CHFRAMEPOS-POSMODE" ); dumpRect< sal_Int32 >( "position", (eBiff <= BIFF4) ? "CONV-TWIP-TO-CM" : "" ); break; @@ -1995,9 +1995,9 @@ void WorkbookStreamObject::implDumpRecordBody() dumpDec< sal_uInt16 >( "fill-mode", "CHTEXT-FILLMODE" ); dumpColorABGR(); dumpRect< sal_Int32 >( "position", (eBiff <= BIFF4) ? "CONV-TWIP-TO-CM" : "" ); - dumpHex< sal_uInt16 >( "flags", "CHTEXT-FLAGS" ); + dumpHex< sal_uInt16 >( "flags-1", "CHTEXT-FLAGS1" ); if( eBiff == BIFF8 ) dumpColorIdx(); - if( eBiff == BIFF8 ) dumpDec< sal_uInt16 >( "placement", "CHTEXT-PLACEMENT" ); + if( eBiff == BIFF8 ) dumpDec< sal_uInt16 >( "flags-2", "CHTEXT-FLAGS2" ); if( eBiff == BIFF8 ) dumpDec< sal_uInt16 >( "rotation", "TEXTROTATION" ); break; diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini index 98901625c0d2..8cbe16521b12 100644 --- a/oox/source/dump/biffdumper.ini +++ b/oox/source/dump/biffdumper.ini @@ -692,8 +692,7 @@ end # CHFRAMEPOS ----------------------------------------------------------------- -shortlist=CHFRAMEPOS-OBJTYPE,2,any,,,legend -shortlist=CHFRAMEPOS-SIZEMODE,1,manual,auto +shortlist=CHFRAMEPOS-POSMODE,0,rel-points,abssize-points,parent-dependent,offset-plotarea-size,,chartsize # CHFRBLOCKBEGIN, CHFRBLOCKEND ----------------------------------------------- @@ -1012,7 +1011,7 @@ shortlist=CHTEXT-HORALIGN,1,left,center,right,block,distribute shortlist=CHTEXT-VERALIGN,1,top,center,bottom,block,distribute shortlist=CHTEXT-FILLMODE,1,transparent,opaque -combilist=CHTEXT-FLAGS-BIFF2 +combilist=CHTEXT-FLAGS1-BIFF2 0x0001=auto-color 0x0002=show-symbol 0x0004=show-value @@ -1023,28 +1022,31 @@ combilist=CHTEXT-FLAGS-BIFF2 0x0080=auto-fill end -combilist=CHTEXT-FLAGS-BIFF3 - include=CHTEXT-FLAGS-BIFF2 +combilist=CHTEXT-FLAGS1-BIFF3 + include=CHTEXT-FLAGS1-BIFF2 0x0700=uint8,dec,orientation,TEXTORIENTATION end -combilist=CHTEXT-FLAGS-BIFF5 - include=CHTEXT-FLAGS-BIFF3 +combilist=CHTEXT-FLAGS1-BIFF5 + include=CHTEXT-FLAGS1-BIFF3 0x0800=show-categ-percent 0x1000=show-percent end -combilist=CHTEXT-FLAGS-BIFF8 - include=CHTEXT-FLAGS-BIFF5 +combilist=CHTEXT-FLAGS1-BIFF8 + include=CHTEXT-FLAGS1-BIFF5 0x2000=show-bubble-size 0x4000=show-categ end -multilist=CHTEXT-PLACEMENT - default= - 0=context,outside,inside,center,axis,above,below,left,right,auto,manual +combilist=CHTEXT-FLAGS2 + ignore=0x3FF0 + 0x000F=uint8,dec,placement,CHTEXT-PLACEMENT + 0xC000=uint8,dec,text-dir,XF-TEXTDIRECTION end +shortlist=CHTEXT-PLACEMENT,0,context,outside,inside,center,axis,above,below,left,right,auto,manual + # CHTICK --------------------------------------------------------------------- shortlist=CHTICK-TYPE,0,none,inside,outside,both diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 1ce24e4abc2f..3efaff69b2ca 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -165,6 +165,7 @@ HasAutoShowInfo HasColumnRowHeaders HasHorizontalScrollBar HasLayoutInfo +HasMainTitle HasReference HasSheetTabs HasSortInfo -- cgit v1.2.3 From bf65432e76816beac24d340a96eb4dd3a8c47d37 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Thu, 7 Jan 2010 17:20:43 +0100 Subject: chartpositioning: #i86609# BIFF import/export of chart legend/plot area positions --- sc/source/filter/excel/xechart.cxx | 145 ++++++++++++++++++++++++++++++++++- sc/source/filter/excel/xeescher.cxx | 2 +- sc/source/filter/excel/xichart.cxx | 146 +++++++++++++++++++++++++++++++----- sc/source/filter/excel/xlchart.cxx | 100 +----------------------- sc/source/filter/inc/xechart.hxx | 45 ++++++++++- sc/source/filter/inc/xichart.hxx | 21 +++++- sc/source/filter/inc/xlchart.hxx | 14 +--- 7 files changed, 340 insertions(+), 133 deletions(-) mode change 100644 => 100755 sc/source/filter/excel/xichart.cxx mode change 100644 => 100755 sc/source/filter/excel/xlchart.cxx mode change 100644 => 100755 sc/source/filter/inc/xlchart.hxx diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index f3a4d58326fb..1f607efbd0c7 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include #include #include @@ -54,6 +56,9 @@ #include #include #include +#include +#include +#include #include #include @@ -76,10 +81,14 @@ using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; 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::beans::XPropertySet; using ::com::sun::star::i18n::XBreakIterator; using ::com::sun::star::frame::XModel; +using ::com::sun::star::drawing::XShape; + using ::com::sun::star::chart2::XChartDocument; using ::com::sun::star::chart2::XDiagram; using ::com::sun::star::chart2::XCoordinateSystemContainer; @@ -239,6 +248,11 @@ XclExpChRoot::~XclExpChRoot() { } +Reference< XChartDocument > XclExpChRoot::GetChartDocument() const +{ + return mxChData->mxChartDoc; +} + XclExpChChart& XclExpChRoot::GetChartData() const { return mxChData->mrChartData; @@ -282,6 +296,36 @@ void XclExpChRoot::SetSystemColor( Color& rColor, sal_uInt32& rnColorId, sal_uIn rnColorId = XclExpPalette::GetColorIdFromIndex( nSysColorIdx ); } +sal_uInt16 XclExpChRoot::CalcChartXFromHmm( sal_Int32 nPosX ) const +{ + return ::limit_cast< sal_uInt16, double >( (nPosX - mxChData->mnBorderGapX) / mxChData->mfUnitSizeX, 0, EXC_CHART_TOTALUNITS ); +} + +sal_uInt16 XclExpChRoot::CalcChartYFromHmm( sal_Int32 nPosY ) const +{ + return ::limit_cast< sal_uInt16, double >( (nPosY - mxChData->mnBorderGapY) / mxChData->mfUnitSizeY, 0, EXC_CHART_TOTALUNITS ); +} + +XclChRectangle XclExpChRoot::CalcChartRectFromHmm( const ::com::sun::star::awt::Rectangle& rRect ) const +{ + XclChRectangle aRect; + aRect.mnX = CalcChartXFromHmm( rRect.X ); + aRect.mnY = CalcChartYFromHmm( rRect.Y ); + aRect.mnWidth = CalcChartXFromHmm( rRect.Width ); + aRect.mnHeight = CalcChartYFromHmm( rRect.Height ); + return aRect; +} + +sal_uInt16 XclExpChRoot::CalcChartXFromRelative( double fPosX ) const +{ + return CalcChartXFromHmm( static_cast< sal_Int32 >( fPosX * mxChData->maChartRect.GetWidth() + 0.5 ) ); +} + +sal_uInt16 XclExpChRoot::CalcChartYFromRelative( double fPosY ) const +{ + return CalcChartYFromHmm( static_cast< sal_Int32 >( fPosY * mxChData->maChartRect.GetHeight() + 0.5 ) ); +} + void XclExpChRoot::ConvertLineFormat( XclChLineFormat& rLineFmt, const ScfPropertySet& rPropSet, XclChPropertyMode ePropMode ) const { @@ -395,6 +439,20 @@ void XclExpChFutureRecordBase::Save( XclExpStream& rStrm ) // Frame formatting =========================================================== +XclExpChFramePos::XclExpChFramePos( sal_uInt16 nTLMode, sal_uInt16 nBRMode ) : + XclExpRecord( EXC_ID_CHFRAMEPOS, 20 ) +{ + maData.mnTLMode = nTLMode; + maData.mnBRMode = nBRMode; +} + +void XclExpChFramePos::WriteBody( XclExpStream& rStrm ) +{ + rStrm << maData.mnTLMode << maData.mnBRMode << maData.maRect; +} + +// ---------------------------------------------------------------------------- + XclExpChLineFormat::XclExpChLineFormat( const XclExpChRoot& rRoot ) : XclExpRecord( EXC_ID_CHLINEFORMAT, (rRoot.GetBiff() == EXC_BIFF8) ? 12 : 10 ), mnColorId( XclExpPalette::GetColorIdFromIndex( EXC_COLOR_CHWINDOWTEXT ) ) @@ -2136,17 +2194,73 @@ XclExpChLegend::XclExpChLegend( const XclExpChRoot& rRoot ) : void XclExpChLegend::Convert( const ScfPropertySet& rPropSet ) { + namespace cssc = ::com::sun::star::chart2; + // frame properties mxFrame = lclCreateFrame( GetChRoot(), rPropSet, EXC_CHOBJTYPE_LEGEND ); // text properties mxText.reset( new XclExpChText( GetChRoot() ) ); mxText->ConvertLegend( rPropSet ); - // special legend properties - GetChartPropSetHelper().ReadLegendProperties( maData, rPropSet ); + + // legend position + Any aRelPosAny; + rPropSet.GetAnyProperty( aRelPosAny, EXC_CHPROP_RELATIVEPOSITION ); + if( aRelPosAny.hasValue() ) + { + 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. */ + 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 ); + // manual legend position implies manual plot area + GetChartData().SetManualPlotArea(); + maData.mnDockMode = EXC_CHLEGEND_NOTDOCKED; + } + catch( Exception& ) + { + OSL_ENSURE( false, "XclExpChLegend::Convert - cannot get legend shape" ); + maData.mnDockMode = EXC_CHLEGEND_RIGHT; + } + } + else + { + cssc::LegendPosition eApiPos = cssc::LegendPosition_CUSTOM; + rPropSet.GetProperty( eApiPos, EXC_CHPROP_ANCHORPOSITION ); + switch( eApiPos ) + { + case cssc::LegendPosition_LINE_START: maData.mnDockMode = EXC_CHLEGEND_LEFT; break; + case cssc::LegendPosition_LINE_END: maData.mnDockMode = EXC_CHLEGEND_RIGHT; break; + case cssc::LegendPosition_PAGE_START: maData.mnDockMode = EXC_CHLEGEND_TOP; break; + case cssc::LegendPosition_PAGE_END: maData.mnDockMode = EXC_CHLEGEND_BOTTOM; break; + default: + OSL_ENSURE( false, "XclExpChLegend::Convert - unrecognized legend position" ); + maData.mnDockMode = EXC_CHLEGEND_RIGHT; + } + } + + // legend expansion + cssc::LegendExpansion eApiExpand = cssc::LegendExpansion_BALANCED; + rPropSet.GetProperty( eApiExpand, EXC_CHPROP_EXPANSION ); + ::set_flag( maData.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand != cssc::LegendExpansion_WIDE ); + + // other flags + ::set_flag( maData.mnFlags, EXC_CHLEGEND_AUTOSERIES ); + const sal_uInt16 nAutoFlags = EXC_CHLEGEND_DOCKED | EXC_CHLEGEND_AUTOPOSX | EXC_CHLEGEND_AUTOPOSY; + ::set_flag( maData.mnFlags, nAutoFlags, maData.mnDockMode != EXC_CHLEGEND_NOTDOCKED ); } void XclExpChLegend::WriteSubRecords( XclExpStream& rStrm ) { + lclSaveRecord( rStrm, mxFramePos ); lclSaveRecord( rStrm, mxText ); lclSaveRecord( rStrm, mxFrame ); } @@ -2887,6 +3001,24 @@ sal_uInt16 XclExpChAxesSet::Convert( Reference< XDiagram > xDiagram, sal_uInt16 } } + // inner and outer plot area position and size + try + { + Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW ); + Reference< ::com::sun::star::chart::XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW ); + // set manual flag in chart data + if( !xPositioning->isAutomaticDiagramPositioning() ) + GetChartData().SetManualPlotArea(); + // the CHAXESSET record contains the inner plot area + maData.maRect = CalcChartRectFromHmm( xPositioning->calculateDiagramPositionExcludingAxes() ); + // the embedded CHFRAMEPOS record contains the outer plot area + mxFramePos.reset( new XclExpChFramePos( EXC_CHFRAMEPOS_PARENT, EXC_CHFRAMEPOS_PARENT ) ); + mxFramePos->GetFramePosData().maRect = CalcChartRectFromHmm( xPositioning->calculateDiagramPositionIncludingAxes() ); + } + catch( Exception& ) + { + } + // return first unused chart type group index for next axes set return nGroupIdx; } @@ -2899,6 +3031,7 @@ bool XclExpChAxesSet::Is3dChart() const void XclExpChAxesSet::WriteSubRecords( XclExpStream& rStrm ) { + lclSaveRecord( rStrm, mxFramePos ); lclSaveRecord( rStrm, mxXAxis ); lclSaveRecord( rStrm, mxYAxis ); lclSaveRecord( rStrm, mxZAxis ); @@ -2962,6 +3095,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot, // global chart properties (default values) ::set_flag( maProps.mnFlags, EXC_CHPROPS_MANSERIES ); ::set_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISIBLEONLY, false ); + ::set_flag( maProps.mnFlags, EXC_CHPROPS_MANPLOTAREA ); maProps.mnEmptyMode = EXC_CHPROPS_EMPTY_SKIP; // always create both axes set objects @@ -3036,6 +3170,13 @@ void XclExpChChart::SetDataLabel( XclExpChTextRef xText ) maLabels.AppendRecord( xText ); } +void XclExpChChart::SetManualPlotArea() +{ + // this flag does not exist in BIFF5 + if( GetBiff() == EXC_BIFF8 ) + ::set_flag( maProps.mnFlags, EXC_CHPROPS_USEMANPLOTAREA ); +} + void XclExpChChart::WriteSubRecords( XclExpStream& rStrm ) { // background format diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 15c9e652c641..88ddf5a54661 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -806,7 +806,7 @@ XclExpChartObj::XclExpChartObj( const XclExpRoot& rRoot, Reference< XShape > xSh aShapeProp.GetProperty( xModel, CREATE_OUSTRING( "Model" ) ); ::com::sun::star::awt::Rectangle aBoundRect; aShapeProp.GetProperty( aBoundRect, CREATE_OUSTRING( "BoundRect" ) ); - Rectangle aChartRect( aBoundRect.X, aBoundRect.Y, aBoundRect.Width, aBoundRect.Height ); + Rectangle aChartRect( Point( aBoundRect.X, aBoundRect.Y ), Size( aBoundRect.Width, aBoundRect.Height ) ); mxChart.reset( new XclExpChart( rRoot, xModel, aChartRect ) ); } diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx old mode 100644 new mode 100755 index 346ed2671f06..42931572b710 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +60,8 @@ #include #include #include +#include +#include #include #include #include @@ -97,6 +100,8 @@ using ::com::sun::star::frame::XModel; using ::com::sun::star::util::XNumberFormatsSupplier; using ::com::sun::star::drawing::XShape; +using ::com::sun::star::chart::XDiagramPositioning; + using ::com::sun::star::chart2::XChartDocument; using ::com::sun::star::chart2::XDiagram; using ::com::sun::star::chart2::XCoordinateSystemContainer; @@ -267,6 +272,15 @@ sal_Int32 XclImpChRoot::CalcHmmFromChartY( sal_uInt16 nPosY ) const return static_cast< sal_Int32 >( mxChData->mfUnitSizeY * nPosY + mxChData->mnBorderGapY + 0.5 ); } +::com::sun::star::awt::Rectangle XclImpChRoot::CalcHmmFromChartRect( const XclChRectangle& rRect ) const +{ + return ::com::sun::star::awt::Rectangle( + CalcHmmFromChartX( rRect.mnX ), + CalcHmmFromChartY( rRect.mnY ), + CalcHmmFromChartX( rRect.mnWidth ), + CalcHmmFromChartY( rRect.mnHeight ) ); +} + double XclImpChRoot::CalcRelativeFromChartX( sal_uInt16 nPosX ) const { return static_cast< double >( CalcHmmFromChartX( nPosX ) ) / mxChData->maChartRect.GetWidth(); @@ -1119,12 +1133,14 @@ void lclUpdateText( XclImpChTextRef& rxText, XclImpChTextRef xDefText ) rxText = xDefText; } -void lclFinalizeTitle( XclImpChTextRef& rxTitle, XclImpChTextRef xDefText ) +void lclFinalizeTitle( XclImpChTextRef& rxTitle, XclImpChTextRef xDefText, const String& rAutoTitle ) { /* Do not update a title, if it is not visible (if rxTitle is null). Existing reference indicates enabled title. */ if( rxTitle.is() ) { + if( !rxTitle->HasString() ) + rxTitle->SetString( rAutoTitle ); if( rxTitle->HasString() ) rxTitle->UpdateText( xDefText.get() ); else @@ -2301,6 +2317,10 @@ void XclImpChLegend::ReadSubRecord( XclImpStream& rStrm ) { switch( rStrm.GetRecId() ) { + case EXC_ID_CHFRAMEPOS: + mxFramePos.reset( new XclImpChFramePos ); + mxFramePos->ReadChFramePos( rStrm ); + break; case EXC_ID_CHTEXT: mxText.reset( new XclImpChText( GetChRoot() ) ); mxText->ReadRecordGroup( rStrm ); @@ -2326,7 +2346,9 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const Reference< XLegend > xLegend( ScfApiHelper::CreateInstance( SERVICE_CHART2_LEGEND ), UNO_QUERY ); if( xLegend.is() ) { + namespace cssc = ::com::sun::star::chart2; ScfPropertySet aLegendProp( xLegend ); + aLegendProp.SetBoolProperty( EXC_CHPROP_SHOW, true ); // frame properties if( mxFrame.is() ) @@ -2334,8 +2356,69 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const // text properties if( mxText.is() ) mxText->ConvertFont( aLegendProp ); - // special legend properties - GetChartPropSetHelper().WriteLegendProperties( aLegendProp, maData ); + + /* Legend position and size. Default positions are used only if the + plot area is positioned automatically (Excel sets the plot area to + manual mode, if the legend is moved or resized). With manual plot + areas, Excel ignores the value in maData.mnDockMode completely. */ + cssc::LegendPosition eApiPos = cssc::LegendPosition_CUSTOM; + cssc::LegendExpansion eApiExpand = cssc::LegendExpansion_BALANCED; + if( !GetChartData().IsManualPlotArea() ) switch( maData.mnDockMode ) + { + case EXC_CHLEGEND_LEFT: eApiPos = cssc::LegendPosition_LINE_START; eApiExpand = cssc::LegendExpansion_HIGH; break; + case EXC_CHLEGEND_RIGHT: eApiPos = cssc::LegendPosition_LINE_END; eApiExpand = cssc::LegendExpansion_HIGH; break; + case EXC_CHLEGEND_TOP: eApiPos = cssc::LegendPosition_PAGE_START; eApiExpand = cssc::LegendExpansion_WIDE; break; + case EXC_CHLEGEND_BOTTOM: eApiPos = cssc::LegendPosition_PAGE_END; eApiExpand = cssc::LegendExpansion_WIDE; break; + // top-right not supported + case EXC_CHLEGEND_CORNER: eApiPos = cssc::LegendPosition_LINE_END; eApiExpand = cssc::LegendExpansion_HIGH; break; + } + + // no automatic position: try to find the correct position and size + if( eApiPos == cssc::LegendPosition_CUSTOM ) + { + const XclChFramePos* pFramePos = mxFramePos.is() ? &mxFramePos->GetFramePosData() : 0; + + /* Legend position. Only the settings from the CHFRAMEPOS record + are used by Excel, the position in the CHLEGEND record will be + 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; + aLegendProp.SetProperty( EXC_CHPROP_RELATIVEPOSITION, aRelPos ); + } + else + { + // no manual position found, just go for the default + eApiPos = cssc::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) ) + { + // automatic size: determine entry direction from flags + eApiExpand = ::get_flagvalue( maData.mnFlags, EXC_CHLEGEND_STACKED, + cssc::LegendExpansion_HIGH, cssc::LegendExpansion_WIDE ); + } + 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::LegendExpansion_WIDE; + else if( fRatio < 0.75 ) + eApiExpand = cssc::LegendExpansion_HIGH; + else + eApiExpand = cssc::LegendExpansion_BALANCED; + } + } + aLegendProp.SetProperty( EXC_CHPROP_ANCHORPOSITION, eApiPos ); + aLegendProp.SetProperty( EXC_CHPROP_EXPANSION, eApiExpand ); } return xLegend; } @@ -3156,8 +3239,8 @@ void XclImpChAxesSet::ReadSubRecord( XclImpStream& rStrm ) switch( rStrm.GetRecId() ) { case EXC_ID_CHFRAMEPOS: - mxPos.reset( new XclImpChFramePos ); - mxPos->ReadChFramePos( rStrm ); + mxFramePos.reset( new XclImpChFramePos ); + mxFramePos->ReadChFramePos( rStrm ); break; case EXC_ID_CHAXIS: ReadChAxis( rStrm ); @@ -3208,9 +3291,10 @@ void XclImpChAxesSet::Finalize() // finalize axis titles XclImpChTextRef xDefText = GetChartData().GetDefaultText( EXC_CHTEXTTYPE_AXISTITLE ); - lclFinalizeTitle( mxXAxisTitle, xDefText ); - lclFinalizeTitle( mxYAxisTitle, xDefText ); - lclFinalizeTitle( mxZAxisTitle, xDefText ); + String aAutoTitle = CREATE_STRING( "Axis Title" ); + lclFinalizeTitle( mxXAxisTitle, xDefText, aAutoTitle ); + lclFinalizeTitle( mxYAxisTitle, xDefText, aAutoTitle ); + lclFinalizeTitle( mxZAxisTitle, xDefText, aAutoTitle ); // #i47745# missing plot frame -> invisible border and area if( !mxPlotFrame ) @@ -3536,6 +3620,12 @@ XclImpChTextRef XclImpChChart::GetDefaultText( XclChTextType eTextType ) const return maDefTexts.get( nDefTextId ); } +bool XclImpChChart::IsManualPlotArea() const +{ + // there is no real automatic mode in BIFF5 charts + return (GetBiff() <= EXC_BIFF5) || ::get_flag( maProps.mnFlags, EXC_CHPROPS_USEMANPLOTAREA ); +} + void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressBar& rProgress, const Rectangle& rChartRect ) const { // initialize conversion (locks the model to suppress any internal updates) @@ -3572,13 +3662,15 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB /* Following all conversions needing the old Chart1 API that involves full initialization of the chart view. */ - Reference< com::sun::star::chart::XChartDocument > xChart1Doc( xChartDoc, UNO_QUERY ); + Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( xChartDoc, UNO_QUERY ); if( xChart1Doc.is() ) { + Reference< ::com::sun::star::chart::XDiagram > xDiagram1 = xChart1Doc->getDiagram(); + /* Set the 'IncludeHiddenCells' property via the old API as only this ensures that the data provider and all created sequences get this flag correctly. */ - ScfPropertySet aDiaProp( xChart1Doc->getDiagram() ); + ScfPropertySet aDiaProp( xDiagram1 ); bool bShowVisCells = ::get_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISIBLEONLY ); aDiaProp.SetBoolProperty( EXC_CHPROP_INCLUDEHIDDENCELLS, !bShowVisCells ); @@ -3588,7 +3680,20 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB mxTitle->ConvertMainTitlePos( xChart1Doc->getTitle() ); // plot area position and size (there is no real automatic mode in BIFF5 charts) - bool bManualPlotArea = (GetBiff() <= EXC_BIFF5) || ::get_flag( maProps.mnFlags, EXC_CHPROPS_USEMANPLOTAREA ); + XclImpChFramePosRef xPlotAreaPos = mxPrimAxesSet->GetPlotAreaPosition(); + if( IsManualPlotArea() && xPlotAreaPos.is() ) try + { + const XclChFramePos& rFramePos = xPlotAreaPos->GetFramePosData(); + if( (rFramePos.mnTLMode == EXC_CHFRAMEPOS_PARENT) && (rFramePos.mnBRMode == EXC_CHFRAMEPOS_PARENT) ) + { + Reference< XDiagramPositioning > xPositioning( xDiagram1, UNO_QUERY_THROW ); + ::com::sun::star::awt::Rectangle aDiagramRect = CalcHmmFromChartRect( rFramePos.maRect ); + xPositioning->setDiagramPositionIncludingAxes( aDiagramRect ); + } + } + catch( Exception& ) + { + } } // unlock the model @@ -3707,21 +3812,24 @@ void XclImpChChart::FinalizeDataFormats() void XclImpChChart::FinalizeTitle() { - if( (!mxTitle || (!mxTitle->IsDeleted() && !mxTitle->HasString())) && !mxSecnAxesSet->IsValidAxesSet() ) + // special handling for auto-generated title + String aAutoTitle; + if( !mxTitle || (!mxTitle->IsDeleted() && !mxTitle->HasString()) ) { - /* Chart title is auto-generated from series title, if there is only - one series with title in the chart. */ - const String& rSerTitle = mxPrimAxesSet->GetSingleSeriesTitle(); - if( rSerTitle.Len() > 0 ) + // automatic title from first series name (if there are no series on secondary axes set) + if( !mxSecnAxesSet->IsValidAxesSet() ) + aAutoTitle = mxPrimAxesSet->GetSingleSeriesTitle(); + if( mxTitle.is() || (aAutoTitle.Len() > 0) ) { if( !mxTitle ) mxTitle.reset( new XclImpChText( GetChRoot() ) ); - mxTitle->SetString( rSerTitle ); + if( aAutoTitle.Len() == 0 ) + aAutoTitle = CREATE_STRING( "Chart Title" ); } } - // will reset mxTitle, if it does not contain a string - lclFinalizeTitle( mxTitle, GetDefaultText( EXC_CHTEXTTYPE_TITLE ) ); + // will reset mxTitle, if it does not contain a string and no auto title exists + lclFinalizeTitle( mxTitle, GetDefaultText( EXC_CHTEXTTYPE_TITLE ), aAutoTitle ); } Reference< XDiagram > XclImpChChart::CreateDiagram() const diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx old mode 100644 new mode 100755 index c2ca153548f4..e28704de3ab9 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -41,9 +41,6 @@ #include #include #include -#include -#include -#include #include #include @@ -682,10 +679,6 @@ const sal_Char* const sppcHatchNamesFilled[] = { "FillStyle", "HatchName", "Colo /** Property names for bitmap area style. */ const sal_Char* const sppcBitmapNames[] = { "FillStyle", "FillBitmapName", "FillBitmapMode", 0 }; -/** Property names for legend properties. */ -const sal_Char* const sppcLegendNames[] = - { "Show", "AnchorPosition", "Expansion", "RelativePosition", 0 }; - } // namespace // ---------------------------------------------------------------------------- @@ -700,8 +693,7 @@ XclChPropSetHelper::XclChPropSetHelper() : maGradHlpFilled( sppcGradNamesFilled ), maHatchHlpCommon( sppcHatchNamesCommon ), maHatchHlpFilled( sppcHatchNamesFilled ), - maBitmapHlp( sppcBitmapNames ), - maLegendHlp( sppcLegendNames ) + maBitmapHlp( sppcBitmapNames ) { } @@ -959,46 +951,6 @@ sal_uInt16 XclChPropSetHelper::ReadRotationProperties( const ScfPropertySet& rPr XclTools::GetXclRotation( static_cast< sal_Int32 >( fAngle * 100.0 + 0.5 ) ); } -void XclChPropSetHelper::ReadLegendProperties( XclChLegend& rLegend, const ScfPropertySet& rPropSet ) -{ - namespace cssc = ::com::sun::star::chart2; - namespace cssd = ::com::sun::star::drawing; - - // read the properties - bool bShow; - cssc::LegendPosition eApiPos; - cssc::LegendExpansion eApiExpand; - Any aRelPosAny; - maLegendHlp.ReadFromPropertySet( rPropSet ); - maLegendHlp >> bShow >> eApiPos >> eApiExpand >> aRelPosAny; - DBG_ASSERT( bShow, "XclChPropSetHelper::ReadLegendProperties - legend must be visible" ); - - // legend position - switch( eApiPos ) - { - case cssc::LegendPosition_LINE_START: rLegend.mnDockMode = EXC_CHLEGEND_LEFT; break; - case cssc::LegendPosition_LINE_END: rLegend.mnDockMode = EXC_CHLEGEND_RIGHT; break; - case cssc::LegendPosition_PAGE_START: rLegend.mnDockMode = EXC_CHLEGEND_TOP; break; - case cssc::LegendPosition_PAGE_END: rLegend.mnDockMode = EXC_CHLEGEND_BOTTOM; break; - default: rLegend.mnDockMode = EXC_CHLEGEND_NOTDOCKED; - } - // legend expansion - ::set_flag( rLegend.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand != cssc::LegendExpansion_WIDE ); - // legend position - if( rLegend.mnDockMode == EXC_CHLEGEND_NOTDOCKED ) - { - cssc::RelativePosition aRelPos; - if( aRelPosAny >>= aRelPos ) - { - rLegend.maRect.mnX = limit_cast< sal_Int32 >( aRelPos.Primary * 4000.0, 0, 4000 ); - rLegend.maRect.mnY = limit_cast< sal_Int32 >( aRelPos.Secondary * 4000.0, 0, 4000 ); - } - else - rLegend.mnDockMode = EXC_CHLEGEND_LEFT; - } - ::set_flag( rLegend.mnFlags, EXC_CHLEGEND_DOCKED, rLegend.mnDockMode != EXC_CHLEGEND_NOTDOCKED ); -} - // write properties ----------------------------------------------------------- void XclChPropSetHelper::WriteLineProperties( @@ -1209,51 +1161,6 @@ void XclChPropSetHelper::WriteRotationProperties( } } -void XclChPropSetHelper::WriteLegendProperties( - ScfPropertySet& rPropSet, const XclChLegend& rLegend ) -{ - namespace cssc = ::com::sun::star::chart2; - namespace cssd = ::com::sun::star::drawing; - - // legend position - cssc::LegendPosition eApiPos = cssc::LegendPosition_CUSTOM; - switch( rLegend.mnDockMode ) - { - case EXC_CHLEGEND_LEFT: eApiPos = cssc::LegendPosition_LINE_START; break; - case EXC_CHLEGEND_RIGHT: eApiPos = cssc::LegendPosition_LINE_END; break; - case EXC_CHLEGEND_TOP: eApiPos = cssc::LegendPosition_PAGE_START; break; - case EXC_CHLEGEND_BOTTOM: eApiPos = cssc::LegendPosition_PAGE_END; break; - } - // legend expansion - cssc::LegendExpansion eApiExpand = ::get_flagvalue( - rLegend.mnFlags, EXC_CHLEGEND_STACKED, cssc::LegendExpansion_HIGH, cssc::LegendExpansion_WIDE ); - // legend position - Any aRelPosAny; - if( eApiPos == cssc::LegendPosition_CUSTOM ) - { - // #i71697# it is not possible to set the size directly, do some magic here - double fRatio = ((rLegend.maRect.mnWidth > 0) && (rLegend.maRect.mnHeight > 0)) ? - (static_cast< double >( rLegend.maRect.mnWidth ) / rLegend.maRect.mnHeight) : 1.0; - if( fRatio > 1.5 ) - eApiExpand = cssc::LegendExpansion_WIDE; - else if( fRatio < 0.75 ) - eApiExpand = cssc::LegendExpansion_HIGH; - else - eApiExpand = cssc::LegendExpansion_BALANCED; - // set position - cssc::RelativePosition aRelPos; - aRelPos.Primary = rLegend.maRect.mnX / 4000.0; - aRelPos.Secondary = rLegend.maRect.mnY / 4000.0; - aRelPos.Anchor = cssd::Alignment_TOP_LEFT; - aRelPosAny <<= aRelPos; - } - - // write the properties - maLegendHlp.InitializeWrite(); - maLegendHlp << true << eApiPos << eApiExpand << aRelPosAny; - maLegendHlp.WriteToPropertySet( rPropSet ); -} - // private -------------------------------------------------------------------- ScfPropSetHelper& XclChPropSetHelper::GetLineHelper( XclChPropertyMode ePropMode ) @@ -1326,8 +1233,9 @@ void XclChRootData::InitConversion( const XclRoot& rRoot, const Reference< XChar mnBorderGapX = rRoot.GetHmmFromPixelX( 5.0 ); mnBorderGapY = rRoot.GetHmmFromPixelY( 5.0 ); - mfUnitSizeX = static_cast< double >( maChartRect.GetWidth() - 2 * mnBorderGapX ) / EXC_CHART_TOTALUNITS; - mfUnitSizeY = static_cast< double >( maChartRect.GetHeight() - 2 * mnBorderGapY ) / EXC_CHART_TOTALUNITS; + // size of a chart unit in 1/100 mm + mfUnitSizeX = ::std::max< double >( maChartRect.GetWidth() - 2 * mnBorderGapX, mnBorderGapX ) / EXC_CHART_TOTALUNITS; + mfUnitSizeY = ::std::max< double >( maChartRect.GetHeight() - 2 * mnBorderGapY, mnBorderGapY ) / EXC_CHART_TOTALUNITS; // create object tables Reference< XMultiServiceFactory > xFactory( mxChartDoc, UNO_QUERY ); diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index 98f32a1dfef3..b9bd474fc545 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -41,6 +41,10 @@ class Size; namespace com { namespace sun { namespace star { + namespace awt + { + struct Rectangle; + } namespace frame { class XModel; @@ -87,6 +91,8 @@ public: /** Returns this root instance - for code readability in derived classes. */ inline const XclExpChRoot& GetChRoot() const { return *this; } + /** Returns the API Chart document model. */ + XChartDocRef GetChartDocument() const; /** Returns a reference to the parent chart data object. */ XclExpChChart& GetChartData() const; /** Returns chart type info for a unique chart type identifier. */ @@ -107,6 +113,18 @@ public: /** Sets a system color and the respective color identifier. */ void SetSystemColor( Color& rColor, sal_uInt32& rnColorId, sal_uInt16 nSysColorIdx ) const; + /** Converts the passed horizontal coordinate from 1/100 mm to Excel chart units. */ + sal_uInt16 CalcChartXFromHmm( sal_Int32 nPosX ) const; + /** Converts the passed vertical coordinate from 1/100 mm to Excel chart units. */ + sal_uInt16 CalcChartYFromHmm( sal_Int32 nPosY ) const; + /** Converts the passed rectangle from 1/100 mm to Excel chart units. */ + XclChRectangle CalcChartRectFromHmm( const ::com::sun::star::awt::Rectangle& rRect ) const; + + /** Converts the passed horizontal coordinate from a relative position to Excel chart units. */ + sal_uInt16 CalcChartXFromRelative( double fPosX ) const; + /** Converts the passed vertical coordinate from a relative position to Excel chart units. */ + sal_uInt16 CalcChartYFromRelative( double fPosY ) const; + /** Reads all line properties from the passed property set. */ void ConvertLineFormat( XclChLineFormat& rLineFmt, @@ -193,6 +211,25 @@ public: // Frame formatting =========================================================== +class XclExpChFramePos : public XclExpRecord +{ +public: + explicit XclExpChFramePos( sal_uInt16 nTLMode, sal_uInt16 nBRMode ); + + /** Returns read/write access to the frame position data. */ + inline XclChFramePos& GetFramePosData() { return maData; } + +private: + virtual void WriteBody( XclExpStream& rStrm ); + +private: + XclChFramePos maData; /// Position of the frame. +}; + +typedef ScfRef< XclExpChFramePos > XclExpChFramePosRef; + +// ---------------------------------------------------------------------------- + class XclExpChLineFormat : public XclExpRecord { public: @@ -832,8 +869,8 @@ typedef ScfRef< XclExpChChart3d > XclExpChChart3dRef; /** Represents the CHLEGEND record group describing the chart legend. - The CHLEGEND group consists of: CHLEGEND, CHBEGIN, CHFRAME group, - CHTEXT group, CHEND. + The CHLEGEND group consists of: CHLEGEND, CHBEGIN, CHFRAMEPOS, CHFRAME + group, CHTEXT group, CHEND. */ class XclExpChLegend : public XclExpChGroupBase { @@ -851,6 +888,7 @@ private: private: XclChLegend maData; /// Contents of the CHLEGEND record. + XclExpChFramePosRef mxFramePos; /// Legend frame position (CHFRAMEPOS record). XclExpChTextRef mxText; /// Legend text format (CHTEXT group). XclExpChFrameRef mxFrame; /// Legend frame format (CHFRAME group). }; @@ -1139,6 +1177,7 @@ private: typedef XclExpRecordList< XclExpChTypeGroup > XclExpChTypeGroupList; XclChAxesSet maData; /// Contents of the CHAXESSET record. + XclExpChFramePosRef mxFramePos; /// Outer plot area position (CHFRAMEPOS record). XclExpChAxisRef mxXAxis; /// The X axis (CHAXIS group). XclExpChAxisRef mxYAxis; /// The Y axis (CHAXIS group). XclExpChAxisRef mxZAxis; /// The Z axis (CHAXIS group). @@ -1174,6 +1213,8 @@ public: void RemoveLastSeries(); /** Stores a CHTEXT group that describes a data point label. */ void SetDataLabel( XclExpChTextRef xText ); + /** Sets the plot area position and size to manual mode. */ + void SetManualPlotArea(); /** Writes all embedded records. */ virtual void WriteSubRecords( XclExpStream& rStrm ); diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index 814187760667..e0994f33d1d6 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -45,6 +45,10 @@ #include "xiroot.hxx" namespace com { namespace sun { namespace star { + namespace awt + { + struct Rectangle; + } namespace frame { class XModel; @@ -122,10 +126,16 @@ public: /** Returns the data provider for the chart document. */ XDataProviderRef GetDataProvider() const; + /** Converts the passed horizontal coordinate from Excel chart units into 1/100 mm. */ sal_Int32 CalcHmmFromChartX( sal_uInt16 nPosX ) const; + /** Converts the passed vertical coordinate from Excel chart units into 1/100 mm. */ sal_Int32 CalcHmmFromChartY( sal_uInt16 nPosY ) const; + /** 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 Excel chart units into a relative position. */ double CalcRelativeFromChartX( sal_uInt16 nPosX ) const; + /** Converts the passed vertical coordinate from Excel chart units into a relative position. */ double CalcRelativeFromChartY( sal_uInt16 nPosY ) const; /** Writes all line properties to the passed property set. */ @@ -936,8 +946,8 @@ typedef ScfRef< XclImpChChart3d > XclImpChChart3dRef; /** Represents the CHLEGEND record group describing the chart legend. - The CHLEGEND group consists of: CHLEGEND, CHBEGIN, CHFRAME group, - CHTEXT group, CHEND. + The CHLEGEND group consists of: CHLEGEND, CHBEGIN, CHFRAMEPOS, CHFRAME + group, CHTEXT group, CHEND. */ class XclImpChLegend : public XclImpChGroupBase, protected XclImpChRoot { @@ -959,6 +969,7 @@ public: private: XclChLegend maData; /// Contents of the CHLEGEND record. + XclImpChFramePosRef mxFramePos; /// Legend frame position (CHFRAMEPOS record). XclImpChTextRef mxText; /// Legend text format (CHTEXT group). XclImpChFrameRef mxFrame; /// Legend frame format (CHFRAME group). }; @@ -1279,6 +1290,8 @@ public: /** Returns the axes set index used by the chart API. */ inline sal_Int32 GetApiAxesSetIndex() const { return maData.GetApiAxesSetIndex(); } + /** Returns the outer plot area position, if existing. */ + inline XclImpChFramePosRef GetPlotAreaPosition() const { return mxFramePos; } /** Returns the specified chart type group. */ inline XclImpChTypeGroupRef GetTypeGroup( sal_uInt16 nGroupIdx ) const { return maTypeGroups.get( nGroupIdx ); } /** Returns the first chart type group. */ @@ -1318,7 +1331,7 @@ private: typedef ScfRefMap< sal_uInt16, XclImpChTypeGroup > XclImpChTypeGroupMap; XclChAxesSet maData; /// Contents of the CHAXESSET record. - XclImpChFramePosRef mxPos; /// Position of the axes set (CHFRAMEPOS record). + XclImpChFramePosRef mxFramePos; /// Outer plot area position (CHFRAMEPOS record). XclImpChAxisRef mxXAxis; /// The X axis (CHAXIS group). XclImpChAxisRef mxYAxis; /// The Y axis (CHAXIS group). XclImpChAxisRef mxZAxis; /// The Z axis (CHAXIS group). @@ -1365,6 +1378,8 @@ public: XclImpChTypeGroupRef GetTypeGroup( sal_uInt16 nGroupIdx ) const; /** Returns the specified default text. */ XclImpChTextRef GetDefaultText( XclChTextType eTextType ) const; + /** Returns true, if the plot area has benn moved and/or resized manually. */ + bool IsManualPlotArea() const; /** Returns the number of units on the progress bar needed for the chart. */ inline sal_Size GetProgressSize() const { return 2 * EXC_CHART_PROGRESS_SIZE; } diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx old mode 100644 new mode 100755 index 1f10c26a0b01..ca34d4c6833e --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -77,6 +77,7 @@ class XclRoot; #define SERVICE_CHART2_TITLE CREATE_OUSTRING( "com.sun.star.chart2.Title" ) // property names +#define EXC_CHPROP_ANCHORPOSITION CREATE_OUSTRING( "AnchorPosition" ) #define EXC_CHPROP_ARRANGEORDER CREATE_OUSTRING( "ArrangeOrder" ) #define EXC_CHPROP_ATTAXISINDEX CREATE_OUSTRING( "AttachedAxisIndex" ) #define EXC_CHPROP_ATTRIBDATAPOINTS CREATE_OUSTRING( "AttributedDataPoints" ) @@ -99,6 +100,7 @@ class XclRoot; #define EXC_CHPROP_ERRORBARSTYLE CREATE_OUSTRING( "ErrorBarStyle" ) #define EXC_CHPROP_ERRORBARX CREATE_OUSTRING( "ErrorBarX" ) #define EXC_CHPROP_ERRORBARY CREATE_OUSTRING( "ErrorBarY" ) +#define EXC_CHPROP_EXPANSION CREATE_OUSTRING( "Expansion" ) #define EXC_CHPROP_FILLBITMAPMODE CREATE_OUSTRING( "FillBitmapMode" ) #define EXC_CHPROP_FILLSTYLE CREATE_OUSTRING( "FillStyle" ) #define EXC_CHPROP_GAPWIDTHSEQ CREATE_OUSTRING( "GapwidthSequence" ) @@ -122,6 +124,7 @@ class XclRoot; #define EXC_CHPROP_PERCENTDIAGONAL CREATE_OUSTRING( "PercentDiagonal" ) #define EXC_CHPROP_PERSPECTIVE CREATE_OUSTRING( "Perspective" ) #define EXC_CHPROP_POSITIVEERROR CREATE_OUSTRING( "PositiveError" ) +#define EXC_CHPROP_RELATIVEPOSITION CREATE_OUSTRING( "RelativePosition" ) #define EXC_CHPROP_RIGHTANGLEDAXES CREATE_OUSTRING( "RightAngledAxes" ) #define EXC_CHPROP_ROLE CREATE_OUSTRING( "Role" ) #define EXC_CHPROP_ROTATIONHORIZONTAL CREATE_OUSTRING( "RotationHorizontal" ) @@ -1096,7 +1099,7 @@ struct XclChAxis struct XclChAxesSet { - XclChRectangle maRect; /// Position of the axes set. + XclChRectangle maRect; /// Position of the axes set (inner plot area). sal_uInt16 mnAxesSetId; /// Primary/secondary axes set. explicit XclChAxesSet(); @@ -1370,10 +1373,6 @@ public: sal_uInt16 ReadRotationProperties( const ScfPropertySet& rPropSet, bool bSupportsStacked ); - /** Reads all legend properties from the passed property set. */ - void ReadLegendProperties( - XclChLegend& rLegend, - const ScfPropertySet& rPropSet ); /** Writes all line properties to the passed property set. */ void WriteLineProperties( @@ -1404,10 +1403,6 @@ public: ScfPropertySet& rPropSet, sal_uInt16 nRotation, bool bSupportsStacked ); - /** Writes all legend properties to the passed property set. */ - void WriteLegendProperties( - ScfPropertySet& rPropSet, - const XclChLegend& rLegend ); private: /** Returns a line property set helper according to the passed property mode. */ @@ -1430,7 +1425,6 @@ private: ScfPropSetHelper maHatchHlpCommon; /// Properties for hatches in common objects. ScfPropSetHelper maHatchHlpFilled; /// Properties for hatches in filled series. ScfPropSetHelper maBitmapHlp; /// Properties for bitmaps. - ScfPropSetHelper maLegendHlp; /// Properties for legend. }; // ============================================================================ -- cgit v1.2.3 From 0644d0ecc0f703d0714f96890b575580d3b96f59 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 8 Jan 2010 14:51:08 +0100 Subject: chartpositioning: #i86609# missing interface in service description --- offapi/com/sun/star/chart/Diagram.idl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/offapi/com/sun/star/chart/Diagram.idl b/offapi/com/sun/star/chart/Diagram.idl index adeff309518c..9ae02c405242 100644 --- a/offapi/com/sun/star/chart/Diagram.idl +++ b/offapi/com/sun/star/chart/Diagram.idl @@ -38,6 +38,10 @@ #include #endif +#ifndef __com_sun_star_chart_XSecondAxisTitleSupplier_idl__ +#include +#endif + #ifndef __com_sun_star_beans_XPropertySet_idl__ #include #endif @@ -71,6 +75,12 @@ published service Diagram interface com::sun::star::chart::XDiagram; + /** Provides access to the titles of the secondary X axis and Y axis. + + @since OOo 3.0 + */ + [optional] interface com::sun::star::chart::XSecondAxisTitleSupplier; + /** @since OOo 3.3 */ -- cgit v1.2.3 From 5f3fc8b3a73ae4b2213cd46a970fadae38bc7ec5 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 8 Jan 2010 16:45:31 +0100 Subject: chartpositioning: #i86609# import axis title positions from MSOOXML --- oox/inc/oox/drawingml/chart/axisconverter.hxx | 9 -- oox/inc/oox/drawingml/chart/converterbase.hxx | 31 ++++- oox/inc/oox/drawingml/chart/plotareaconverter.hxx | 2 + oox/source/drawingml/chart/axisconverter.cxx | 2 + oox/source/drawingml/chart/chartspaceconverter.cxx | 64 ++-------- oox/source/drawingml/chart/converterbase.cxx | 139 +++++++++++++++++++++ oox/source/drawingml/chart/plotareaconverter.cxx | 37 +++++- oox/source/token/properties.txt | 5 + 8 files changed, 221 insertions(+), 68 deletions(-) diff --git a/oox/inc/oox/drawingml/chart/axisconverter.hxx b/oox/inc/oox/drawingml/chart/axisconverter.hxx index 94054d8ae0e1..ff9763345135 100644 --- a/oox/inc/oox/drawingml/chart/axisconverter.hxx +++ b/oox/inc/oox/drawingml/chart/axisconverter.hxx @@ -45,15 +45,6 @@ namespace chart { // ============================================================================ -const sal_Int32 API_PRIM_AXESSET = 0; -const sal_Int32 API_SECN_AXESSET = 1; - -const sal_Int32 API_X_AXIS = 0; -const sal_Int32 API_Y_AXIS = 1; -const sal_Int32 API_Z_AXIS = 2; - -// ============================================================================ - struct AxisModel; class TypeGroupConverter; diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx index 69e1843ce11d..a20edfcbda5f 100644 --- a/oox/inc/oox/drawingml/chart/converterbase.hxx +++ b/oox/inc/oox/drawingml/chart/converterbase.hxx @@ -39,6 +39,7 @@ namespace com { namespace sun { namespace star { namespace awt { struct Rectangle; } namespace awt { struct Size; } namespace chart2 { class XChartDocument; } + namespace chart2 { class XTitled; } namespace drawing { class XShape; } } } } @@ -50,13 +51,22 @@ namespace oox { namespace drawingml { namespace chart { -// ============================================================================ - class ChartConverter; class ObjectFormatter; struct ChartSpaceModel; struct ConverterData; +// ============================================================================ + +const sal_Int32 API_PRIM_AXESSET = 0; +const sal_Int32 API_SECN_AXESSET = 1; + +const sal_Int32 API_X_AXIS = 0; +const sal_Int32 API_Y_AXIS = 1; +const sal_Int32 API_Z_AXIS = 2; + +// ============================================================================ + class ConverterRoot { public: @@ -85,12 +95,29 @@ protected: /** Returns the object formatter. */ ObjectFormatter& getFormatter() const; + /** Registers the main title object and its layout data, needed for + conversion of the title position using the old Chart1 API. */ + void registerMainTitle( + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitled >& rxTitled, + const ModelRef< LayoutModel >& rxLayout ); + /** Registers an axis title object and its layout data, needed for + conversion of the title position using the old Chart1 API. */ + void registerAxisTitle( + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitled >& rxTitled, + const ModelRef< LayoutModel >& rxLayout, + sal_Int32 nAxesSetIdx, sal_Int32 nAxisIdx ); + /** Converts the positions of the main title and all axis titles. */ + void convertTitlePositions(); + private: ::boost::shared_ptr< ConverterData > mxData; }; // ============================================================================ +/** Base class of all converter classes. Holds a reference to a model structure + of the specified type. + */ template< typename ModelType > class ConverterBase : public ConverterRoot { diff --git a/oox/inc/oox/drawingml/chart/plotareaconverter.hxx b/oox/inc/oox/drawingml/chart/plotareaconverter.hxx index 9a52bfa120c6..6d22d9995cba 100644 --- a/oox/inc/oox/drawingml/chart/plotareaconverter.hxx +++ b/oox/inc/oox/drawingml/chart/plotareaconverter.hxx @@ -87,6 +87,8 @@ public: /** Converts the OOXML plot area model to a chart2 diagram. */ void convertFromModel( View3DModel& rView3DModel ); + /** Converts the manual plot area position and size, if set. */ + void convertPositionFromModel(); /** Returns the automatic chart title if the chart contains only one series. */ inline const ::rtl::OUString& getAutomaticTitle() const { return maAutoTitle; } diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index 36a18117fd04..b586592f8fba 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -311,6 +311,8 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo Reference< XTitled > xTitled( xAxis, UNO_QUERY_THROW ); TitleConverter aTitleConv( *this, *mrModel.mxTitle ); aTitleConv.convertFromModel( xTitled, CREATE_OUSTRING( "Axis Title" ), OBJECTTYPE_AXISTITLE ); + // register the title and layout data for conversion of position + registerAxisTitle( xTitled, mrModel.mxTitle->mxLayout, nAxesSetIdx, nAxisIdx ); } } catch( Exception& ) diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index f0d647f0415a..fe0ba19b5fea 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -32,7 +32,6 @@ #include "oox/drawingml/chart/chartspaceconverter.hxx" #include #include -#include #include #include #include @@ -48,9 +47,7 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; -using ::com::sun::star::awt::Rectangle; using ::com::sun::star::util::XNumberFormatsSupplier; -using ::com::sun::star::chart::XDiagramPositioning; using ::com::sun::star::chart2::XDiagram; using ::com::sun::star::chart2::XTitled; using ::com::sun::star::chart2::data::XDataReceiver; @@ -61,23 +58,6 @@ namespace chart { // ============================================================================ -namespace { - -double lclGetTitleRotation( const Reference< XTitled >& rxTitled ) -{ - double fAngle = 0.0; - if( rxTitled.is() ) - { - PropertySet aTitleProp( rxTitled->getTitleObject() ); - aTitleProp.getProperty( fAngle, PROP_TextRotation ); - } - return fAngle; -} - -} // namespace - -// ---------------------------------------------------------------------------- - ChartSpaceConverter::ChartSpaceConverter( const ConverterRoot& rParent, ChartSpaceModel& rModel ) : ConverterBase< ChartSpaceModel >( rParent, rModel ) { @@ -135,9 +115,12 @@ void ChartSpaceConverter::convertFromModel() { if( aAutoTitle.getLength() == 0 ) aAutoTitle = CREATE_OUSTRING( "Chart Title" ); + TitleModel& rTitle = mrModel.mxTitle.getOrCreate(); Reference< XTitled > xTitled( getChartDocument(), UNO_QUERY_THROW ); - TitleConverter aTitleConv( *this, mrModel.mxTitle.getOrCreate() ); + TitleConverter aTitleConv( *this, rTitle ); aTitleConv.convertFromModel( xTitled, aAutoTitle, OBJECTTYPE_CHARTTITLE ); + // register the title and layout data for conversion of position + registerMainTitle( xTitled, rTitle.mxLayout ); } } catch( Exception& ) @@ -168,7 +151,8 @@ void ChartSpaceConverter::convertFromModel() /* Following all conversions needing the old Chart1 API that involves full initialization of the chart view. */ - Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( getChartDocument(), UNO_QUERY ); + namespace cssc = ::com::sun::star::chart; + Reference< cssc::XChartDocument > xChart1Doc( getChartDocument(), UNO_QUERY ); if( xChart1Doc.is() ) { /* Set the IncludeHiddenCells property via the old API as only this @@ -177,39 +161,11 @@ void ChartSpaceConverter::convertFromModel() PropertySet aDiaProp( xChart1Doc->getDiagram() ); aDiaProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly ); - // title position - PropertySet aDocProp( xChart1Doc ); - if( aDocProp.getBoolProperty( PROP_HasMainTitle ) ) - { - Reference< XTitled > xTitled( getChartDocument(), UNO_QUERY ); - double fAngle = lclGetTitleRotation( xTitled ); - LayoutModel& rLayout = mrModel.mxTitle.getOrCreate().mxLayout.getOrCreate(); - LayoutConverter aLayoutConv( *this, rLayout ); - aLayoutConv.convertFromModel( xChart1Doc->getTitle(), fAngle ); - } - // plot area position and size - LayoutModel& rLayout = mrModel.mxPlotArea.getOrCreate().mxLayout.getOrCreate(); - LayoutConverter aLayoutConv( *this, rLayout ); - Rectangle aDiagramRect; - if( aLayoutConv.calcAbsRectangle( aDiagramRect ) ) try - { - Reference< XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW ); - switch( rLayout.mnTarget ) - { - case XML_inner: - xPositioning->setDiagramPositionExcludingAxes( aDiagramRect ); - break; - case XML_outer: - xPositioning->setDiagramPositionIncludingAxes( aDiagramRect ); - break; - default: - OSL_ENSURE( false, "ChartSpaceConverter::convertFromModel - unknown positioning target" ); - } - } - catch( Exception& ) - { - } + aPlotAreaConv.convertPositionFromModel(); + + // positions of main title and all axis titles + convertTitlePositions(); } } diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index fba7e285aeab..41702b58bd8e 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -35,7 +35,12 @@ #include #include #include +#include +#include +#include +#include #include +#include #include // for F_PI180 #include "properties.hxx" #include "oox/core/xmlfilterbase.hxx" @@ -45,8 +50,10 @@ using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; using ::com::sun::star::uno::Exception; +using ::com::sun::star::uno::RuntimeException; 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::lang::XMultiServiceFactory; using ::com::sun::star::frame::XModel; using ::com::sun::star::awt::Point; @@ -54,15 +61,106 @@ using ::com::sun::star::awt::Rectangle; using ::com::sun::star::awt::Size; using ::com::sun::star::chart2::RelativePosition; using ::com::sun::star::chart2::XChartDocument; +using ::com::sun::star::chart2::XTitled; using ::com::sun::star::drawing::XShape; using ::oox::core::XmlFilterBase; +namespace cssc = ::com::sun::star::chart; + namespace oox { namespace drawingml { namespace chart { // ============================================================================ +namespace { + +/** A helper structure to store all data related to axis titles. Needed for the + conversion of manual axis title positions that needs the old Chart1 API. + */ +struct TitleLayoutInfo +{ + typedef Reference< XShape > (*GetShapeFunc)( const Reference< cssc::XChartDocument >& ); + + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitled > + mxTitled; /// The API title supplier. + ModelRef< LayoutModel > mxLayout; /// The layout model, if existing. + GetShapeFunc mpGetShape; /// Helper function to receive the title shape. + + inline explicit TitleLayoutInfo() : mpGetShape( 0 ) {} + + void convertTitlePos( + ConverterRoot& rRoot, + const Reference< cssc::XChartDocument >& rxChart1Doc ); +}; + +void TitleLayoutInfo::convertTitlePos( ConverterRoot& rRoot, const Reference< cssc::XChartDocument >& rxChart1Doc ) +{ + if( mxTitled.is() && mpGetShape ) try + { + // try to get the title shape + Reference< XShape > xTitleShape( mpGetShape( rxChart1Doc ), UNO_SET_THROW ); + // get title rotation angle, needed for correction of position of top-left edge + double fAngle = 0.0; + PropertySet aTitleProp( mxTitled->getTitleObject() ); + aTitleProp.getProperty( fAngle, PROP_TextRotation ); + // convert the position + LayoutModel& rLayout = mxLayout.getOrCreate(); + LayoutConverter aLayoutConv( rRoot, rLayout ); + aLayoutConv.convertFromModel( xTitleShape, fAngle ); + } + catch( Exception& ) + { + } +} + +// ---------------------------------------------------------------------------- + +typedef ::std::pair< sal_Int32, sal_Int32 > AxisKey; +typedef ::std::map< AxisKey, TitleLayoutInfo > AxisTitleMap; + +// ---------------------------------------------------------------------------- + +/* The following local functions implement getting the XShape interface of all + supported title objects (chart and axes). This needs some effort due to the + design of the old Chart1 API used to access these objects. */ + +/** Returns the drawing shape of the main title, if existing. */ +Reference< XShape > lclGetMainTitleShape( const Reference< cssc::XChartDocument >& rxChart1Doc ) +{ + PropertySet aPropSet( rxChart1Doc ); + if( rxChart1Doc.is() && aPropSet.getBoolProperty( PROP_HasMainTitle ) ) + return rxChart1Doc->getTitle(); + return Reference< XShape >(); +} + +/** Implements a function returning the drawing shape of an axis title, if existing. */ +#define OOX_DEFINEFUNC_GETAXISTITLE( func_name, interface_type, interface_func, property_name ) \ +Reference< XShape > func_name( const Reference< cssc::XChartDocument >& rxChart1Doc ) \ +{ \ + try \ + { \ + Reference< cssc::interface_type > xAxisSupp( rxChart1Doc->getDiagram(), UNO_QUERY_THROW ); \ + PropertySet aPropSet( xAxisSupp ); \ + if( aPropSet.getBoolProperty( PROP_##property_name ) ) \ + return xAxisSupp->interface_func(); \ + } \ + catch( Exception& ) {} \ + return Reference< XShape >(); \ +} + +OOX_DEFINEFUNC_GETAXISTITLE( lclGetXAxisTitleShape, XAxisXSupplier, getXAxisTitle, HasXAxisTitle ) +OOX_DEFINEFUNC_GETAXISTITLE( lclGetYAxisTitleShape, XAxisYSupplier, getYAxisTitle, HasYAxisTitle ) +OOX_DEFINEFUNC_GETAXISTITLE( lclGetZAxisTitleShape, XAxisZSupplier, getZAxisTitle, HasZAxisTitle ) +OOX_DEFINEFUNC_GETAXISTITLE( lclGetSecXAxisTitleShape, XSecondAxisTitleSupplier, getSecondXAxisTitle, HasSecondaryXAxisTitle ) +OOX_DEFINEFUNC_GETAXISTITLE( lclGetSecYAxisTitleShape, XSecondAxisTitleSupplier, getSecondYAxisTitle, HasSecondaryYAxisTitle ) + +#undef OOX_DEFINEFUNC_GETAXISTITLE + +} // namespace + +// ============================================================================ + struct ConverterData { ObjectFormatter maFormatter; @@ -70,6 +168,8 @@ struct ConverterData ChartConverter& mrConverter; Reference< XChartDocument > mxDoc; Size maSize; + TitleLayoutInfo maMainTitle; + AxisTitleMap maAxisTitles; explicit ConverterData( XmlFilterBase& rFilter, @@ -104,6 +204,14 @@ ConverterData::ConverterData( catch( Exception& ) { } + + // prepare conversion of title positions + maMainTitle.mpGetShape = lclGetMainTitleShape; + maAxisTitles[ AxisKey( API_PRIM_AXESSET, API_X_AXIS ) ].mpGetShape = lclGetXAxisTitleShape; + maAxisTitles[ AxisKey( API_PRIM_AXESSET, API_Y_AXIS ) ].mpGetShape = lclGetYAxisTitleShape; + maAxisTitles[ AxisKey( API_PRIM_AXESSET, API_Z_AXIS ) ].mpGetShape = lclGetZAxisTitleShape; + maAxisTitles[ AxisKey( API_SECN_AXESSET, API_X_AXIS ) ].mpGetShape = lclGetSecXAxisTitleShape; + maAxisTitles[ AxisKey( API_SECN_AXESSET, API_Y_AXIS ) ].mpGetShape = lclGetSecYAxisTitleShape; } ConverterData::~ConverterData() @@ -174,6 +282,37 @@ ObjectFormatter& ConverterRoot::getFormatter() const return mxData->maFormatter; } +void ConverterRoot::registerMainTitle( const Reference< XTitled >& rxTitled, const ModelRef< LayoutModel >& rxLayout ) +{ + OSL_ENSURE( rxTitled.is(), "ConverterRoot::registerMainTitle - missing title supplier" ); + mxData->maMainTitle.mxTitled = rxTitled; + mxData->maMainTitle.mxLayout = rxLayout; +} + +void ConverterRoot::registerAxisTitle( const Reference< XTitled >& rxTitled, + const ModelRef< LayoutModel >& rxLayout, sal_Int32 nAxesSetIdx, sal_Int32 nAxisIdx ) +{ + OSL_ENSURE( rxTitled.is(), "ConverterRoot::registerAxisTitle - missing axis title supplier" ); + TitleLayoutInfo& rTitleInfo = mxData->maAxisTitles[ AxisKey( nAxesSetIdx, nAxisIdx ) ]; + OSL_ENSURE( rTitleInfo.mpGetShape, "ConverterRoot::registerAxisTitle - invalid axis key" ); + rTitleInfo.mxTitled = rxTitled; + rTitleInfo.mxLayout = rxLayout; +} + +void ConverterRoot::convertTitlePositions() +{ + try + { + Reference< cssc::XChartDocument > xChart1Doc( mxData->mxDoc, UNO_QUERY_THROW ); + mxData->maMainTitle.convertTitlePos( *this, xChart1Doc ); + for( AxisTitleMap::iterator aIt = mxData->maAxisTitles.begin(), aEnd = mxData->maAxisTitles.end(); aIt != aEnd; ++aIt ) + aIt->second.convertTitlePos( *this, xChart1Doc ); + } + catch( Exception& ) + { + } +} + // ============================================================================ namespace { diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index b4345af3f088..09b783d748f8 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -32,6 +32,8 @@ #include "oox/drawingml/chart/plotareaconverter.hxx" #include #include +#include +#include #include #include #include @@ -45,6 +47,7 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY_THROW; +using ::com::sun::star::awt::Rectangle; using ::com::sun::star::chart2::XCoordinateSystem; using ::com::sun::star::chart2::XCoordinateSystemContainer; using ::com::sun::star::chart2::XDiagram; @@ -57,14 +60,15 @@ namespace chart { namespace { -/** Axes set model. This is a helper class for the plot area converter. */ +/** Axes set model. This is a helper for the plot area converter collecting all + type groups and axes of the primary or secondary axes set. */ struct AxesSetModel { typedef ModelVector< TypeGroupModel > TypeGroupVector; typedef ModelMap< sal_Int32, AxisModel > AxisMap; - TypeGroupVector maTypeGroups; - AxisMap maAxes; + TypeGroupVector maTypeGroups; /// All type groups containing data series. + AxisMap maAxes; /// All axes mapped by API axis type. inline explicit AxesSetModel() {} inline ~AxesSetModel() {} @@ -410,6 +414,33 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) } } +void PlotAreaConverter::convertPositionFromModel() +{ + LayoutModel& rLayout = mrModel.mxLayout.getOrCreate(); + LayoutConverter aLayoutConv( *this, rLayout ); + Rectangle aDiagramRect; + if( aLayoutConv.calcAbsRectangle( aDiagramRect ) ) try + { + namespace cssc = ::com::sun::star::chart; + Reference< cssc::XChartDocument > xChart1Doc( getChartDocument(), UNO_QUERY_THROW ); + Reference< cssc::XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW ); + switch( rLayout.mnTarget ) + { + case XML_inner: + xPositioning->setDiagramPositionExcludingAxes( aDiagramRect ); + break; + case XML_outer: + xPositioning->setDiagramPositionIncludingAxes( aDiagramRect ); + break; + default: + OSL_ENSURE( false, "PlotAreaConverter::convertPositionFromModel - unknown positioning target" ); + } + } + catch( Exception& ) + { + } +} + // ============================================================================ } // namespace chart diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 3efaff69b2ca..6126fc6e10b2 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -167,9 +167,14 @@ HasHorizontalScrollBar HasLayoutInfo HasMainTitle HasReference +HasSecondaryXAxisTitle +HasSecondaryYAxisTitle HasSheetTabs HasSortInfo HasVerticalScrollBar +HasXAxisTitle +HasYAxisTitle +HasZAxisTitle HeaderBodyDistance HeaderHeight HeaderIsDynamicHeight -- cgit v1.2.3 From e0e189e3d88d1127a99d1e3e8203f6c30ef46e3b Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 8 Jan 2010 18:30:12 +0100 Subject: chartpositioning: #i86609# set correct plot area size for pie charts --- sc/source/filter/excel/xechart.cxx | 6 +++++- sc/source/filter/excel/xichart.cxx | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index 1f607efbd0c7..a4f11c4de941 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -3013,7 +3013,11 @@ sal_uInt16 XclExpChAxesSet::Convert( Reference< XDiagram > xDiagram, sal_uInt16 maData.maRect = CalcChartRectFromHmm( xPositioning->calculateDiagramPositionExcludingAxes() ); // the embedded CHFRAMEPOS record contains the outer plot area mxFramePos.reset( new XclExpChFramePos( EXC_CHFRAMEPOS_PARENT, EXC_CHFRAMEPOS_PARENT ) ); - mxFramePos->GetFramePosData().maRect = CalcChartRectFromHmm( xPositioning->calculateDiagramPositionIncludingAxes() ); + // for pie charts, always use inner plot area size to exclude the data labels as Excel does + const XclExpChTypeGroup* pFirstTypeGroup = GetFirstTypeGroup().get(); + bool bPieChart = pFirstTypeGroup && (pFirstTypeGroup->GetTypeInfo().meTypeCateg == EXC_CHTYPECATEG_PIE); + mxFramePos->GetFramePosData().maRect = bPieChart ? maData.maRect : + CalcChartRectFromHmm( xPositioning->calculateDiagramPositionIncludingAxes() ); } catch( Exception& ) { diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 42931572b710..b5aaf8d0c616 100755 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -3688,7 +3688,12 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB { Reference< XDiagramPositioning > xPositioning( xDiagram1, UNO_QUERY_THROW ); ::com::sun::star::awt::Rectangle aDiagramRect = CalcHmmFromChartRect( rFramePos.maRect ); - xPositioning->setDiagramPositionIncludingAxes( aDiagramRect ); + // for pie charts, always set inner plot area size to exclude the data labels as Excel does + const XclImpChTypeGroup* pFirstTypeGroup = mxPrimAxesSet->GetFirstTypeGroup().get(); + if( pFirstTypeGroup && (pFirstTypeGroup->GetTypeInfo().meTypeCateg == EXC_CHTYPECATEG_PIE) ) + xPositioning->setDiagramPositionExcludingAxes( aDiagramRect ); + else + xPositioning->setDiagramPositionIncludingAxes( aDiagramRect ); } } catch( Exception& ) -- cgit v1.2.3 From 561635988f3acd9f3f7396daee62944ba280ff1f Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 8 Jan 2010 18:30:12 +0100 Subject: chartpositioning: #i86609# set correct plot area size for pie charts --- oox/inc/oox/drawingml/chart/plotareaconverter.hxx | 1 + oox/source/drawingml/chart/plotareaconverter.cxx | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/oox/inc/oox/drawingml/chart/plotareaconverter.hxx b/oox/inc/oox/drawingml/chart/plotareaconverter.hxx index 6d22d9995cba..1cad9b905fc9 100644 --- a/oox/inc/oox/drawingml/chart/plotareaconverter.hxx +++ b/oox/inc/oox/drawingml/chart/plotareaconverter.hxx @@ -101,6 +101,7 @@ private: ::rtl::OUString maAutoTitle; bool mb3dChart; bool mbWall3dChart; + bool mbPieChart; }; // ============================================================================ diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index 09b783d748f8..bcd076b0093b 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -97,11 +97,14 @@ public: inline bool is3dChart() const { return mb3dChart; } /** Returns true, if chart type supports wall and floor format in 3D mode. */ inline bool isWall3dChart() const { return mbWall3dChart; } + /** Returns true, if chart is a pie chart or doughnut chart. */ + inline bool isPieChart() const { return mbPieChart; } private: ::rtl::OUString maAutoTitle; bool mb3dChart; bool mbWall3dChart; + bool mbPieChart; }; // ---------------------------------------------------------------------------- @@ -109,7 +112,8 @@ private: AxesSetConverter::AxesSetConverter( const ConverterRoot& rParent, AxesSetModel& rModel ) : ConverterBase< AxesSetModel >( rParent, rModel ), mb3dChart( false ), - mbWall3dChart( false ) + mbWall3dChart( false ), + mbPieChart( false ) { } @@ -166,6 +170,7 @@ void AxesSetConverter::convertFromModel( const Reference< XDiagram >& rxDiagram, // 3D view settings mb3dChart = rFirstTypeGroup.is3dChart(); mbWall3dChart = rFirstTypeGroup.isWall3dChart(); + mbPieChart = rFirstTypeGroup.getTypeInfo().meTypeCategory == TYPECATEGORY_PIE; if( mb3dChart ) { View3DConverter aView3DConv( *this, rView3DModel ); @@ -312,7 +317,8 @@ void WallFloorConverter::convertFromModel( const Reference< XDiagram >& rxDiagra PlotAreaConverter::PlotAreaConverter( const ConverterRoot& rParent, PlotAreaModel& rModel ) : ConverterBase< PlotAreaModel >( rParent, rModel ), mb3dChart( false ), - mbWall3dChart( false ) + mbWall3dChart( false ), + mbPieChart( false ) { } @@ -399,6 +405,7 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) maAutoTitle = aAxesSetConv.getAutomaticTitle(); mb3dChart = aAxesSetConv.is3dChart(); mbWall3dChart = aAxesSetConv.isWall3dChart(); + mbPieChart = aAxesSetConv.isPieChart(); } else { @@ -424,7 +431,9 @@ void PlotAreaConverter::convertPositionFromModel() namespace cssc = ::com::sun::star::chart; Reference< cssc::XChartDocument > xChart1Doc( getChartDocument(), UNO_QUERY_THROW ); Reference< cssc::XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW ); - switch( rLayout.mnTarget ) + // for pie charts, always set inner plot area size to exclude the data labels as Excel does + sal_Int32 nTarget = (mbPieChart && (rLayout.mnTarget == XML_outer)) ? XML_inner : rLayout.mnTarget; + switch( nTarget ) { case XML_inner: xPositioning->setDiagramPositionExcludingAxes( aDiagramRect ); -- cgit v1.2.3 From b9af4e970fa589f901fb12366e6714054f77cdd2 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 11 Jan 2010 11:29:14 +0100 Subject: cws tl74: case error in include statement fixed --- .../transliteration/transliteration_body.cxx | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index 0426f89b604d..d041a1d8f915 100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -39,7 +39,7 @@ #include -#include "CharacterClassificationImpl.hxx" +#include "characterclassificationImpl.hxx" #include "breakiteratorImpl.hxx" #define TRANSLITERATION_ALL @@ -333,18 +333,18 @@ Transliteration_titlecase::Transliteration_titlecase() implementationName = "com.sun.star.i18n.Transliteration.Transliteration_titlecase"; } -rtl::OUString SAL_CALL Transliteration_titlecase::transliterate( +rtl::OUString SAL_CALL Transliteration_titlecase::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& /*offset*/ ) throw(RuntimeException) -{ - Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - CharacterClassificationImpl aCharClassImpl( xMSF ); - - // possible problem: the locale is not exactly specific for each word in the text... - OUString aRes( aCharClassImpl.toTitle( inStr, startPos, nCount, aLocale ) ); - return aRes; -} +{ + Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); + CharacterClassificationImpl aCharClassImpl( xMSF ); + + // possible problem: the locale is not exactly specific for each word in the text... + OUString aRes( aCharClassImpl.toTitle( inStr, startPos, nCount, aLocale ) ); + return aRes; +} Transliteration_sentencecase::Transliteration_sentencecase() { @@ -459,16 +459,16 @@ rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( // beginOfSentence does not work as expected with '.'. See comment below. // For the time being I will leave this code here as a from-scratch sample if the // breakiterator works better at some point... -rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( +rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( const OUString& inStr, sal_Int32 nStartPos, sal_Int32 nCount, Sequence< sal_Int32 >& /*offset*/ ) throw(RuntimeException) -{ +{ OUString aRes( inStr.copy( nStartPos, nCount ) ); if (nStartPos >= 0 && nStartPos < inStr.getLength() && nCount > 0) { - Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); + Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); BreakIteratorImpl brk( xMSF ); sal_Int32 nSentenceStart = -1, nOldSentenceStart = -1; @@ -476,8 +476,8 @@ rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( while (nPos >= nStartPos && nPos != -1) { // possible problem: the locale is not exactly specific for each sentence in the text, - // but it is the only one we have... - nOldSentenceStart = nSentenceStart; + // but it is the only one we have... + nOldSentenceStart = nSentenceStart; nSentenceStart = brk.beginOfSentence( inStr, nPos, aLocale ); // since the breakiterator completely ignores '.' characvters as end-of-sentence when @@ -510,8 +510,8 @@ rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( --nPos; } } - return aRes; -} + return aRes; +} #endif } } } } -- cgit v1.2.3 From 70e22566b64a3cb76a7e5ed8187ee642e9ee9ace Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 11 Jan 2010 12:02:18 +0100 Subject: cws tl74: warning-free code --- unotools/source/i18n/transliterationwrapper.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index 0ee160aaefa4..b93161b4f860 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -152,9 +152,9 @@ sal_Bool TransliterationWrapper::needLanguageForTheMode() const return TransliterationModules_UPPERCASE_LOWERCASE == nType || TransliterationModules_LOWERCASE_UPPERCASE == nType || TransliterationModules_IGNORE_CASE == nType || - TransliterationModulesExtra::SENTENCE_CASE == nType || - TransliterationModulesExtra::TITLE_CASE == nType || - TransliterationModulesExtra::TOGGLE_CASE == nType; + (sal_uInt32) TransliterationModulesExtra::SENTENCE_CASE == (sal_uInt32) nType || + (sal_uInt32) TransliterationModulesExtra::TITLE_CASE == (sal_uInt32) nType || + (sal_uInt32) TransliterationModulesExtra::TOGGLE_CASE == (sal_uInt32) nType; } -- cgit v1.2.3 From d8acb8300eaf5cee6d6445722e12221cfc4059a4 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 11 Jan 2010 13:22:59 +0100 Subject: cws tl74: build errors --- framework/source/uielement/langselectionstatusbarcontroller.cxx | 6 +++--- framework/util/makefile.mk | 1 + linguistic/source/dlistimp.cxx | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index a2a3a02877ca..eb2832c1216e 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -278,9 +278,9 @@ throw (::com::sun::star::uno::RuntimeException) com::sun::star::awt::Rectangle aRectangle; Window* pWindow = VCLUnoHelper::GetWindow( m_xParentWindow ); const Point mMousePos = pWindow->GetPointerPosPixel(); - mRectangle.X = mMousePos.X(); - mRectangle.Y = mMousePos.Y(); - sal_Int16 nId = xPopupMenu->execute( xParent, mRectangle, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16 ); + aRectangle.X = mMousePos.X(); + aRectangle.Y = mMousePos.Y(); + sal_Int16 nId = xPopupMenu->execute( xParent, aRectangle, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16 ); //click "More..." if ( nId && m_xFrame.is() ) { diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index 7c39001f683f..c32f5c7d9e78 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -120,6 +120,7 @@ SHL1STDLIBS= \ $(CPPUHELPERLIB) \ $(TOOLSLIB) \ $(SVTOOLLIB) \ + $(SVLLIB) \ $(I18NISOLANGLIB) \ $(VOSLIB) \ $(VCLLIB) \ diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index 17fd29b05923..aad11a33dc13 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -34,8 +34,6 @@ #include #include #include -#include -#include #include #include #include -- cgit v1.2.3 From 1b800a71b5eee336abc70ed1c4469aab774575d1 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 11 Jan 2010 14:09:46 +0100 Subject: cws tl74: wrong include --- sfx2/source/menu/thessubmenu.cxx | 532 +++++++++++++++++++-------------------- 1 file changed, 266 insertions(+), 266 deletions(-) mode change 100755 => 100644 sfx2/source/menu/thessubmenu.cxx diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx old mode 100755 new mode 100644 index b11462fb1c71..192562817199 --- a/sfx2/source/menu/thessubmenu.cxx +++ b/sfx2/source/menu/thessubmenu.cxx @@ -1,274 +1,274 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: thessubmenu.cxx,v $ - * $Revision: 1.0 $ - * - * 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_sfx2.hxx" - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include "thessubmenu.hxx" - - -using namespace ::com::sun::star; -using ::rtl::OUString; - - -// STATIC DATA ----------------------------------------------------------- - -SFX_IMPL_MENU_CONTROL(SfxThesSubMenuControl, SfxStringItem); - -//////////////////////////////////////////////////////////// +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thessubmenu.cxx,v $ + * $Revision: 1.0 $ + * + * 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_sfx2.hxx" + +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include "thessubmenu.hxx" + + +using namespace ::com::sun::star; +using ::rtl::OUString; + + +// STATIC DATA ----------------------------------------------------------- + +SFX_IMPL_MENU_CONTROL(SfxThesSubMenuControl, SfxStringItem); + +//////////////////////////////////////////////////////////// String GetThesaurusReplaceText_Impl( const ::rtl::OUString &rText ) { - // The strings returned by the thesaurus sometimes have some - // explanation text put in between '(' and ')' or a trailing '*'. - // These parts should not be put in the ReplaceEdit Text that may get - // inserted into the document. Thus we strip them from the text. + // The strings returned by the thesaurus sometimes have some + // explanation text put in between '(' and ')' or a trailing '*'. + // These parts should not be put in the ReplaceEdit Text that may get + // inserted into the document. Thus we strip them from the text. String aText( rText ); - xub_StrLen nPos = aText.Search( sal_Unicode('(') ); - while (STRING_NOTFOUND != nPos) - { - xub_StrLen nEnd = aText.Search( sal_Unicode(')'), nPos ); - if (STRING_NOTFOUND != nEnd) - aText.Erase( nPos, nEnd-nPos+1 ); - else - break; - nPos = aText.Search( sal_Unicode('(') ); - } - - nPos = aText.Search( sal_Unicode('*') ); - if (STRING_NOTFOUND != nPos) - aText.Erase( nPos ); - - // remove any possible remaining ' ' that may confuse the thesaurus - // when it gets called with the text - aText.EraseLeadingAndTrailingChars( sal_Unicode(' ') ); - - return aText; + xub_StrLen nPos = aText.Search( sal_Unicode('(') ); + while (STRING_NOTFOUND != nPos) + { + xub_StrLen nEnd = aText.Search( sal_Unicode(')'), nPos ); + if (STRING_NOTFOUND != nEnd) + aText.Erase( nPos, nEnd-nPos+1 ); + else + break; + nPos = aText.Search( sal_Unicode('(') ); + } + + nPos = aText.Search( sal_Unicode('*') ); + if (STRING_NOTFOUND != nPos) + aText.Erase( nPos ); + + // remove any possible remaining ' ' that may confuse the thesaurus + // when it gets called with the text + aText.EraseLeadingAndTrailingChars( sal_Unicode(' ') ); + + return aText; +} + +//////////////////////////////////////////////////////////// + + +/* + Ctor; setzt Select-Handler am Menu und traegt Menu + in seinen Parent ein. + */ +SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBindings &rBindings ) + : SfxMenuControl( nSlotId, rBindings ), + pMenu(new PopupMenu), + rParent(rMenu) +{ + rMenu.SetPopupMenu(nSlotId, pMenu); + pMenu->SetSelectHdl(LINK(this, SfxThesSubMenuControl, MenuSelect)); + FillMenu(); +} + + +SfxThesSubMenuControl::~SfxThesSubMenuControl() +{ + delete pMenu; +} + + +/* + Fuellt das Menu mit den aktuellen Verben aus der ViewShell. + */ +void SfxThesSubMenuControl::FillMenu() +{ + pMenu->Clear(); + pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); + SfxViewShell *pView = GetBindings().GetDispatcher()->GetFrame()->GetViewShell(); + if (pView) + { + pMenu->InsertItem( 1, String::CreateFromAscii("bla blub") ); + + } + + rParent.EnableItem( GetId(), (BOOL)pMenu->GetItemCount() ); } -//////////////////////////////////////////////////////////// - - -/* - Ctor; setzt Select-Handler am Menu und traegt Menu - in seinen Parent ein. - */ -SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBindings &rBindings ) - : SfxMenuControl( nSlotId, rBindings ), - pMenu(new PopupMenu), - rParent(rMenu) -{ - rMenu.SetPopupMenu(nSlotId, pMenu); - pMenu->SetSelectHdl(LINK(this, SfxThesSubMenuControl, MenuSelect)); - FillMenu(); -} - - -SfxThesSubMenuControl::~SfxThesSubMenuControl() -{ - delete pMenu; -} - - -/* - Fuellt das Menu mit den aktuellen Verben aus der ViewShell. - */ -void SfxThesSubMenuControl::FillMenu() -{ - pMenu->Clear(); - pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); - SfxViewShell *pView = GetBindings().GetDispatcher()->GetFrame()->GetViewShell(); - if (pView) - { - pMenu->InsertItem( 1, String::CreateFromAscii("bla blub") ); - - } - - rParent.EnableItem( GetId(), (BOOL)pMenu->GetItemCount() ); -} - - -/* - Statusbenachrichtigung; - fuellt gfs. das Menu mit den aktuellen Verben aus der ViewShell. - der DocumentShell. - Ist die Funktionalit"at disabled, wird der entsprechende - Menueeintrag im Parentmenu disabled, andernfalls wird er enabled. - */ -void SfxThesSubMenuControl::StateChanged( - USHORT /*nSID*/, - SfxItemState eState, - const SfxPoolItem* /*pState*/ ) -{ - rParent.EnableItem(GetId(), SFX_ITEM_AVAILABLE == eState ); - if ( SFX_ITEM_AVAILABLE == eState ) - FillMenu(); -} - - -/* - Select-Handler des Menus; - das selektierte Verb mit ausgef"uhrt, - */ -IMPL_LINK_INLINE_START( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu ) -{ - const USHORT nSlotId = pSelMenu->GetCurItemId(); - if( nSlotId ) - GetBindings().Execute(nSlotId); - return 1; -} -IMPL_LINK_INLINE_END( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu ) - - -PopupMenu* SfxThesSubMenuControl::GetPopup() const -{ - return pMenu; -} - - -//////////////////////////////////////////////////////////// - -OUString SfxThesSubMenuHelper::GetText( - const String &rLookUpString, - xub_StrLen nDelimPos ) -{ - return OUString( rLookUpString.Copy( 0, nDelimPos ) ); -} - - -void SfxThesSubMenuHelper::GetLocale( - lang::Locale /*out */ &rLocale, - const String &rLookUpString, - xub_StrLen nDelimPos ) -{ - String aIsoLang( rLookUpString.Copy( nDelimPos + 1) ); - const xub_StrLen nPos = aIsoLang.Search( '-' ); - if (nPos != STRING_NOTFOUND) - { - rLocale.Language = aIsoLang.Copy( 0, nPos ); - rLocale.Country = aIsoLang.Copy( nPos + 1 ); - rLocale.Variant = String::EmptyString(); - } -} - - -SfxThesSubMenuHelper::SfxThesSubMenuHelper() -{ - try - { - uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); - m_xThesarus = uno::Reference< linguistic2::XThesaurus > ( xMSF->createInstance( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.linguistic2.Thesaurus" ) ) ), uno::UNO_QUERY_THROW ) ; - } - catch (uno::Exception &e) - { - (void) e; - DBG_ASSERT( 0, "failed to get thesaurus" ); - } -} - - -SfxThesSubMenuHelper::~SfxThesSubMenuHelper() -{ -} - - -bool SfxThesSubMenuHelper::IsSupportedLocale( const lang::Locale & rLocale ) const -{ - return m_xThesarus.is() && m_xThesarus->hasLocale( rLocale ); -} - - -bool SfxThesSubMenuHelper::GetMeanings( - std::vector< OUString > & rSynonyms, - const OUString & rWord, - const lang::Locale & rLocale, - sal_Int16 nMaxSynonms ) -{ - bool bHasMoreSynonyms = false; - rSynonyms.clear(); - if (IsSupportedLocale( rLocale ) && rWord.getLength() && nMaxSynonms > 0) - { - try - { - // get all meannings - const uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeaningSeq( - m_xThesarus->queryMeanings( rWord, rLocale, uno::Sequence< beans::PropertyValue >() )); - const uno::Reference< linguistic2::XMeaning > *pxMeaning = aMeaningSeq.getConstArray(); - const sal_Int32 nMeanings = aMeaningSeq.getLength(); - - // iterate over all meanings until nMaxSynonms are found or all meanings are processed - sal_Int32 nCount = 0; - sal_Int32 i = 0; - for ( ; i < nMeanings && nCount < nMaxSynonms; ++i) - { - const uno::Sequence< OUString > aSynonymSeq( pxMeaning[i]->querySynonyms() ); - const OUString *pSynonyms = aSynonymSeq.getConstArray(); - const sal_Int32 nSynonyms = aSynonymSeq.getLength(); - sal_Int32 k = 0; - for ( ; k < nSynonyms && nCount < nMaxSynonms; ++k) - { - rSynonyms.push_back( pSynonyms[k] ); - ++nCount; - } - bHasMoreSynonyms = k < nSynonyms; // any synonym from this meaning skipped? - } - - bHasMoreSynonyms |= i < nMeanings; // any meaning skipped? - } - catch (uno::Exception &e) - { - (void) e; - DBG_ASSERT( 0, "failed to get synonyms" ); - } - } - return bHasMoreSynonyms; -} - - -//////////////////////////////////////////////////////////// - - + +/* + Statusbenachrichtigung; + fuellt gfs. das Menu mit den aktuellen Verben aus der ViewShell. + der DocumentShell. + Ist die Funktionalit"at disabled, wird der entsprechende + Menueeintrag im Parentmenu disabled, andernfalls wird er enabled. + */ +void SfxThesSubMenuControl::StateChanged( + USHORT /*nSID*/, + SfxItemState eState, + const SfxPoolItem* /*pState*/ ) +{ + rParent.EnableItem(GetId(), SFX_ITEM_AVAILABLE == eState ); + if ( SFX_ITEM_AVAILABLE == eState ) + FillMenu(); +} + + +/* + Select-Handler des Menus; + das selektierte Verb mit ausgef"uhrt, + */ +IMPL_LINK_INLINE_START( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu ) +{ + const USHORT nSlotId = pSelMenu->GetCurItemId(); + if( nSlotId ) + GetBindings().Execute(nSlotId); + return 1; +} +IMPL_LINK_INLINE_END( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu ) + + +PopupMenu* SfxThesSubMenuControl::GetPopup() const +{ + return pMenu; +} + + +//////////////////////////////////////////////////////////// + +OUString SfxThesSubMenuHelper::GetText( + const String &rLookUpString, + xub_StrLen nDelimPos ) +{ + return OUString( rLookUpString.Copy( 0, nDelimPos ) ); +} + + +void SfxThesSubMenuHelper::GetLocale( + lang::Locale /*out */ &rLocale, + const String &rLookUpString, + xub_StrLen nDelimPos ) +{ + String aIsoLang( rLookUpString.Copy( nDelimPos + 1) ); + const xub_StrLen nPos = aIsoLang.Search( '-' ); + if (nPos != STRING_NOTFOUND) + { + rLocale.Language = aIsoLang.Copy( 0, nPos ); + rLocale.Country = aIsoLang.Copy( nPos + 1 ); + rLocale.Variant = String::EmptyString(); + } +} + + +SfxThesSubMenuHelper::SfxThesSubMenuHelper() +{ + try + { + uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); + m_xThesarus = uno::Reference< linguistic2::XThesaurus > ( xMSF->createInstance( + OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.linguistic2.Thesaurus" ) ) ), uno::UNO_QUERY_THROW ) ; + } + catch (uno::Exception &e) + { + (void) e; + DBG_ASSERT( 0, "failed to get thesaurus" ); + } +} + + +SfxThesSubMenuHelper::~SfxThesSubMenuHelper() +{ +} + + +bool SfxThesSubMenuHelper::IsSupportedLocale( const lang::Locale & rLocale ) const +{ + return m_xThesarus.is() && m_xThesarus->hasLocale( rLocale ); +} + + +bool SfxThesSubMenuHelper::GetMeanings( + std::vector< OUString > & rSynonyms, + const OUString & rWord, + const lang::Locale & rLocale, + sal_Int16 nMaxSynonms ) +{ + bool bHasMoreSynonyms = false; + rSynonyms.clear(); + if (IsSupportedLocale( rLocale ) && rWord.getLength() && nMaxSynonms > 0) + { + try + { + // get all meannings + const uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeaningSeq( + m_xThesarus->queryMeanings( rWord, rLocale, uno::Sequence< beans::PropertyValue >() )); + const uno::Reference< linguistic2::XMeaning > *pxMeaning = aMeaningSeq.getConstArray(); + const sal_Int32 nMeanings = aMeaningSeq.getLength(); + + // iterate over all meanings until nMaxSynonms are found or all meanings are processed + sal_Int32 nCount = 0; + sal_Int32 i = 0; + for ( ; i < nMeanings && nCount < nMaxSynonms; ++i) + { + const uno::Sequence< OUString > aSynonymSeq( pxMeaning[i]->querySynonyms() ); + const OUString *pSynonyms = aSynonymSeq.getConstArray(); + const sal_Int32 nSynonyms = aSynonymSeq.getLength(); + sal_Int32 k = 0; + for ( ; k < nSynonyms && nCount < nMaxSynonms; ++k) + { + rSynonyms.push_back( pSynonyms[k] ); + ++nCount; + } + bHasMoreSynonyms = k < nSynonyms; // any synonym from this meaning skipped? + } + + bHasMoreSynonyms |= i < nMeanings; // any meaning skipped? + } + catch (uno::Exception &e) + { + (void) e; + DBG_ASSERT( 0, "failed to get synonyms" ); + } + } + return bHasMoreSynonyms; +} + + +//////////////////////////////////////////////////////////// + + -- cgit v1.2.3 From 1b030104d238985d6df1036f0e48eee5bb6d8bb5 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 11 Jan 2010 14:46:35 +0100 Subject: cws tl74: merge errors --- svx/inc/helpid.hrc | 3 ++- svx/source/dialog/thesdlg.cxx | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index bc36634e24c3..cc28189cc2f3 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -283,6 +283,7 @@ #define HID_SVX_SENDMENU_SIGNANDENCRYPT (HID_SVX_START + 245) #define HID_SVX_TP_APPEARANCE (HID_SVX_START + 246) #define HID_SVX_TP_DESKTOP (HID_SVX_START + 247) +#define HID_CT_THES_ALTERNATIVES (HID_SVX_START + 248) // please adjust ACT_SVX_HID_END2 below if you add entries here! @@ -290,7 +291,7 @@ // Overrun check --------------------------------------------------------- // ----------------------------------------------------------------------- -#define ACT_SVX_HID_END (HID_SVX_START+247) +#define ACT_SVX_HID_END (HID_SVX_START+248) #if ACT_SVX_HID_END > HID_SVX_END #error Resource-Ueberlauf in #line, #file #endif diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index d57bb02872ff..bd1cff76de02 100644 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -33,8 +33,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -198,6 +198,7 @@ ThesaurusAlternativesCtrl_Impl::~ThesaurusAlternativesCtrl_Impl() SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( const String &rText, bool bIsHeader ) { + (void) bIsHeader; SvLBoxEntry* pEntry = new SvLBoxEntry; String sEmpty; pEntry->AddItem( new SvLBoxString( pEntry, 0, sEmpty) ); // Leerspalte @@ -314,9 +315,9 @@ SvxThesaurusDialog::SvxThesaurusDialog( Window* pParent, Reference< XThesaurus > aMeanLB ( this, SVX_RES( LB_MEAN ) ), aSynonymText( this, SVX_RES( FT_SYNON ) ), aSynonymLB ( this, SVX_RES( LB_SYNON ) ), - aVarFL ( this, SVX_RES( FL_VAR ) ), m_aAlternativesText ( this, SVX_RES( FT_THES_ALTERNATIVES ) ), m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( this ) ), + aVarFL ( this, SVX_RES( FL_VAR ) ), aOkBtn ( this, SVX_RES( BTN_THES_OK ) ), aCancelBtn ( this, SVX_RES( BTN_THES_CANCEL ) ), aLookUpBtn ( this, SVX_RES( BTN_LOOKUP ) ), -- cgit v1.2.3 From 3aa0aa1db307d2d88c612b808ec06411b3036b97 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 11 Jan 2010 15:58:29 +0100 Subject: cws tl74: merge problems --- sw/source/ui/lingu/olmenu.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 0b6a67070e1c..a5634768ba54 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -63,12 +63,7 @@ #include #include #include -#include -#include -#include -#include #include -#include #include #include #include @@ -80,6 +75,7 @@ #include #include #include +#include #include #include #include @@ -295,7 +291,7 @@ void SwSpellPopup::fillLangPopupMenu( { for (USHORT i = 0; i < rLocales.getLength(); ++i) { - if (aLangItems.size() == nMaxCount) + if (aLangItems.size() == (size_t)nMaxCount) break; const lang::Locale& rLocale = rLocales[i]; if (lcl_checkScriptType( nScriptType, aLanguageTable.GetType( rLocale.Language ))) @@ -575,7 +571,7 @@ bGrammarResults(false) Image rImg = ::GetImage( xFrame, OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); - SetItemImage( MN_SPELLING, rImg ); + SetItemImage( MN_SPELLING_DLG, rImg ); ////////////////////////////////////////////////////////////////////////////////// @@ -708,7 +704,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) Image rImg = ::GetImage( xFrame, OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); - SetItemImage( MN_SPELLING, rImg ); + SetItemImage( MN_SPELLING_DLG, rImg ); ////////////////////////////////////////////////////////////////////////////////// @@ -740,7 +736,7 @@ void SwSpellPopup::Execute( USHORT nId ) if ((MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) || (MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END)) { - USHORT nAltIdx = (MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ? + sal_Int32 nAltIdx = (MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ? nId - MN_SUGGESTION_START : nId - MN_AUTOCORR_START; DBG_ASSERT( 0 <= nAltIdx && nAltIdx < aSuggestions.getLength(), "index out of range" ); if (0 <= nAltIdx && nAltIdx < aSuggestions.getLength() && (bGrammarResults || xSpellAlt.is())) -- cgit v1.2.3 From 59550f11ccf5d3b56f7a4cd5a7db5ed2c11109ec Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 12 Jan 2010 11:49:54 +0100 Subject: #i108247# missing include added --- lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx old mode 100644 new mode 100755 index 8f43530c5a3a..7fb4fba7a89f --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -65,6 +65,7 @@ #include "dictmgr.hxx" #include +#include #include #include -- cgit v1.2.3 From 9c5daf023ff0f7643f09361b6cac45055990aebf Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 12 Jan 2010 14:07:54 +0100 Subject: cws tl74: build errors/warnings after merge --- desktop/source/deployment/gui/makefile.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk index 4d563ae1591a..fbd3272c78e4 100644 --- a/desktop/source/deployment/gui/makefile.mk +++ b/desktop/source/deployment/gui/makefile.mk @@ -82,6 +82,7 @@ SHL1STDLIBS = \ $(SVTOOLLIB) \ $(SVLLIB) \ $(SVXLIB) \ + $(SVXCORELIB) \ $(SFXLIB) \ $(DEPLOYMENTMISCLIB) \ $(OLE32LIB) -- cgit v1.2.3 From 7a0436ff74b08cc03fd14730e14fcc8b558a2ecb Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 12 Jan 2010 14:07:54 +0100 Subject: cws tl74: build errors/warnings after merge --- starmath/inc/dialog.hxx | 8 ++++---- sw/source/ui/shells/drwtxtex.cxx | 5 ++++- sw/source/ui/shells/textsh1.cxx | 6 +++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index aefc11a60d8a..6a2e56a3bae0 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -498,22 +498,22 @@ public: // Dialog virtual short Execute(); - BOOL SmSymDefineDialog::SelectOldSymbolSet(const XubString &rSymbolSetName) + BOOL SelectOldSymbolSet(const XubString &rSymbolSetName) { return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, FALSE); } - BOOL SmSymDefineDialog::SelectOldSymbol(const XubString &rSymbolName) + BOOL SelectOldSymbol(const XubString &rSymbolName) { return SelectSymbol(aOldSymbols, rSymbolName, FALSE); } - BOOL SmSymDefineDialog::SelectSymbolSet(const XubString &rSymbolSetName) + BOOL SelectSymbolSet(const XubString &rSymbolSetName) { return SelectSymbolSet(aSymbolSets, rSymbolSetName, FALSE); } - BOOL SmSymDefineDialog::SelectSymbol(const XubString &rSymbolName) + BOOL SelectSymbol(const XubString &rSymbolName) { return SelectSymbol(aSymbols, rSymbolName, FALSE); } diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 1f30dff31930..4abef9982d8b 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -42,12 +42,15 @@ #include #include #include -#include +#include #include #include #include #include #include +#include +#include +#include #include #include #include diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 3de0c2fd5b28..a98f201d3959 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -414,10 +414,10 @@ void SwTextShell::Execute(SfxRequest &rReq) aReplaceText = pItem2->GetValue(); if (aReplaceText.Len() > 0) { - SwView &rView = rWrtSh.GetView(); + SwView &rView2 = rWrtSh.GetView(); const bool bSelection = rWrtSh.HasSelection(); - const String aLookUpText = rView.GetThesaurusLookUpText( bSelection ); - rView.InsertThesaurusSynonym( aReplaceText, aLookUpText, bSelection ); + const String aLookUpText = rView2.GetThesaurusLookUpText( bSelection ); + rView2.InsertThesaurusSynonym( aReplaceText, aLookUpText, bSelection ); } } break; -- cgit v1.2.3 From 46271f0c4df6b0cb0cd07c1070057f1c47c8aa65 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 12 Jan 2010 14:10:57 +0100 Subject: #i108247# missing include added --- .../hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 73 +++++++++++----------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index 8f43530c5a3a..6ff8f50177a4 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -65,6 +65,7 @@ #include "dictmgr.hxx" #include +#include #include #include @@ -544,10 +545,10 @@ Reference< XPossibleHyphens > SAL_CALL char *lcword; int k; - PropertyHelper_Hyphen & rHelper = GetPropHelper(); - rHelper.SetTmpPropVals(aProperties); - sal_Int16 minTrail = rHelper.GetMinTrailing(); - sal_Int16 minLead = rHelper.GetMinLeading(); + PropertyHelper_Hyphen & rHelper = GetPropHelper(); + rHelper.SetTmpPropVals(aProperties); + sal_Int16 minTrail = rHelper.GetMinTrailing(); + sal_Int16 minLead = rHelper.GetMinLeading(); HyphenDict *dict = NULL; rtl_TextEncoding aEnc = 0; @@ -621,9 +622,9 @@ Reference< XPossibleHyphens > SAL_CALL wordlen = encWord.getLength(); lcword = new char[wordlen+1]; hyphens = new char[wordlen+5]; - char ** rep = NULL; // replacements of discretionary hyphenation - int * pos = NULL; // array of [hyphenation point] minus [deletion position] - int * cut = NULL; // length of deletions in original word + char ** rep = NULL; // replacements of discretionary hyphenation + int * pos = NULL; // array of [hyphenation point] minus [deletion position] + int * cut = NULL; // length of deletions in original word // copy converted word into simple char buffer strcpy(lcword,encWord.getStr()); @@ -634,21 +635,21 @@ Reference< XPossibleHyphens > SAL_CALL n++; // fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr); if (n > 0) { - if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut, - minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))), - Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))))) + if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut, + minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))), + Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))))) { delete[] hyphens; delete[] lcword; - - if (rep) { - for(int j = 0; j < n; j++) { - if (rep[j]) free(rep[j]); - } - free(rep); - } - if (pos) free(pos); - if (cut) free(cut); + + if (rep) { + for(int j = 0; j < n; j++) { + if (rep[j]) free(rep[j]); + } + free(rep); + } + if (pos) free(pos); + if (cut) free(cut); return NULL; } @@ -662,7 +663,7 @@ Reference< XPossibleHyphens > SAL_CALL INT16 i; for ( i = 0; i < encWord.getLength(); i++) - if (hyphens[i]&1 && (!rep || !rep[i])) + if (hyphens[i]&1 && (!rep || !rep[i])) nHyphCount++; Sequence< INT16 > aHyphPos(nHyphCount); @@ -671,14 +672,14 @@ Reference< XPossibleHyphens > SAL_CALL OUString hyphenatedWord; nHyphCount = 0; - for (i = 0; i < nWord.getLength(); i++) { + for (i = 0; i < nWord.getLength(); i++) { hyphenatedWordBuffer.append(aWord[i]); - // hyphenation position (not alternative) - if (hyphens[i]&1 && (!rep || !rep[i])) { - pPos[nHyphCount] = i; - hyphenatedWordBuffer.append(sal_Unicode('=')); - nHyphCount++; - } + // hyphenation position (not alternative) + if (hyphens[i]&1 && (!rep || !rep[i])) { + pPos[nHyphCount] = i; + hyphenatedWordBuffer.append(sal_Unicode('=')); + nHyphCount++; + } } hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear(); @@ -690,15 +691,15 @@ Reference< XPossibleHyphens > SAL_CALL delete[] hyphens; delete[] lcword; - - if (rep) { - for(int j = 0; j < n; j++) { - if (rep[j]) free(rep[j]); - } - free(rep); - } - if (pos) free(pos); - if (cut) free(cut); + + if (rep) { + for(int j = 0; j < n; j++) { + if (rep[j]) free(rep[j]); + } + free(rep); + } + if (pos) free(pos); + if (cut) free(cut); return xRes; } -- cgit v1.2.3 From 84c78339cdb438323350301db58b60efb751608d Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 12 Jan 2010 14:35:58 +0100 Subject: #i108247# missing include added --- lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index 6ff8f50177a4..7ebd9a7b66f3 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -65,7 +65,7 @@ #include "dictmgr.hxx" #include -#include +#include #include #include -- cgit v1.2.3 From 53a0265c8721e910a07a6de0a46bb0ae7c181bb4 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 14 Jan 2010 16:13:13 +0100 Subject: #i107721# new thesaurus dialog --- svx/source/dialog/thesdlg.cxx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index ef4ddcbc47be..6212f2f7a1a3 100755 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -155,8 +155,6 @@ void AlternativesString_Impl::Paint( class ThesaurusAlternativesCtrl_Impl : public SvxCheckListBox { - std::vector< SvLBoxEntry * > m_aEntries; - // disable copy c-tor and assignment operator ThesaurusAlternativesCtrl_Impl( const ThesaurusAlternativesCtrl_Impl & ); ThesaurusAlternativesCtrl_Impl & operator = ( const ThesaurusAlternativesCtrl_Impl & ); @@ -165,8 +163,12 @@ public: ThesaurusAlternativesCtrl_Impl( Window* pParent ); virtual ~ThesaurusAlternativesCtrl_Impl(); + + SvLBoxEntry * AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader ); void ClearUserData(); + + virtual void KeyInput( const KeyEvent& rKEvt ); }; @@ -210,10 +212,21 @@ SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const St pEntry->SetUserData( pUserData ); GetModel()->Insert( pEntry ); - m_aEntries.push_back( pEntry ); return pEntry; } + +void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) +{ + const KeyCode& rKey = rKEvt.GetKeyCode(); + + if (rKey.GetCode() == KEY_RETURN) + GetParent()->KeyInput( rKEvt ); // parent will close dialog... + else if ( GetEntryCount() ) + SvxCheckListBox::KeyInput( rKEvt ); +} + + // struct SvxThesaurusDialog_Impl ---------------------------------------- struct SvxThesaurusDialog_Impl -- cgit v1.2.3 From d3da583a2f2a51333bfe38fd2c8f1024e17d3e5b Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Thu, 14 Jan 2010 17:35:40 +0100 Subject: chartpositioning: #i86609# more work on importing chart title positions --- sc/source/filter/excel/xechart.cxx | 12 +-- sc/source/filter/excel/xichart.cxx | 159 ++++++++++++++++++++++++------------- sc/source/filter/excel/xlchart.cxx | 73 ++++++++++++++++- sc/source/filter/inc/xichart.hxx | 17 ++-- sc/source/filter/inc/xlchart.hxx | 53 +++++++++---- 5 files changed, 228 insertions(+), 86 deletions(-) diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index a4f11c4de941..c0d4ac21b914 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -2503,7 +2503,8 @@ bool XclExpChTypeGroup::CreateStockSeries( Reference< XDataSeries > xDataSeries, void XclExpChTypeGroup::WriteBody( XclExpStream& rStrm ) { - rStrm << maData.maRect << maData.mnFlags << maData.mnGroupIdx; + rStrm.WriteZeroBytes( 16 ); + rStrm << maData.mnFlags << maData.mnGroupIdx; } // Axes ======================================================================= @@ -2709,9 +2710,9 @@ void XclExpChTick::WriteBody( XclExpStream& rStrm ) rStrm << maData.mnMajor << maData.mnMinor << maData.mnLabelPos - << maData.mnBackMode - << maData.maRect - << maData.maTextColor + << maData.mnBackMode; + rStrm.WriteZeroBytes( 16 ); + rStrm << maData.maTextColor << maData.mnFlags; if( GetBiff() == EXC_BIFF8 ) rStrm << GetPalette().GetColorIndex( mnTextColorId ) << maData.mnRotation; @@ -2865,7 +2866,8 @@ void XclExpChAxis::WriteSubRecords( XclExpStream& rStrm ) void XclExpChAxis::WriteBody( XclExpStream& rStrm ) { - rStrm << maData.mnType << maData.maRect; + rStrm << maData.mnType; + rStrm.WriteZeroBytes( 16 ); } // ---------------------------------------------------------------------------- diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index b5aaf8d0c616..3b19f8faf23e 100755 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -93,6 +93,7 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; 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::beans::XPropertySet; using ::com::sun::star::lang::XMultiServiceFactory; @@ -262,6 +263,11 @@ Reference< XDataProvider > XclImpChRoot::GetDataProvider() const return mxChData->mxChartDoc->getDataProvider(); } +Reference< XShape > XclImpChRoot::GetTitleShape( const XclChTextKey& rTitleKey ) const +{ + return mxChData->GetTitleShape( rTitleKey ); +} + sal_Int32 XclImpChRoot::CalcHmmFromChartX( sal_uInt16 nPosX ) const { return static_cast< sal_Int32 >( mxChData->mfUnitSizeX * nPosX + mxChData->mnBorderGapX + 0.5 ); @@ -380,7 +386,13 @@ void XclImpChGroupBase::SkipBlock( XclImpStream& rStrm ) void XclImpChFramePos::ReadChFramePos( XclImpStream& rStrm ) { - rStrm >> maData.mnTLMode >> maData.mnBRMode >> maData.maRect; + rStrm >> maData.mnTLMode >> maData.mnBRMode; + /* According to the spec, the upper 16 bits of all members in the + rectangle are unused and may contain garbage. */ + maData.maRect.mnX = rStrm.ReadInt16(); rStrm.Ignore( 2 ); + maData.maRect.mnY = rStrm.ReadInt16(); rStrm.Ignore( 2 ); + maData.maRect.mnWidth = rStrm.ReadInt16(); rStrm.Ignore( 2 ); + maData.maRect.mnHeight = rStrm.ReadInt16(); rStrm.Ignore( 2 ); } // ---------------------------------------------------------------------------- @@ -1073,40 +1085,59 @@ Reference< XTitle > XclImpChText::CreateTitle() const return xTitle; } -void XclImpChText::ConvertMainTitlePos( const Reference< XShape >& rxTitle ) const -{ - if( mxFramePos.is() && rxTitle.is() ) +void XclImpChText::ConvertTitlePosition( const XclChTextKey& rTitleKey ) const +{ + if( !mxFramePos ) return; + + const XclChFramePos& rPosData = mxFramePos->GetFramePosData(); + OSL_ENSURE( (rPosData.mnTLMode == EXC_CHFRAMEPOS_PARENT) && (rPosData.mnBRMode == EXC_CHFRAMEPOS_PARENT), + "XclImpChText::ConvertTitlePosition - unexpected frame position mode" ); + + /* Check if title is moved manually. To get the actual position of the + title, we do some kind of hack and use the values from the CHTEXT + record, effectively ignoring the contents of the CHFRAMEPOS record + which contains the position relative to the default title position + (according to the spec, the CHFRAMEPOS supersedes the CHTEXT record). + Especially when it comes to axis titles, things would become very + complicated here, because the relative title position is stored in a + measurement unit that is dependent on the size of the inner plot area, + the interpretation of the X and Y coordinate is dependent on the + direction of the axis, and in 3D charts, and the title default + positions are dependent on the 3D view settings (rotation, elevation, + and perspective). Thus, it is easier to assume that the creator has + written out the correct absolute position and size of the title in the + CHTEXT record. This is assured by checking that the shape size stored + in the CHTEXT record is non-zero. */ + if( (rPosData.mnTLMode == EXC_CHFRAMEPOS_PARENT) && + ((rPosData.maRect.mnX != 0) || (rPosData.maRect.mnY != 0)) && + (maData.maRect.mnWidth > 0) && (maData.maRect.mnHeight > 0) ) try + { + Reference< XShape > xTitleShape( GetTitleShape( rTitleKey ), UNO_SET_THROW ); + // the call to XShape.getSize() may recalc the chart view + ::com::sun::star::awt::Size aTitleSize = xTitleShape->getSize(); + // rotated titles need special handling... + sal_Int32 nScRot = XclTools::GetScRotation( GetRotation(), 0 ); + double fRad = nScRot * F_PI18000; + double fSin = fabs( sin( fRad ) ); + double fCos = fabs( cos( fRad ) ); + ::com::sun::star::awt::Size aBoundSize( + static_cast< sal_Int32 >( fCos * aTitleSize.Width + fSin * aTitleSize.Height + 0.5 ), + static_cast< sal_Int32 >( fSin * aTitleSize.Width + fCos * aTitleSize.Height + 0.5 ) ); + // calculate the title position from the values in the CHTEXT record + ::com::sun::star::awt::Point aTitlePos( + CalcHmmFromChartX( maData.maRect.mnX ), + CalcHmmFromChartY( maData.maRect.mnY ) ); + // add part of height to X direction, if title is rotated down (clockwise) + if( nScRot > 18000 ) + aTitlePos.X += static_cast< sal_Int32 >( fSin * aTitleSize.Height + 0.5 ); + // add part of width to Y direction, if title is rotated up (counterclockwise) + else if( nScRot > 0 ) + aTitlePos.Y += static_cast< sal_Int32 >( fSin * aTitleSize.Width + 0.5 ); + // set the resulting position at the title shape + xTitleShape->setPosition( aTitlePos ); + } + catch( Exception& ) { - const XclChFramePos& rPosData = mxFramePos->GetFramePosData(); - OSL_ENSURE( (rPosData.mnTLMode == EXC_CHFRAMEPOS_PARENT) && (rPosData.mnBRMode == EXC_CHFRAMEPOS_PARENT), - "XclImpChText::ConvertMainTitlePos - unexpected frame position mode" ); - // title moved manually? - if( (rPosData.mnTLMode == EXC_CHFRAMEPOS_PARENT) && ((rPosData.maRect.mnX != 0) || (rPosData.maRect.mnY != 0)) ) - { - // the call to XShape.getSize() may recalc the chart view - ::com::sun::star::awt::Size aTitleSize = rxTitle->getSize(); - // rotated titles need special handling... - sal_Int32 nScRot = XclTools::GetScRotation( GetRotation(), 0 ); - double fRad = nScRot * F_PI18000; - double fSin = fabs( sin( fRad ) ); - double fCos = fabs( cos( fRad ) ); - ::com::sun::star::awt::Size aBoundSize( - static_cast< sal_Int32 >( fCos * aTitleSize.Width + fSin * aTitleSize.Height + 0.5 ), - static_cast< sal_Int32 >( fSin * aTitleSize.Width + fCos * aTitleSize.Height + 0.5 ) ); - // title position is given relative to the default position - // default X = left edge of centered title, default Y = 85 chart units - ::com::sun::star::awt::Point aTitlePos( - CalcHmmFromChartX( rPosData.maRect.mnX + EXC_CHART_TOTALUNITS / 2 ) - aBoundSize.Width / 2, - CalcHmmFromChartY( rPosData.maRect.mnY + 85 ) ); - // add part of height to X direction, if title is rotated down - if( nScRot > 18000 ) - aTitlePos.X += static_cast< sal_Int32 >( fSin * aTitleSize.Height + 0.5 ); - // add part of width to Y direction, if title is rotated up - else if( nScRot > 0 ) - aTitlePos.Y += static_cast< sal_Int32 >( fSin * aTitleSize.Width + 0.5 ); - // set the resulting position at the title shape - rxTitle->setPosition( aTitlePos ); - } } } @@ -2461,7 +2492,8 @@ XclImpChTypeGroup::XclImpChTypeGroup( const XclImpChRoot& rRoot ) : void XclImpChTypeGroup::ReadHeaderRecord( XclImpStream& rStrm ) { - rStrm >> maData.maRect >> maData.mnFlags >> maData.mnGroupIdx; + rStrm.Ignore( 16 ); + rStrm >> maData.mnFlags >> maData.mnGroupIdx; } void XclImpChTypeGroup::ReadSubRecord( XclImpStream& rStrm ) @@ -2918,9 +2950,9 @@ void XclImpChTick::ReadChTick( XclImpStream& rStrm ) rStrm >> maData.mnMajor >> maData.mnMinor >> maData.mnLabelPos - >> maData.mnBackMode - >> maData.maRect - >> maData.maTextColor + >> maData.mnBackMode; + rStrm.Ignore( 16 ); + rStrm >> maData.maTextColor >> maData.mnFlags; if( GetBiff() == EXC_BIFF8 ) @@ -2967,7 +2999,7 @@ XclImpChAxis::XclImpChAxis( const XclImpChRoot& rRoot, sal_uInt16 nAxisType ) : void XclImpChAxis::ReadHeaderRecord( XclImpStream& rStrm ) { - rStrm >> maData.mnType >> maData.maRect; + rStrm >> maData.mnType; } void XclImpChAxis::ReadSubRecord( XclImpStream& rStrm ) @@ -3356,6 +3388,16 @@ void XclImpChAxesSet::Convert( Reference< XDiagram > xDiagram ) const } } +void XclImpChAxesSet::ConvertTitlePositions() const +{ + if( mxXAxisTitle.is() ) + mxXAxisTitle->ConvertTitlePosition( XclChTextKey( EXC_CHTEXTTYPE_AXISTITLE, maData.mnAxesSetId, EXC_CHAXIS_X ) ); + if( mxYAxisTitle.is() ) + mxYAxisTitle->ConvertTitlePosition( XclChTextKey( EXC_CHTEXTTYPE_AXISTITLE, maData.mnAxesSetId, EXC_CHAXIS_Y ) ); + if( mxZAxisTitle.is() ) + mxZAxisTitle->ConvertTitlePosition( XclChTextKey( EXC_CHTEXTTYPE_AXISTITLE, maData.mnAxesSetId, EXC_CHAXIS_Z ) ); +} + void XclImpChAxesSet::ReadChAxis( XclImpStream& rStrm ) { XclImpChAxisRef xAxis( new XclImpChAxis( GetChRoot() ) ); @@ -3462,11 +3504,15 @@ void XclImpChAxesSet::ConvertAxis( if( xAxis.is() ) { // create and attach the axis title - if( xChAxisTitle.is() ) + if( xChAxisTitle.is() ) try + { + Reference< XTitled > xTitled( xAxis, UNO_QUERY_THROW ); + Reference< XTitle > xTitle( xChAxisTitle->CreateTitle(), UNO_SET_THROW ); + xTitled->setTitleObject( xTitle ); + } + catch( Exception& ) { - Reference< XTitled > xTitled( xAxis, UNO_QUERY ); - if( xTitled.is() ) - xTitled->setTitleObject( xChAxisTitle->CreateTitle() ); + DBG_ERRORFILE( "XclImpChAxesSet::ConvertAxis - cannot set axis title" ); } // insert axis into coordinate system @@ -3639,12 +3685,14 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB } // chart title - if( mxTitle.is() ) + if( mxTitle.is() ) try + { + Reference< XTitled > xTitled( xChartDoc, UNO_QUERY_THROW ); + Reference< XTitle > xTitle( mxTitle->CreateTitle(), UNO_SET_THROW ); + xTitled->setTitleObject( xTitle ); + } + catch( Exception& ) { - Reference< XTitled > xTitled( xChartDoc, UNO_QUERY ); - Reference< XTitle > xTitle = mxTitle->CreateTitle(); - if( xTitled.is() && xTitle.is() ) - xTitled->setTitleObject( xTitle ); } /* Create the diagram object and attach it to the chart document. Currently, @@ -3672,15 +3720,10 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB flag correctly. */ ScfPropertySet aDiaProp( xDiagram1 ); bool bShowVisCells = ::get_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISIBLEONLY ); - aDiaProp.SetBoolProperty( EXC_CHPROP_INCLUDEHIDDENCELLS, !bShowVisCells ); - - // chart title position - ScfPropertySet aDocProp( xChart1Doc ); - if( aDocProp.GetBoolProperty( EXC_CHPROP_HASMAINTITLE ) ) - mxTitle->ConvertMainTitlePos( xChart1Doc->getTitle() ); + aDiaProp.SetBoolProperty( EXC_CHPROP_INCLUDEHIDDENCELLS, !bShowVisCells ); // plot area position and size (there is no real automatic mode in BIFF5 charts) - XclImpChFramePosRef xPlotAreaPos = mxPrimAxesSet->GetPlotAreaPosition(); + XclImpChFramePosRef xPlotAreaPos = mxPrimAxesSet->GetPlotAreaFramePos(); if( IsManualPlotArea() && xPlotAreaPos.is() ) try { const XclChFramePos& rFramePos = xPlotAreaPos->GetFramePosData(); @@ -3699,6 +3742,12 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB catch( Exception& ) { } + + // positions of all title objects + if( mxTitle.is() ) + mxTitle->ConvertTitlePosition( XclChTextKey( EXC_CHTEXTTYPE_TITLE ) ); + mxPrimAxesSet->ConvertTitlePositions(); + mxSecnAxesSet->ConvertTitlePositions(); } // unlock the model diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx index e28704de3ab9..a0cb3efe7b07 100755 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -41,8 +41,13 @@ #include #include #include -#include #include +#include +#include +#include +#include +#include +#include #include #include @@ -65,6 +70,9 @@ using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::Exception; using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::chart2::XChartDocument; +using ::com::sun::star::drawing::XShape; + +namespace cssc = ::com::sun::star::chart; // Common ===================================================================== @@ -511,7 +519,7 @@ const sal_Char SERVICE_CHART2_SCATTER[] = "com.sun.star.chart2.ScatterChartTyp const sal_Char SERVICE_CHART2_BUBBLE[] = "com.sun.star.chart2.BubbleChartType"; const sal_Char SERVICE_CHART2_SURFACE[] = "com.sun.star.chart2.ColumnChartType"; // Todo -namespace csscd = ::com::sun::star::chart::DataLabelPlacement; +namespace csscd = cssc::DataLabelPlacement; static const XclChTypeInfo spTypeInfos[] = { @@ -1210,12 +1218,61 @@ ScfPropSetHelper& XclChPropSetHelper::GetHatchHelper( XclChPropertyMode ePropMod // ============================================================================ +namespace { + +/* The following local functions implement getting the XShape interface of all + supported title objects (chart and axes). This needs some effort due to the + design of the old Chart1 API used to access these objects. */ + +/** A code fragment that returns a shape object from the passed shape supplier + using the specified interface function. Checks a boolean property first. */ +#define EXC_FRAGMENT_GETTITLESHAPE( shape_supplier, supplier_func, property_name ) \ + ScfPropertySet aPropSet( shape_supplier ); \ + if( shape_supplier.is() && aPropSet.GetBoolProperty( CREATE_OUSTRING( #property_name ) ) ) \ + return shape_supplier->supplier_func(); \ + return Reference< XShape >(); \ + +/** Implements a function returning the drawing shape of an axis title, if + existing, using the specified API interface and its function. */ +#define EXC_DEFINEFUNC_GETAXISTITLESHAPE( func_name, interface_type, supplier_func, property_name ) \ +Reference< XShape > func_name( const Reference< cssc::XChartDocument >& rxChart1Doc ) \ +{ \ + Reference< cssc::interface_type > xAxisSupp( rxChart1Doc->getDiagram(), UNO_QUERY ); \ + EXC_FRAGMENT_GETTITLESHAPE( xAxisSupp, supplier_func, property_name ) \ +} + +/** Returns the drawing shape of the main title, if existing. */ +Reference< XShape > lclGetMainTitleShape( const Reference< cssc::XChartDocument >& rxChart1Doc ) +{ + EXC_FRAGMENT_GETTITLESHAPE( rxChart1Doc, getTitle, HasMainTitle ) +} + +EXC_DEFINEFUNC_GETAXISTITLESHAPE( lclGetXAxisTitleShape, XAxisXSupplier, getXAxisTitle, HasXAxisTitle ) +EXC_DEFINEFUNC_GETAXISTITLESHAPE( lclGetYAxisTitleShape, XAxisYSupplier, getYAxisTitle, HasYAxisTitle ) +EXC_DEFINEFUNC_GETAXISTITLESHAPE( lclGetZAxisTitleShape, XAxisZSupplier, getZAxisTitle, HasZAxisTitle ) +EXC_DEFINEFUNC_GETAXISTITLESHAPE( lclGetSecXAxisTitleShape, XSecondAxisTitleSupplier, getSecondXAxisTitle, HasSecondaryXAxisTitle ) +EXC_DEFINEFUNC_GETAXISTITLESHAPE( lclGetSecYAxisTitleShape, XSecondAxisTitleSupplier, getSecondYAxisTitle, HasSecondaryYAxisTitle ) + +#undef EXC_DEFINEFUNC_GETAXISTITLESHAPE +#undef EXC_IMPLEMENT_GETTITLESHAPE + +} // namespace + +// ---------------------------------------------------------------------------- + XclChRootData::XclChRootData() : mxTypeInfoProv( new XclChTypeInfoProvider ), mxFmtInfoProv( new XclChFormatInfoProvider ), mnBorderGapX( 0 ), mnBorderGapY( 0 ) { + // remember some title shape getter functions + maGetShapeFuncs[ XclChTextKey( EXC_CHTEXTTYPE_TITLE ) ] = lclGetMainTitleShape; + maGetShapeFuncs[ XclChTextKey( EXC_CHTEXTTYPE_AXISTITLE, EXC_CHAXESSET_PRIMARY, EXC_CHAXIS_X ) ] = lclGetXAxisTitleShape; + maGetShapeFuncs[ XclChTextKey( EXC_CHTEXTTYPE_AXISTITLE, EXC_CHAXESSET_PRIMARY, EXC_CHAXIS_Y ) ] = lclGetYAxisTitleShape; + maGetShapeFuncs[ XclChTextKey( EXC_CHTEXTTYPE_AXISTITLE, EXC_CHAXESSET_PRIMARY, EXC_CHAXIS_Z ) ] = lclGetZAxisTitleShape; + maGetShapeFuncs[ XclChTextKey( EXC_CHTEXTTYPE_AXISTITLE, EXC_CHAXESSET_SECONDARY, EXC_CHAXIS_X ) ] = lclGetSecXAxisTitleShape; + maGetShapeFuncs[ XclChTextKey( EXC_CHTEXTTYPE_AXISTITLE, EXC_CHAXESSET_SECONDARY, EXC_CHAXIS_Y ) ] = lclGetSecYAxisTitleShape; } XclChRootData::~XclChRootData() @@ -1260,5 +1317,15 @@ void XclChRootData::FinishConversion() mxChartDoc.clear(); } -// ============================================================================ +Reference< XShape > XclChRootData::GetTitleShape( const XclChTextKey& rTitleKey ) const +{ + XclChGetShapeFuncMap::const_iterator aIt = maGetShapeFuncs.find( rTitleKey ); + OSL_ENSURE( aIt != maGetShapeFuncs.end(), "XclChRootData::GetTitleShape - invalid title key" ); + Reference< cssc::XChartDocument > xChart1Doc( mxChartDoc, UNO_QUERY ); + Reference< XShape > xTitleShape; + if( xChart1Doc.is() && (aIt != maGetShapeFuncs.end()) ) + xTitleShape = (aIt->second)( xChart1Doc ); + return xTitleShape; +} +// ============================================================================ diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index e0994f33d1d6..50c46586eefc 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -93,8 +93,7 @@ class ScTokenArray; class XclImpChRoot : public XclImpRoot { public: - typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > XChartDocRef; - typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > XDataProviderRef; + typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > XChartDocRef; public: explicit XclImpChRoot( const XclImpRoot& rRoot, XclImpChChart& rChartData ); @@ -124,7 +123,11 @@ public: void FinishConversion( ScfProgressBar& rProgress ) const; /** Returns the data provider for the chart document. */ - XDataProviderRef GetDataProvider() const; + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > + GetDataProvider() const; + /** Returns the drawing shape interface of the specified title object. */ + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + GetTitleShape( const XclChTextKey& rTitleKey ) const; /** Converts the passed horizontal coordinate from Excel chart units into 1/100 mm. */ sal_Int32 CalcHmmFromChartX( sal_uInt16 nPosX ) const; @@ -529,8 +532,8 @@ public: void ConvertDataLabel( ScfPropertySet& rPropSet, const XclChTypeInfo& rTypeInfo ) const; /** Creates a title text object. */ XTitleRef CreateTitle() const; - /** Converts the manual position of the main title */ - void ConvertMainTitlePos( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxTitle ) const; + /** Converts the manual position of the specified title */ + void ConvertTitlePosition( const XclChTextKey& rTitleKey ) const; private: using XclImpChRoot::ConvertFont; @@ -1291,7 +1294,7 @@ public: inline sal_Int32 GetApiAxesSetIndex() const { return maData.GetApiAxesSetIndex(); } /** Returns the outer plot area position, if existing. */ - inline XclImpChFramePosRef GetPlotAreaPosition() const { return mxFramePos; } + inline XclImpChFramePosRef GetPlotAreaFramePos() const { return mxFramePos; } /** Returns the specified chart type group. */ inline XclImpChTypeGroupRef GetTypeGroup( sal_uInt16 nGroupIdx ) const { return maTypeGroups.get( nGroupIdx ); } /** Returns the first chart type group. */ @@ -1303,6 +1306,8 @@ public: /** Creates a coordinate system and converts all series and axis settings. */ void Convert( XDiagramRef xDiagram ) const; + /** Converts the manual positions of all axis titles. */ + void ConvertTitlePositions() const; private: /** Reads a CHAXIS record group containing a single axis. */ diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index ca34d4c6833e..95c3cded8df0 100755 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -43,7 +43,9 @@ namespace com { namespace sun { namespace star { namespace container { class XNameContainer; } namespace lang { class XMultiServiceFactory; } + namespace chart { class XChartDocument; } namespace chart2 { class XChartDocument; } + namespace drawing { class XShape; } } } } class XclRoot; @@ -178,7 +180,8 @@ const sal_Int32 EXC_CHART_AXESSET_NONE = -1; /// For internal use const sal_Int32 EXC_CHART_AXESSET_PRIMARY = 0; /// API primary axes set index. const sal_Int32 EXC_CHART_AXESSET_SECONDARY = 1; /// API secondary axes set index. -const sal_Int32 EXC_CHART_TOTALUNITS = 4000; /// Chart objects are positioned in 1/4000 of chart area. +const sal_Int32 EXC_CHART_TOTALUNITS = 4000; /// Most chart objects are positioned in 1/4000 of chart area. +const sal_Int32 EXC_CHART_PLOTAREAUNITS = 1000; /// For objects that are positioned in 1/1000 of plot area. // (0x0850) CHFRINFO ---------------------------------------------------------- @@ -1023,7 +1026,6 @@ struct XclChLegend struct XclChTypeGroup { - XclChRectangle maRect; /// Position (not used). sal_uInt16 mnFlags; /// Additional flags. sal_uInt16 mnGroupIdx; /// Chart type group index. @@ -1070,7 +1072,6 @@ struct XclChValueRange struct XclChTick { - XclChRectangle maRect; /// Position (not used). Color maTextColor; /// Tick labels color. sal_uInt8 mnMajor; /// Type of tick marks of major grid. sal_uInt8 mnMinor; /// Type of tick marks of minor grid. @@ -1086,7 +1087,6 @@ struct XclChTick struct XclChAxis { - XclChRectangle maRect; /// Position (not used). sal_uInt16 mnType; /// Axis type. explicit XclChAxis(); @@ -1168,16 +1168,6 @@ enum XclChFrameType EXC_CHFRAMETYPE_INVISIBLE /// Missing frame represents invisible formatting. }; -/** Enumerates different text box types for default text formatting. */ -enum XclChTextType -{ - EXC_CHTEXTTYPE_TITLE, /// Chart title. - EXC_CHTEXTTYPE_LEGEND, /// Chart legend. - EXC_CHTEXTTYPE_AXISTITLE, /// Chart axis titles. - EXC_CHTEXTTYPE_AXISLABEL, /// Chart axis labels. - EXC_CHTEXTTYPE_DATALABEL /// Data point labels. -}; - /** Contains information about auto formatting of a specific chart object type. */ struct XclChFormatInfo { @@ -1308,6 +1298,29 @@ private: XclChTypeInfoMap maInfoMap; /// Maps chart types to type info data. }; +// Chart text and title object helpers ======================================== + +/** Enumerates different text box types for default text formatting. */ +enum XclChTextType +{ + EXC_CHTEXTTYPE_TITLE, /// Chart title. + EXC_CHTEXTTYPE_LEGEND, /// Chart legend. + EXC_CHTEXTTYPE_AXISTITLE, /// Chart axis titles. + EXC_CHTEXTTYPE_AXISLABEL, /// Chart axis labels. + EXC_CHTEXTTYPE_DATALABEL /// Data point labels. +}; + +/** A map key for text and title objects. */ +struct XclChTextKey : public ::std::pair< XclChTextType, ::std::pair< sal_uInt16, sal_uInt16 > > +{ + inline explicit XclChTextKey( XclChTextType eTextType, sal_uInt16 nMainIdx = 0, sal_uInt16 nSubIdx = 0 ) + { first = eTextType; second.first = nMainIdx; second.second = nSubIdx; } +}; + +/** Function prototype receiving a chart document and returning a title shape. */ +typedef ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + (*XclChGetShapeFunc)( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDocument >& ); + // Property helpers =========================================================== class XclChObjectTable @@ -1432,9 +1445,10 @@ private: /** Base struct for internal root data structs for import and export. */ struct XclChRootData { - typedef ScfRef< XclChTypeInfoProvider > XclChTypeProvRef; - typedef ScfRef< XclChFormatInfoProvider > XclChFmtInfoProvRef; - typedef ScfRef< XclChObjectTable > XclChObjectTableRef; + typedef ScfRef< XclChTypeInfoProvider > XclChTypeProvRef; + typedef ScfRef< XclChFormatInfoProvider > XclChFmtInfoProvRef; + typedef ScfRef< XclChObjectTable > XclChObjectTableRef; + typedef ::std::map< XclChTextKey, XclChGetShapeFunc > XclChGetShapeFuncMap; ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > mxChartDoc; /// The chart document. @@ -1445,6 +1459,7 @@ struct XclChRootData XclChObjectTableRef mxGradientTable; /// Container for gradient fill styles. XclChObjectTableRef mxHatchTable; /// Container for hatch fill styles. XclChObjectTableRef mxBitmapTable; /// Container for bitmap fill styles. + XclChGetShapeFuncMap maGetShapeFuncs; /// Maps title shape getter functions. sal_Int32 mnBorderGapX; /// Border gap to chart space in 1/100mm. sal_Int32 mnBorderGapY; /// Border gap to chart space in 1/100mm. double mfUnitSizeX; /// Size of a chart X unit (1/4000 of chart width) in 1/100 mm. @@ -1460,6 +1475,10 @@ struct XclChRootData const Rectangle& rChartRect ); /** Finishes the API chart document conversion. Must be called once before any API access. */ void FinishConversion(); + + /** Returns the drawing shape interface of the specified title object. */ + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + GetTitleShape( const XclChTextKey& rTitleKey ) const; }; // ============================================================================ -- cgit v1.2.3 From f37cbc9ae156b5e0fa5dc6a3575c4f593bc448bd Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Thu, 14 Jan 2010 17:35:40 +0100 Subject: chartpositioning: #i86609# more work on importing chart title positions --- oox/inc/oox/drawingml/chart/converterbase.hxx | 20 ++-- oox/inc/oox/drawingml/chart/titleconverter.hxx | 3 +- oox/inc/oox/dump/biffdumper.hxx | 20 ++++ oox/source/drawingml/chart/axisconverter.cxx | 4 +- oox/source/drawingml/chart/chartspaceconverter.cxx | 5 +- oox/source/drawingml/chart/converterbase.cxx | 119 ++++++++++----------- oox/source/drawingml/chart/titleconverter.cxx | 5 +- oox/source/dump/biffdumper.cxx | 4 +- oox/source/dump/biffdumper.ini | 3 +- 9 files changed, 96 insertions(+), 87 deletions(-) diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx index a20edfcbda5f..eddf77b1a5dc 100644 --- a/oox/inc/oox/drawingml/chart/converterbase.hxx +++ b/oox/inc/oox/drawingml/chart/converterbase.hxx @@ -39,7 +39,7 @@ namespace com { namespace sun { namespace star { namespace awt { struct Rectangle; } namespace awt { struct Size; } namespace chart2 { class XChartDocument; } - namespace chart2 { class XTitled; } + namespace chart2 { class XTitle; } namespace drawing { class XShape; } } } } @@ -52,7 +52,6 @@ namespace drawingml { namespace chart { class ChartConverter; -class ObjectFormatter; struct ChartSpaceModel; struct ConverterData; @@ -95,17 +94,12 @@ protected: /** Returns the object formatter. */ ObjectFormatter& getFormatter() const; - /** Registers the main title object and its layout data, needed for - conversion of the title position using the old Chart1 API. */ - void registerMainTitle( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitled >& rxTitled, - const ModelRef< LayoutModel >& rxLayout ); - /** Registers an axis title object and its layout data, needed for - conversion of the title position using the old Chart1 API. */ - void registerAxisTitle( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitled >& rxTitled, - const ModelRef< LayoutModel >& rxLayout, - sal_Int32 nAxesSetIdx, sal_Int32 nAxisIdx ); + /** Registers a title object and its layout data, needed for conversion of + the title position using the old Chart1 API. */ + void registerTitleLayout( + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle >& rxTitle, + const ModelRef< LayoutModel >& rxLayout, ObjectType eObjType, + sal_Int32 nMainIdx = -1, sal_Int32 nSubIdx = -1 ); /** Converts the positions of the main title and all axis titles. */ void convertTitlePositions(); diff --git a/oox/inc/oox/drawingml/chart/titleconverter.hxx b/oox/inc/oox/drawingml/chart/titleconverter.hxx index 86ee8d15bd65..77d19e2a1b54 100644 --- a/oox/inc/oox/drawingml/chart/titleconverter.hxx +++ b/oox/inc/oox/drawingml/chart/titleconverter.hxx @@ -88,7 +88,8 @@ public: /** Creates a title text object and attaches it at the passed interface. */ void convertFromModel( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitled >& rxTitled, - const ::rtl::OUString& rAutoTitle, ObjectType eObjType ); + const ::rtl::OUString& rAutoTitle, ObjectType eObjType, + sal_Int32 nMainIdx = -1, sal_Int32 nSubIdx = -1 ); }; // ============================================================================ diff --git a/oox/inc/oox/dump/biffdumper.hxx b/oox/inc/oox/dump/biffdumper.hxx index cf3a60dd536e..47c37cad2be3 100644 --- a/oox/inc/oox/dump/biffdumper.hxx +++ b/oox/inc/oox/dump/biffdumper.hxx @@ -214,6 +214,10 @@ protected: void dumpRect( const String& rName, const NameListWrapper& rListWrp = NO_LIST, FormatType eFmtType = FORMATTYPE_DEC ); + template< typename Type > + void dumpRectWithGaps( const String& rName, sal_Int32 nGap, + const NameListWrapper& rListWrp = NO_LIST, + FormatType eFmtType = FORMATTYPE_DEC ); sal_uInt16 dumpRepeatedRecId(); void dumpFrHeader( bool bWithFlags, bool bWithRange ); @@ -262,6 +266,22 @@ void BiffObjectBase::dumpRect( const String& rName, writeRectItem( rName, nLeft, nTop, nWidth, nHeight, rListWrp, eFmtType ); } +template< typename Type > +void BiffObjectBase::dumpRectWithGaps( const String& rName, sal_Int32 nGap, + const NameListWrapper& rListWrp, FormatType eFmtType ) +{ + Type nLeft, nTop, nWidth, nHeight; + *mxBiffStrm >> nLeft; + mxBiffStrm->skip( nGap ); + *mxBiffStrm >> nTop; + mxBiffStrm->skip( nGap ); + *mxBiffStrm >> nWidth; + mxBiffStrm->skip( nGap ); + *mxBiffStrm >> nHeight; + mxBiffStrm->skip( nGap ); + writeRectItem( rName, nLeft, nTop, nWidth, nHeight, rListWrp, eFmtType ); +} + // ============================================================================ // ============================================================================ diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index b586592f8fba..2e215f681458 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -310,9 +310,7 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo { Reference< XTitled > xTitled( xAxis, UNO_QUERY_THROW ); TitleConverter aTitleConv( *this, *mrModel.mxTitle ); - aTitleConv.convertFromModel( xTitled, CREATE_OUSTRING( "Axis Title" ), OBJECTTYPE_AXISTITLE ); - // register the title and layout data for conversion of position - registerAxisTitle( xTitled, mrModel.mxTitle->mxLayout, nAxesSetIdx, nAxisIdx ); + aTitleConv.convertFromModel( xTitled, CREATE_OUSTRING( "Axis Title" ), OBJECTTYPE_AXISTITLE, nAxesSetIdx, nAxisIdx ); } } catch( Exception& ) diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index fe0ba19b5fea..36e09ab02767 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -115,12 +115,9 @@ void ChartSpaceConverter::convertFromModel() { if( aAutoTitle.getLength() == 0 ) aAutoTitle = CREATE_OUSTRING( "Chart Title" ); - TitleModel& rTitle = mrModel.mxTitle.getOrCreate(); Reference< XTitled > xTitled( getChartDocument(), UNO_QUERY_THROW ); - TitleConverter aTitleConv( *this, rTitle ); + TitleConverter aTitleConv( *this, mrModel.mxTitle.getOrCreate() ); aTitleConv.convertFromModel( xTitled, aAutoTitle, OBJECTTYPE_CHARTTITLE ); - // register the title and layout data for conversion of position - registerMainTitle( xTitled, rTitle.mxLayout ); } } catch( Exception& ) diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index 41702b58bd8e..5f4e768a7abd 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -34,13 +34,12 @@ #include #include #include -#include #include #include #include +#include #include #include -#include #include // for F_PI180 #include "properties.hxx" #include "oox/core/xmlfilterbase.hxx" @@ -61,7 +60,7 @@ using ::com::sun::star::awt::Rectangle; using ::com::sun::star::awt::Size; using ::com::sun::star::chart2::RelativePosition; using ::com::sun::star::chart2::XChartDocument; -using ::com::sun::star::chart2::XTitled; +using ::com::sun::star::chart2::XTitle; using ::com::sun::star::drawing::XShape; using ::oox::core::XmlFilterBase; @@ -75,15 +74,23 @@ namespace chart { namespace { -/** A helper structure to store all data related to axis titles. Needed for the - conversion of manual axis title positions that needs the old Chart1 API. +struct TitleKey : public ::std::pair< ObjectType, ::std::pair< sal_Int32, sal_Int32 > > +{ + inline explicit TitleKey( ObjectType eObjType, sal_Int32 nMainIdx = -1, sal_Int32 nSubIdx = -1 ) + { first = eObjType; second.first = nMainIdx; second.second = nSubIdx; } +}; + +// ---------------------------------------------------------------------------- + +/** A helper structure to store all data related to title objects. Needed for + the conversion of manual title positions that needs the old Chart1 API. */ struct TitleLayoutInfo { typedef Reference< XShape > (*GetShapeFunc)( const Reference< cssc::XChartDocument >& ); - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitled > - mxTitled; /// The API title supplier. + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > + mxTitle; /// The API title object. ModelRef< LayoutModel > mxLayout; /// The layout model, if existing. GetShapeFunc mpGetShape; /// Helper function to receive the title shape. @@ -96,13 +103,13 @@ struct TitleLayoutInfo void TitleLayoutInfo::convertTitlePos( ConverterRoot& rRoot, const Reference< cssc::XChartDocument >& rxChart1Doc ) { - if( mxTitled.is() && mpGetShape ) try + if( mxTitle.is() && mpGetShape ) try { // try to get the title shape Reference< XShape > xTitleShape( mpGetShape( rxChart1Doc ), UNO_SET_THROW ); // get title rotation angle, needed for correction of position of top-left edge double fAngle = 0.0; - PropertySet aTitleProp( mxTitled->getTitleObject() ); + PropertySet aTitleProp( mxTitle ); aTitleProp.getProperty( fAngle, PROP_TextRotation ); // convert the position LayoutModel& rLayout = mxLayout.getOrCreate(); @@ -116,46 +123,41 @@ void TitleLayoutInfo::convertTitlePos( ConverterRoot& rRoot, const Reference< cs // ---------------------------------------------------------------------------- -typedef ::std::pair< sal_Int32, sal_Int32 > AxisKey; -typedef ::std::map< AxisKey, TitleLayoutInfo > AxisTitleMap; - -// ---------------------------------------------------------------------------- - /* The following local functions implement getting the XShape interface of all supported title objects (chart and axes). This needs some effort due to the design of the old Chart1 API used to access these objects. */ -/** Returns the drawing shape of the main title, if existing. */ -Reference< XShape > lclGetMainTitleShape( const Reference< cssc::XChartDocument >& rxChart1Doc ) -{ - PropertySet aPropSet( rxChart1Doc ); - if( rxChart1Doc.is() && aPropSet.getBoolProperty( PROP_HasMainTitle ) ) - return rxChart1Doc->getTitle(); - return Reference< XShape >(); -} +/** A code fragment that returns a shape object from the passed shape supplier + using the specified interface function. Checks a boolean property first. */ +#define OOX_FRAGMENT_GETTITLESHAPE( shape_supplier, supplier_func, property_name ) \ + PropertySet aPropSet( shape_supplier ); \ + if( shape_supplier.is() && aPropSet.getBoolProperty( PROP_##property_name ) ) \ + return shape_supplier->supplier_func(); \ + return Reference< XShape >(); \ -/** Implements a function returning the drawing shape of an axis title, if existing. */ -#define OOX_DEFINEFUNC_GETAXISTITLE( func_name, interface_type, interface_func, property_name ) \ +/** Implements a function returning the drawing shape of an axis title, if + existing, using the specified API interface and its function. */ +#define OOX_DEFINEFUNC_GETAXISTITLESHAPE( func_name, interface_type, supplier_func, property_name ) \ Reference< XShape > func_name( const Reference< cssc::XChartDocument >& rxChart1Doc ) \ { \ - try \ - { \ - Reference< cssc::interface_type > xAxisSupp( rxChart1Doc->getDiagram(), UNO_QUERY_THROW ); \ - PropertySet aPropSet( xAxisSupp ); \ - if( aPropSet.getBoolProperty( PROP_##property_name ) ) \ - return xAxisSupp->interface_func(); \ - } \ - catch( Exception& ) {} \ - return Reference< XShape >(); \ + Reference< cssc::interface_type > xAxisSupp( rxChart1Doc->getDiagram(), UNO_QUERY ); \ + OOX_FRAGMENT_GETTITLESHAPE( xAxisSupp, supplier_func, property_name ) \ +} + +/** Returns the drawing shape of the main title, if existing. */ +Reference< XShape > lclGetMainTitleShape( const Reference< cssc::XChartDocument >& rxChart1Doc ) +{ + OOX_FRAGMENT_GETTITLESHAPE( rxChart1Doc, getTitle, HasMainTitle ) } -OOX_DEFINEFUNC_GETAXISTITLE( lclGetXAxisTitleShape, XAxisXSupplier, getXAxisTitle, HasXAxisTitle ) -OOX_DEFINEFUNC_GETAXISTITLE( lclGetYAxisTitleShape, XAxisYSupplier, getYAxisTitle, HasYAxisTitle ) -OOX_DEFINEFUNC_GETAXISTITLE( lclGetZAxisTitleShape, XAxisZSupplier, getZAxisTitle, HasZAxisTitle ) -OOX_DEFINEFUNC_GETAXISTITLE( lclGetSecXAxisTitleShape, XSecondAxisTitleSupplier, getSecondXAxisTitle, HasSecondaryXAxisTitle ) -OOX_DEFINEFUNC_GETAXISTITLE( lclGetSecYAxisTitleShape, XSecondAxisTitleSupplier, getSecondYAxisTitle, HasSecondaryYAxisTitle ) +OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetXAxisTitleShape, XAxisXSupplier, getXAxisTitle, HasXAxisTitle ) +OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetYAxisTitleShape, XAxisYSupplier, getYAxisTitle, HasYAxisTitle ) +OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetZAxisTitleShape, XAxisZSupplier, getZAxisTitle, HasZAxisTitle ) +OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetSecXAxisTitleShape, XSecondAxisTitleSupplier, getSecondXAxisTitle, HasSecondaryXAxisTitle ) +OOX_DEFINEFUNC_GETAXISTITLESHAPE( lclGetSecYAxisTitleShape, XSecondAxisTitleSupplier, getSecondYAxisTitle, HasSecondaryYAxisTitle ) -#undef OOX_DEFINEFUNC_GETAXISTITLE +#undef OOX_DEFINEFUNC_GETAXISTITLESHAPE +#undef OOX_IMPLEMENT_GETTITLESHAPE } // namespace @@ -163,13 +165,14 @@ OOX_DEFINEFUNC_GETAXISTITLE( lclGetSecYAxisTitleShape, XSecondAxisTitleSupplier, struct ConverterData { + typedef ::std::map< TitleKey, TitleLayoutInfo > TitleMap; + ObjectFormatter maFormatter; XmlFilterBase& mrFilter; ChartConverter& mrConverter; Reference< XChartDocument > mxDoc; Size maSize; - TitleLayoutInfo maMainTitle; - AxisTitleMap maAxisTitles; + TitleMap maTitles; explicit ConverterData( XmlFilterBase& rFilter, @@ -206,12 +209,12 @@ ConverterData::ConverterData( } // prepare conversion of title positions - maMainTitle.mpGetShape = lclGetMainTitleShape; - maAxisTitles[ AxisKey( API_PRIM_AXESSET, API_X_AXIS ) ].mpGetShape = lclGetXAxisTitleShape; - maAxisTitles[ AxisKey( API_PRIM_AXESSET, API_Y_AXIS ) ].mpGetShape = lclGetYAxisTitleShape; - maAxisTitles[ AxisKey( API_PRIM_AXESSET, API_Z_AXIS ) ].mpGetShape = lclGetZAxisTitleShape; - maAxisTitles[ AxisKey( API_SECN_AXESSET, API_X_AXIS ) ].mpGetShape = lclGetSecXAxisTitleShape; - maAxisTitles[ AxisKey( API_SECN_AXESSET, API_Y_AXIS ) ].mpGetShape = lclGetSecYAxisTitleShape; + maTitles[ TitleKey( OBJECTTYPE_CHARTTITLE ) ].mpGetShape = lclGetMainTitleShape; + maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_PRIM_AXESSET, API_X_AXIS ) ].mpGetShape = lclGetXAxisTitleShape; + maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_PRIM_AXESSET, API_Y_AXIS ) ].mpGetShape = lclGetYAxisTitleShape; + maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_PRIM_AXESSET, API_Z_AXIS ) ].mpGetShape = lclGetZAxisTitleShape; + maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_SECN_AXESSET, API_X_AXIS ) ].mpGetShape = lclGetSecXAxisTitleShape; + maTitles[ TitleKey( OBJECTTYPE_AXISTITLE, API_SECN_AXESSET, API_Y_AXIS ) ].mpGetShape = lclGetSecYAxisTitleShape; } ConverterData::~ConverterData() @@ -282,20 +285,13 @@ ObjectFormatter& ConverterRoot::getFormatter() const return mxData->maFormatter; } -void ConverterRoot::registerMainTitle( const Reference< XTitled >& rxTitled, const ModelRef< LayoutModel >& rxLayout ) -{ - OSL_ENSURE( rxTitled.is(), "ConverterRoot::registerMainTitle - missing title supplier" ); - mxData->maMainTitle.mxTitled = rxTitled; - mxData->maMainTitle.mxLayout = rxLayout; -} - -void ConverterRoot::registerAxisTitle( const Reference< XTitled >& rxTitled, - const ModelRef< LayoutModel >& rxLayout, sal_Int32 nAxesSetIdx, sal_Int32 nAxisIdx ) +void ConverterRoot::registerTitleLayout( const Reference< XTitle >& rxTitle, + const ModelRef< LayoutModel >& rxLayout, ObjectType eObjType, sal_Int32 nMainIdx, sal_Int32 nSubIdx ) { - OSL_ENSURE( rxTitled.is(), "ConverterRoot::registerAxisTitle - missing axis title supplier" ); - TitleLayoutInfo& rTitleInfo = mxData->maAxisTitles[ AxisKey( nAxesSetIdx, nAxisIdx ) ]; - OSL_ENSURE( rTitleInfo.mpGetShape, "ConverterRoot::registerAxisTitle - invalid axis key" ); - rTitleInfo.mxTitled = rxTitled; + OSL_ENSURE( rxTitle.is(), "ConverterRoot::registerTitleLayout - missing title object" ); + TitleLayoutInfo& rTitleInfo = mxData->maTitles[ TitleKey( eObjType, nMainIdx, nSubIdx ) ]; + OSL_ENSURE( rTitleInfo.mpGetShape, "ConverterRoot::registerTitleLayout - invalid title key" ); + rTitleInfo.mxTitle = rxTitle; rTitleInfo.mxLayout = rxLayout; } @@ -304,8 +300,7 @@ void ConverterRoot::convertTitlePositions() try { Reference< cssc::XChartDocument > xChart1Doc( mxData->mxDoc, UNO_QUERY_THROW ); - mxData->maMainTitle.convertTitlePos( *this, xChart1Doc ); - for( AxisTitleMap::iterator aIt = mxData->maAxisTitles.begin(), aEnd = mxData->maAxisTitles.end(); aIt != aEnd; ++aIt ) + for( ConverterData::TitleMap::iterator aIt = mxData->maTitles.begin(), aEnd = mxData->maTitles.end(); aIt != aEnd; ++aIt ) aIt->second.convertTitlePos( *this, xChart1Doc ); } catch( Exception& ) diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index bcddb7fec602..ca701c0749bc 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -157,7 +157,7 @@ TitleConverter::~TitleConverter() { } -void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, const OUString& rAutoTitle, ObjectType eObjType ) +void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, const OUString& rAutoTitle, ObjectType eObjType, sal_Int32 nMainIdx, sal_Int32 nSubIdx ) { if( rxTitled.is() ) { @@ -180,6 +180,9 @@ void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, con OSL_ENSURE( !mrModel.mxTextProp || !rText.mxTextBody, "TitleConverter::convertFromModel - multiple text properties" ); ModelRef< TextBody > xTextProp = mrModel.mxTextProp.is() ? mrModel.mxTextProp : rText.mxTextBody; getFormatter().convertTextRotation( aPropSet, xTextProp, true ); + + // register the title and layout data for conversion of position + registerTitleLayout( xTitle, mrModel.mxLayout, eObjType, nMainIdx, nSubIdx ); } catch( Exception& ) { diff --git a/oox/source/dump/biffdumper.cxx b/oox/source/dump/biffdumper.cxx index 1ecf1ab05046..2a341ec11538 100644 --- a/oox/source/dump/biffdumper.cxx +++ b/oox/source/dump/biffdumper.cxx @@ -1698,7 +1698,7 @@ void WorkbookStreamObject::implDumpRecordBody() case BIFF_ID_CHAXESSET: dumpDec< sal_uInt16 >( "axesset-id", "CHAXESSET-ID" ); - dumpRect< sal_Int32 >( "position", (eBiff <= BIFF4) ? "CONV-TWIP-TO-CM" : "" ); + dumpRect< sal_Int32 >( "inner-plotarea-pos", (eBiff <= BIFF4) ? "CONV-TWIP-TO-CM" : "" ); break; case BIFF_ID_CHAXIS: @@ -1748,7 +1748,7 @@ void WorkbookStreamObject::implDumpRecordBody() case BIFF_ID_CHFRAMEPOS: dumpDec< sal_uInt16 >( "tl-mode", "CHFRAMEPOS-POSMODE" ); dumpDec< sal_uInt16 >( "br-mode", "CHFRAMEPOS-POSMODE" ); - dumpRect< sal_Int32 >( "position", (eBiff <= BIFF4) ? "CONV-TWIP-TO-CM" : "" ); + dumpRectWithGaps< sal_Int16 >( "position", 2 ); break; case BIFF_ID_CHFRBLOCKBEGIN: diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini index 8cbe16521b12..8ecb7555d8f3 100644 --- a/oox/source/dump/biffdumper.ini +++ b/oox/source/dump/biffdumper.ini @@ -1,4 +1,4 @@ - + # dumper settings ============================================================ # Path to additional configuration data, relative to this file. @@ -880,6 +880,7 @@ shortlist=CHLINEFORMAT-LINEWEIGHT,-1,hair,thin,medium,thick flagslist=CHLINEFORMAT-FLAGS 0x0001=auto 0x0004=axis-enabled + 0x0008=system-color end # CHMARKERFORMAT ------------------------------------------------------------- -- cgit v1.2.3 From 68074bab39bb2324ce4a4db1aadc9e4c1d4b1d60 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 15 Jan 2010 16:04:24 +0100 Subject: #i107721# new thesaurus dialog --- svx/inc/svx/dialogs.hrc | 2 -- svx/inc/svx/thesdlg.hxx | 26 +++++++------- svx/source/dialog/thesdlg.cxx | 2 +- svx/source/dialog/thesdlg.src | 80 +++---------------------------------------- 4 files changed, 18 insertions(+), 92 deletions(-) mode change 100644 => 100755 svx/inc/svx/dialogs.hrc diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc old mode 100644 new mode 100755 index c7cddf48e27c..a6eb98144aaa --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -182,7 +182,6 @@ // ResId fuer die Linguistik-Dialoge #define RID_SVXDLG_HYPHENATE (RID_SVX_START + 30) #define RID_SVXDLG_THESAURUS (RID_SVX_START + 31) -#define RID_SVXDLG_THES_LANGUAGE (RID_SVX_START + 38) // ResIds fuer HM-QueryBoxen und Error-Strings #define RID_SVXQB_THESAURUS (RID_SVX_START + 33) @@ -190,7 +189,6 @@ #define RID_SVXQB_BODYTEXT (RID_SVX_START + 35) #define RID_SVXQB_SPECIAL (RID_SVX_START + 36) #define RID_SVXQB_SPECIAL_FORCED (RID_SVX_START + 37) -// + 38 ist vergeben, siehe RID_SVXDLG_THES_LANGUAGE #define RID_SVXQB_BW_CONTINUE (RID_SVX_START + 39) // ResId's fuer Dialoge aus StarDraw diff --git a/svx/inc/svx/thesdlg.hxx b/svx/inc/svx/thesdlg.hxx index 78b1d372dcc9..9ec4d21f7549 100755 --- a/svx/inc/svx/thesdlg.hxx +++ b/svx/inc/svx/thesdlg.hxx @@ -54,23 +54,12 @@ class SVX_DLLPUBLIC SvxThesaurusDialog : public SvxStandardDialog { boost::shared_ptr< SvxThesaurusDialog_Impl > m_pImpl; -public: - - SvxThesaurusDialog( Window* pParent, - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, - const String &rWord, sal_Int16 nLanguage ); - ~SvxThesaurusDialog(); - - String GetWord(); - sal_uInt16 GetLanguage() const; - - SVX_DLLPRIVATE virtual void Apply(); - #ifdef _SVX_THESDLG_CXX SVX_DLLPRIVATE bool UpdateAlternativesBox_Impl(); SVX_DLLPRIVATE void SetWindowTitle(sal_Int16 nLanguage); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XMeaning > > SAL_CALL queryMeanings_Impl( ::rtl::OUString& rTerm, const ::com::sun::star::lang::Locale& rLocale, const ::com::sun::star::beans::PropertyValues& rProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XMeaning > > SAL_CALL + queryMeanings_Impl( ::rtl::OUString& rTerm, const ::com::sun::star::lang::Locale& rLocale, const ::com::sun::star::beans::PropertyValues& rProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); // Handler DECL_LINK( LanguageHdl_Impl, MenuButton * ); @@ -79,6 +68,17 @@ public: DECL_LINK( AlternativesSelectHdl_Impl, SvxCheckListBox * ); DECL_LINK( AlternativesDoubleClickHdl_Impl, SvxCheckListBox * ); #endif + + SVX_DLLPRIVATE virtual void Apply(); + +public: + SvxThesaurusDialog( Window* pParent, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, + const String &rWord, sal_Int16 nLanguage ); + ~SvxThesaurusDialog(); + + String GetWord(); + sal_uInt16 GetLanguage() const; }; #endif diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index 6212f2f7a1a3..25dca8f3cc4a 100755 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -220,7 +220,7 @@ void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rKey = rKEvt.GetKeyCode(); - if (rKey.GetCode() == KEY_RETURN) + if (rKey.GetCode() == KEY_RETURN || rKey.GetCode() == KEY_ESCAPE) GetParent()->KeyInput( rKEvt ); // parent will close dialog... else if ( GetEntryCount() ) SvxCheckListBox::KeyInput( rKEvt ); diff --git a/svx/source/dialog/thesdlg.src b/svx/source/dialog/thesdlg.src index 21308f95ec4f..9af5fc0b49a5 100755 --- a/svx/source/dialog/thesdlg.src +++ b/svx/source/dialog/thesdlg.src @@ -80,15 +80,13 @@ ModalDialog RID_SVXDLG_THESAURUS Size = MAP_APPFONT ( 209 , 121 ) ; Border = TRUE; TabStop = TRUE ; -// ??? DialogControl = TRUE; -// ??? OutputSize = TRUE ; }; FixedText FT_REPL { Pos = MAP_APPFONT ( 5 , 173 ) ; Size = MAP_APPFONT ( 143 , 8 ) ; - Text [ en-US ] = "~Replace with" ; + Text [ en-US ] = "Replace ~with" ; LEFT = TRUE ; }; Edit ED_REPL @@ -108,7 +106,6 @@ ModalDialog RID_SVXDLG_THESAURUS { Pos = MAP_APPFONT ( 0 , 200 ) ; Size = MAP_APPFONT ( 220 , 8 ) ; -// Text [ en-US ] = "Variations" ; }; @@ -119,8 +116,9 @@ ModalDialog RID_SVXDLG_THESAURUS }; OkButton BTN_THES_OK { - Pos = MAP_APPFONT ( 88 , 210 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; + Pos = MAP_APPFONT ( 70 , 210 ) ; + Size = MAP_APPFONT ( 79 , 14 ) ; + Text [ en-US ] = "~Replace" ; DefButton = TRUE ; }; CancelButton BTN_THES_CANCEL @@ -134,74 +132,4 @@ ModalDialog RID_SVXDLG_THESAURUS Text [ en-US ] = "Word not found in thesaurus" ; }; }; - // RID_SVXDLG_THES_LANGUAGE ---------------------------------------------- -ModalDialog RID_SVXDLG_THES_LANGUAGE -{ - HelpId = HID_THES_LANGUAGE ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 170 , 86 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Sprache auswählen : Sprache auswõhlen */ - /* ### ACHTUNG: Neuer Text in Resource? Sprache auswählen : Sprache auswõhlen */ - Text [ en-US ] = "Select Language" ; - Moveable = TRUE ; - ListBox LB_THES_LANGUAGE - { - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 90 , 60 ) ; - Sort = TRUE ; - }; - FixedLine FL_THES_LANGUAGE - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 102 , 8 ) ; - Text [ en-US ] = "Selection" ; - }; - OKButton BTN_LANG_OK - { - Pos = MAP_APPFONT ( 114 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton BTN_LANG_CANCEL - { - Pos = MAP_APPFONT ( 114 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - HelpButton BTN_LANG_HELP - { - Pos = MAP_APPFONT ( 114 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; -}; - // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From 89c3e0a86b1143039adc34d979693bdcf675949b Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 15 Jan 2010 16:06:34 +0100 Subject: #i108358# new hyphenation dialog --- svx/source/dialog/hyphen.cxx | 349 +++++++++++++++++++++++++------------------ svx/source/dialog/hyphen.hrc | 3 +- svx/source/dialog/hyphen.hxx | 62 +++----- svx/source/dialog/hyphen.src | 87 +++++------ 4 files changed, 258 insertions(+), 243 deletions(-) mode change 100644 => 100755 svx/source/dialog/hyphen.cxx mode change 100644 => 100755 svx/source/dialog/hyphen.hrc mode change 100644 => 100755 svx/source/dialog/hyphen.hxx mode change 100644 => 100755 svx/source/dialog/hyphen.src diff --git a/svx/source/dialog/hyphen.cxx b/svx/source/dialog/hyphen.cxx old mode 100644 new mode 100755 index 34c7a1cfa21b..0fedaf7f5cf8 --- a/svx/source/dialog/hyphen.cxx +++ b/svx/source/dialog/hyphen.cxx @@ -49,19 +49,9 @@ #include "dlgutil.hxx" #include #include -#ifndef _USR_USTRING_HXX -//#include -#endif using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::linguistic2; -#undef S2U -#undef U2S -//#define S2U(s) StringToOUString(s, CHARSET_SYSTEM) -//#define U2S(s) OUStringToString(s, CHARSET_SYSTEM) // define ---------------------------------------------------------------- @@ -108,57 +98,107 @@ void SvxHyphenEdit::KeyInput( const KeyEvent& rKEvt ) } } -// class SvxHyphenWordDialog --------------------------------------------- +// struct SvxHyphenWordDialog_Impl --------------------------------------------- -SvxHyphenWordDialog::SvxHyphenWordDialog( const String &rWord, LanguageType nLang, - Window* pParent, - Reference< XHyphenator > &xHyphen, - SvxSpellWrapper* pWrapper ) : - SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_HYPHENATE ) ), - - aWordFT ( this, SVX_RES( FT_WORD ) ), - aWordEdit ( this, SVX_RES( ED_WORD ) ), - aLeftBtn ( this, SVX_RES( BTN_LEFT ) ), - aRightBtn ( this, SVX_RES( BTN_RIGHT ) ), - aOkBtn ( this, SVX_RES( BTN_HYPH_CUT ) ), - aCancelBtn ( this, SVX_RES( BTN_HYPH_CANCEL ) ), - aContBtn ( this, SVX_RES( BTN_HYPH_CONTINUE ) ), - aDelBtn ( this, SVX_RES( BTN_HYPH_DELETE ) ), - aHelpBtn ( this, SVX_RES( BTN_HYPH_HELP ) ), - aLabel ( GetText() ), - pHyphWrapper ( pWrapper ), - xHyphenator ( xHyphen ), - aActWord ( rWord ), - nActLanguage ( nLang ), +struct SvxHyphenWordDialog_Impl +{ + FixedText aWordFT; + SvxHyphenEdit aWordEdit; + ImageButton aLeftBtn; + ImageButton aRightBtn; + OKButton aOkBtn; + PushButton aContBtn; + PushButton aDelBtn; + FixedLine aFLBottom; + HelpButton aHelpBtn; + PushButton aHyphAll; + CancelButton aCancelBtn; + String aLabel; + SvxSpellWrapper* pHyphWrapper; + uno::Reference< linguistic2::XHyphenator > xHyphenator; + uno::Reference< linguistic2::XPossibleHyphens > xPossHyph; + String aActWord; // actual (to be displayed) word + LanguageType nActLanguage; // and language + sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos + sal_uInt16 nHyphPos; + sal_uInt16 nOldPos; + sal_Bool bBusy; + + SvxHyphenWordDialog_Impl( Window* pParent ); + ~SvxHyphenWordDialog_Impl(); +}; + + +SvxHyphenWordDialog_Impl::SvxHyphenWordDialog_Impl( Window* pParent ) : + aWordFT ( pParent, SVX_RES( FT_WORD ) ), + aWordEdit ( pParent, SVX_RES( ED_WORD ) ), + aLeftBtn ( pParent, SVX_RES( BTN_LEFT ) ), + aRightBtn ( pParent, SVX_RES( BTN_RIGHT ) ), + aOkBtn ( pParent, SVX_RES( BTN_HYPH_CUT ) ), + aContBtn ( pParent, SVX_RES( BTN_HYPH_CONTINUE ) ), + aDelBtn ( pParent, SVX_RES( BTN_HYPH_DELETE ) ), + aFLBottom ( pParent, SVX_RES( FL_BOTTOM ) ), + aHelpBtn ( pParent, SVX_RES( BTN_HYPH_HELP ) ), + aHyphAll ( pParent, SVX_RES( BTN_HYPH_ALL ) ), + aCancelBtn ( pParent, SVX_RES( BTN_HYPH_CANCEL ) ), + aLabel ( ), + pHyphWrapper ( NULL ), + xHyphenator ( NULL ), + xPossHyph ( NULL ), + aActWord ( ), + nActLanguage ( LANGUAGE_NONE ), + nMaxHyphenationPos ( 0 ), nHyphPos ( 0 ), nOldPos ( 0 ), bBusy ( sal_False ) { - aContBtn.SetClickHdl( - LINK( this, SvxHyphenWordDialog, ContinueHdl_Impl ) ); - aOkBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, CutHdl_Impl ) ); - aDelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, DeleteHdl_Impl ) ); - aCancelBtn.SetClickHdl( - LINK( this, SvxHyphenWordDialog, CancelHdl_Impl ) ); - aLeftBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Left_Impl ) ); - aRightBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Right_Impl ) ); - - aWordEdit.SetGetFocusHdl( - LINK( this, SvxHyphenWordDialog, GetFocusHdl_Impl ) ); - - Reference< XHyphenatedWord > xHyphWord( pWrapper ? - pWrapper->GetLast() : Reference< XInterface > () , UNO_QUERY ); +} + + +SvxHyphenWordDialog_Impl::~SvxHyphenWordDialog_Impl() +{ +} + +// class SvxHyphenWordDialog --------------------------------------------- + +SvxHyphenWordDialog::SvxHyphenWordDialog( + const String &rWord, LanguageType nLang, + Window* pParent, + uno::Reference< linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ) : + + SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_HYPHENATE ) ) +{ + m_pImpl = boost::shared_ptr< SvxHyphenWordDialog_Impl >(new SvxHyphenWordDialog_Impl( this )); + + FreeResource(); + + m_pImpl->aLabel = GetText(); + m_pImpl->pHyphWrapper = pWrapper; + m_pImpl->xHyphenator = xHyphen; + m_pImpl->aActWord = rWord; + m_pImpl->nActLanguage = nLang; + + m_pImpl->aLeftBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Left_Impl ) ); + m_pImpl->aRightBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Right_Impl ) ); + m_pImpl->aOkBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, CutHdl_Impl ) ); + m_pImpl->aContBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, ContinueHdl_Impl ) ); + m_pImpl->aDelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, DeleteHdl_Impl ) ); + m_pImpl->aHyphAll.SetClickHdl( LINK( this, SvxHyphenWordDialog, HyphenateAllHdl_Impl ) ); + m_pImpl->aCancelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, CancelHdl_Impl ) ); + m_pImpl->aWordEdit.SetGetFocusHdl( LINK( this, SvxHyphenWordDialog, GetFocusHdl_Impl ) ); + + uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pWrapper ? + pWrapper->GetLast() : uno::Reference< uno::XInterface > () , uno::UNO_QUERY ); DBG_ASSERT(xHyphWord.is(), "missing hyphenated word"); - nMaxHyphenationPos = xHyphWord.is() ? xHyphWord->getHyphenationPos() : 0; + m_pImpl->nMaxHyphenationPos = xHyphWord.is() ? xHyphWord->getHyphenationPos() : 0; SetLabel_Impl( nLang ); InitControls_Impl(); - aWordEdit.GrabFocus(); - - FreeResource(); + m_pImpl->aWordEdit.GrabFocus(); // disable controls if service is not available - if (!xHyphenator.is()) + if (!m_pImpl->xHyphenator.is()) Enable( sal_False ); } @@ -166,25 +206,25 @@ SvxHyphenWordDialog::SvxHyphenWordDialog( const String &rWord, LanguageType nLan void SvxHyphenWordDialog::SelLeft() { - String aTxt( aWordEdit.GetText() ); + String aTxt( m_pImpl->aWordEdit.GetText() ); - for ( xub_StrLen i = nOldPos + 1; i-- > 0 ; ) + for ( xub_StrLen i = m_pImpl->nOldPos + 1; i-- > 0 ; ) { DBG_ASSERT(i <= aTxt.Len(), "index out of range"); if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) { aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); - if ( nOldPos != 0 && nOldPos != aTxt.Len() ) - aTxt.SetChar( nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); - nOldPos = i; - aWordEdit.SetText( aTxt ); - aWordEdit.GrabFocus(); - aWordEdit.SetSelection( Selection( i, i + 1 ) ); + if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() ) + aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); + m_pImpl->nOldPos = i; + m_pImpl->aWordEdit.SetText( aTxt ); + m_pImpl->aWordEdit.GrabFocus(); + m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) ); break; } } - nHyphPos = GetHyphIndex_Impl(); + m_pImpl->nHyphPos = GetHyphIndex_Impl(); EnableLRBtn_Impl(); } @@ -192,24 +232,24 @@ void SvxHyphenWordDialog::SelLeft() void SvxHyphenWordDialog::SelRight() { - String aTxt( aWordEdit.GetText() ); + String aTxt( m_pImpl->aWordEdit.GetText() ); - for ( xub_StrLen i = nOldPos + 1; i < aTxt.Len(); ++i ) + for ( xub_StrLen i = m_pImpl->nOldPos + 1; i < aTxt.Len(); ++i ) { if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) { aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); - if ( nOldPos != 0 && nOldPos != aTxt.Len() ) - aTxt.SetChar( nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); - nOldPos = i; - aWordEdit.SetText( aTxt ); - aWordEdit.GrabFocus(); - aWordEdit.SetSelection( Selection( i, i + 1 ) ); + if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() ) + aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); + m_pImpl->nOldPos = i; + m_pImpl->aWordEdit.SetText( aTxt ); + m_pImpl->aWordEdit.GrabFocus(); + m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) ); break; } } - nHyphPos = GetHyphIndex_Impl(); + m_pImpl->nHyphPos = GetHyphIndex_Impl(); EnableLRBtn_Impl(); } @@ -217,29 +257,29 @@ void SvxHyphenWordDialog::SelRight() void SvxHyphenWordDialog::EnableLRBtn_Impl() { - String aTxt( aWordEdit.GetText() ); + String aTxt( m_pImpl->aWordEdit.GetText() ); xub_StrLen nLen = aTxt.Len(); xub_StrLen i; - aRightBtn.Disable(); - for ( i = nOldPos + 2; i < nLen; ++i ) + m_pImpl->aRightBtn.Disable(); + for ( i = m_pImpl->nOldPos + 2; i < nLen; ++i ) { if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) { - aRightBtn.Enable(); + m_pImpl->aRightBtn.Enable(); break; } } - DBG_ASSERT(nOldPos < aTxt.Len(), "nOldPos out of range"); - if (nOldPos >= aTxt.Len()) - nOldPos = aTxt.Len() - 1; - aLeftBtn.Disable(); - for ( i = nOldPos; i-- > 0; ) + DBG_ASSERT(m_pImpl->nOldPos < aTxt.Len(), "m_pImpl->nOldPos out of range"); + if (m_pImpl->nOldPos >= aTxt.Len()) + m_pImpl->nOldPos = aTxt.Len() - 1; + m_pImpl->aLeftBtn.Disable(); + for ( i = m_pImpl->nOldPos; i-- > 0; ) { if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) { - aLeftBtn.Enable(); + m_pImpl->aLeftBtn.Enable(); break; } } @@ -251,7 +291,7 @@ void SvxHyphenWordDialog::EnableLRBtn_Impl() void SvxHyphenWordDialog::SetLabel_Impl( LanguageType nLang ) { String aLangStr( ::GetLanguageString( nLang ) ); - String aTmp( aLabel ); + String aTmp( m_pImpl->aLabel ); aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ); aTmp.Append( aLangStr ); aTmp.Append( sal_Unicode( ')' ) ); @@ -261,7 +301,7 @@ void SvxHyphenWordDialog::SetLabel_Impl( LanguageType nLang ) // ----------------------------------------------------------------------- String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( - Reference< XPossibleHyphens > &rxPossHyph, + uno::Reference< linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 _nMaxHyphenationPos ) { // returns a String showing only those hyphen positions which will result @@ -273,7 +313,7 @@ String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( { aTxt = String( rxPossHyph->getPossibleHyphens() ); - Sequence< sal_Int16 > aHyphenationPositions( + uno::Sequence< sal_Int16 > aHyphenationPositions( rxPossHyph->getHyphenationPositions() ); sal_Int32 nLen = aHyphenationPositions.getLength(); const sal_Int16 *pHyphenationPos = aHyphenationPositions.getConstArray(); @@ -320,21 +360,21 @@ String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( void SvxHyphenWordDialog::InitControls_Impl() { String aTxt; - xPossHyph = NULL; - if (xHyphenator.is()) + m_pImpl->xPossHyph = NULL; + if (m_pImpl->xHyphenator.is()) { - lang::Locale aLocale( SvxCreateLocale(nActLanguage) ); - xPossHyph = xHyphenator->createPossibleHyphens( aActWord, aLocale, - Sequence< PropertyValue >() ); - if (xPossHyph.is()) + lang::Locale aLocale( SvxCreateLocale(m_pImpl->nActLanguage) ); + m_pImpl->xPossHyph = m_pImpl->xHyphenator->createPossibleHyphens( m_pImpl->aActWord, aLocale, + uno::Sequence< beans::PropertyValue >() ); + if (m_pImpl->xPossHyph.is()) { - aTxt = EraseUnusableHyphens_Impl( xPossHyph, nMaxHyphenationPos ); + aTxt = EraseUnusableHyphens_Impl( m_pImpl->xPossHyph, m_pImpl->nMaxHyphenationPos ); } - SetLabel_Impl( nActLanguage ); + SetLabel_Impl( m_pImpl->nActLanguage ); } - aWordEdit.SetText( aTxt ); + m_pImpl->aWordEdit.SetText( aTxt ); - nOldPos = aTxt.Len(); + m_pImpl->nOldPos = aTxt.Len(); SelLeft(); EnableLRBtn_Impl(); } @@ -343,12 +383,11 @@ void SvxHyphenWordDialog::InitControls_Impl() void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) { - if ( nInsPos != CONTINUE_HYPH && xPossHyph.is()) + if ( nInsPos != CONTINUE_HYPH && m_pImpl->xPossHyph.is()) { if (nInsPos) { - //String aTmp( U2S( xPossHyph->getPossibleHyphens() ) ); - String aTmp( aWordEdit.GetText() ); + String aTmp( m_pImpl->aWordEdit.GetText() ); DBG_ASSERT(nInsPos <= aTmp.Len() - 2, "wrong hyphen position"); sal_uInt16 nIdxPos = 0; @@ -360,33 +399,33 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) nIdxPos++; } - Sequence< sal_Int16 > aSeq = xPossHyph->getHyphenationPositions(); + uno::Sequence< sal_Int16 > aSeq = m_pImpl->xPossHyph->getHyphenationPositions(); sal_Int32 nLen = aSeq.getLength(); DBG_ASSERT(nLen, "empty sequence"); DBG_ASSERT(nIdxPos < nLen, "index out of range"); if (nLen && nIdxPos < nLen) { nInsPos = aSeq.getConstArray()[ nIdxPos ]; - pHyphWrapper->InsertHyphen( nInsPos ); + m_pImpl->pHyphWrapper->InsertHyphen( nInsPos ); } } else { //! calling with 0 as argument will remove hyphens! - pHyphWrapper->InsertHyphen( nInsPos ); + m_pImpl->pHyphWrapper->InsertHyphen( nInsPos ); } } - if ( pHyphWrapper->FindSpellError() ) + if ( m_pImpl->pHyphWrapper->FindSpellError() ) { - Reference< XHyphenatedWord > xHyphWord( pHyphWrapper->GetLast(), UNO_QUERY ); + uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( m_pImpl->pHyphWrapper->GetLast(), uno::UNO_QUERY ); // adapt actual word and language to new found hyphenation result if(xHyphWord.is()) { - aActWord = String( xHyphWord->getWord() ); - nActLanguage = SvxLocaleToLanguage( xHyphWord->getLocale() ); - nMaxHyphenationPos = xHyphWord->getHyphenationPos(); + m_pImpl->aActWord = String( xHyphWord->getWord() ); + m_pImpl->nActLanguage = SvxLocaleToLanguage( xHyphWord->getLocale() ); + m_pImpl->nMaxHyphenationPos = xHyphWord->getHyphenationPos(); InitControls_Impl(); } } @@ -399,7 +438,7 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl() { sal_uInt16 nPos = 0; - String aTxt(aWordEdit.GetText()); + String aTxt(m_pImpl->aWordEdit.GetText()); for ( sal_uInt16 i=0 ; i < aTxt.Len(); ++i ) { @@ -416,107 +455,121 @@ sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl() // ----------------------------------------------------------------------- -IMPL_LINK_INLINE_START( SvxHyphenWordDialog, CutHdl_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog, CutHdl_Impl, Button *, EMPTYARG ) { - if( !bBusy ) + if( !m_pImpl->bBusy ) { - bBusy = sal_True; - ContinueHyph_Impl( nHyphPos ); - bBusy = sal_False; + m_pImpl->bBusy = sal_True; + ContinueHyph_Impl( m_pImpl->nHyphPos ); + m_pImpl->bBusy = sal_False; } return 0; } -IMPL_LINK_INLINE_END( SvxHyphenWordDialog, CutHdl_Impl, Button *, EMPTYARG ) // ----------------------------------------------------------------------- -IMPL_LINK_INLINE_START( SvxHyphenWordDialog, DeleteHdl_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, EMPTYARG /*pButton*/ ) { - if( !bBusy ) + if( !m_pImpl->bBusy ) { - bBusy = sal_True; - ContinueHyph_Impl(); - bBusy = sal_False; + try + { + uno::Reference< beans::XPropertySet > xProp( SvxGetLinguPropertySet() ); + const rtl::OUString aName( rtl::OUString::createFromAscii( "IsHyphAuto" ) ); + uno::Any aAny; + + aAny <<= sal_True; + xProp->setPropertyValue( aName, aAny ); + + m_pImpl->bBusy = sal_True; + ContinueHyph_Impl( m_pImpl->nHyphPos ); + m_pImpl->bBusy = sal_False; + + aAny <<= sal_False; + xProp->setPropertyValue( aName, aAny ); + } + catch (uno::Exception &e) + { + (void) e; + DBG_ASSERT( 0, "Hyphenate All failed" ); + } } return 0; } -IMPL_LINK_INLINE_END( SvxHyphenWordDialog, DeleteHdl_Impl, Button *, EMPTYARG ) // ----------------------------------------------------------------------- -IMPL_LINK_INLINE_START( SvxHyphenWordDialog, ContinueHdl_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog, DeleteHdl_Impl, Button *, EMPTYARG ) { - if( !bBusy ) + if( !m_pImpl->bBusy ) { - bBusy = sal_True; - ContinueHyph_Impl( CONTINUE_HYPH ); - bBusy = sal_False; + m_pImpl->bBusy = sal_True; + ContinueHyph_Impl(); + m_pImpl->bBusy = sal_False; } return 0; } -IMPL_LINK_INLINE_END( SvxHyphenWordDialog, ContinueHdl_Impl, Button *, EMPTYARG ) // ----------------------------------------------------------------------- -IMPL_LINK_INLINE_START( SvxHyphenWordDialog, CancelHdl_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog, ContinueHdl_Impl, Button *, EMPTYARG ) { - if( !bBusy ) + if( !m_pImpl->bBusy ) { - bBusy = sal_True; - pHyphWrapper->SpellEnd(); - EndDialog( RET_CANCEL ); - bBusy = sal_False; + m_pImpl->bBusy = sal_True; + ContinueHyph_Impl( CONTINUE_HYPH ); + m_pImpl->bBusy = sal_False; } return 0; } -IMPL_LINK_INLINE_END( SvxHyphenWordDialog, CancelHdl_Impl, Button *, EMPTYARG ) // ----------------------------------------------------------------------- -IMPL_LINK_INLINE_START( SvxHyphenWordDialog, Left_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog, CancelHdl_Impl, Button *, EMPTYARG ) { - if( !bBusy ) + if( !m_pImpl->bBusy ) { - bBusy = sal_True; - SelLeft(); - bBusy = sal_False; + m_pImpl->bBusy = sal_True; + m_pImpl->pHyphWrapper->SpellEnd(); + EndDialog( RET_CANCEL ); + m_pImpl->bBusy = sal_False; } return 0; } -IMPL_LINK_INLINE_END( SvxHyphenWordDialog, Left_Impl, Button *, EMPTYARG ) // ----------------------------------------------------------------------- -IMPL_LINK_INLINE_START( SvxHyphenWordDialog, Right_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog, Left_Impl, Button *, EMPTYARG ) { - if( !bBusy ) + if( !m_pImpl->bBusy ) { - bBusy = sal_True; - SelRight(); - bBusy = sal_False; + m_pImpl->bBusy = sal_True; + SelLeft(); + m_pImpl->bBusy = sal_False; } return 0; } -IMPL_LINK_INLINE_END( SvxHyphenWordDialog, Right_Impl, Button *, EMPTYARG ) // ----------------------------------------------------------------------- -IMPL_LINK_INLINE_START( SvxHyphenWordDialog, GetFocusHdl_Impl, Edit *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog, Right_Impl, Button *, EMPTYARG ) { - aWordEdit.SetSelection( Selection( nOldPos, nOldPos + 1 ) ); + if( !m_pImpl->bBusy ) + { + m_pImpl->bBusy = sal_True; + SelRight(); + m_pImpl->bBusy = sal_False; + } return 0; } -IMPL_LINK_INLINE_END( SvxHyphenWordDialog, GetFocusHdl_Impl, Edit *, EMPTYARG ) // ----------------------------------------------------------------------- -IMPL_LINK( SvxHyphenWordDialog, LangError_Impl, void *, nLang ) +IMPL_LINK( SvxHyphenWordDialog, GetFocusHdl_Impl, Edit *, EMPTYARG ) { - // Status anzeigen - String aErr( ::GetLanguageString( (LanguageType)(sal_IntPtr)nLang ) ); - aErr += SVX_RESSTR( RID_SVXSTR_HMERR_CHECKINSTALL ); - InfoBox( this, aErr ).Execute(); + m_pImpl->aWordEdit.SetSelection( Selection( m_pImpl->nOldPos, m_pImpl->nOldPos + 1 ) ); return 0; } + diff --git a/svx/source/dialog/hyphen.hrc b/svx/source/dialog/hyphen.hrc old mode 100644 new mode 100755 index a87b7b6588b8..e60339b137e1 --- a/svx/source/dialog/hyphen.hrc +++ b/svx/source/dialog/hyphen.hrc @@ -36,13 +36,14 @@ #define BTN_LEFT 11 #define BTN_RIGHT 12 #define FT_WORD 13 +#define FL_BOTTOM 14 #define BTN_HYPH_CONTINUE 20 #define BTN_HYPH_DELETE 21 #define BTN_HYPH_CUT 22 #define BTN_HYPH_CANCEL 23 #define BTN_HYPH_HELP 24 - +#define BTN_HYPH_ALL 25 #endif diff --git a/svx/source/dialog/hyphen.hxx b/svx/source/dialog/hyphen.hxx old mode 100644 new mode 100755 index 5508183c2d3e..48fda9192a3b --- a/svx/source/dialog/hyphen.hxx +++ b/svx/source/dialog/hyphen.hxx @@ -32,6 +32,8 @@ // include --------------------------------------------------------------- +#include + #include #ifndef _SV_BUTTON_HXX #include @@ -62,63 +64,39 @@ protected: // class SvxHyphenWordDialog --------------------------------------------- +struct SvxHyphenWordDialog_Impl; + class SvxHyphenWordDialog : public SfxModalDialog { -public: - SvxHyphenWordDialog( const String &rWord, LanguageType nLang, - Window* pParent, - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenator > &xHyphen, - SvxSpellWrapper* pWrapper ); - - void SelLeft(); - void SelRight(); - -private: - FixedText aWordFT; - SvxHyphenEdit aWordEdit; - ImageButton aLeftBtn; - ImageButton aRightBtn; - OKButton aOkBtn; - CancelButton aCancelBtn; - PushButton aContBtn; - PushButton aDelBtn; - HelpButton aHelpBtn; - String aLabel; - SvxSpellWrapper* pHyphWrapper; - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenator > xHyphenator; - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XPossibleHyphens > xPossHyph; - String aActWord; // actual (to be displayed) word - LanguageType nActLanguage; // and language - sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos - sal_uInt16 nHyphPos; - sal_uInt16 nOldPos; - sal_Bool bBusy; + boost::shared_ptr< SvxHyphenWordDialog_Impl > m_pImpl; #ifdef _SVX_HYPHEN_CXX void EnableLRBtn_Impl(); - //void EnableCutBtn_Impl(); void SetLabel_Impl( LanguageType nLang ); - String EraseUnusableHyphens_Impl( - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XPossibleHyphens > &rxPossHyph, - sal_uInt16 nMaxHyphenationPos ); + String EraseUnusableHyphens_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 nMaxHyphenationPos ); void InitControls_Impl(); void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 ); - sal_uInt16 GetHyphIndex_Impl(); + sal_uInt16 GetHyphIndex_Impl(); + DECL_LINK( Left_Impl, Button* ); + DECL_LINK( Right_Impl, Button* ); DECL_LINK( CutHdl_Impl, Button* ); - DECL_LINK( DeleteHdl_Impl, Button* ); DECL_LINK( ContinueHdl_Impl, Button* ); + DECL_LINK( DeleteHdl_Impl, Button* ); + DECL_LINK( HyphenateAllHdl_Impl, Button* ); DECL_LINK( CancelHdl_Impl, Button* ); - DECL_LINK( Left_Impl, Button* ); - DECL_LINK( Right_Impl, Button* ); DECL_LINK( GetFocusHdl_Impl, Edit* ); - DECL_LINK( LangError_Impl, void* ); #endif + +public: + SvxHyphenWordDialog( const String &rWord, LanguageType nLang, + Window* pParent, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ); + + void SelLeft(); + void SelRight(); }; diff --git a/svx/source/dialog/hyphen.src b/svx/source/dialog/hyphen.src old mode 100644 new mode 100755 index aa423028e6e2..fd3db6e41af4 --- a/svx/source/dialog/hyphen.src +++ b/svx/source/dialog/hyphen.src @@ -37,104 +37,87 @@ ModalDialog RID_SVXDLG_HYPHENATE { HelpId = HID_HYPHENATE ; - Size = MAP_APPFONT ( 188 , 100 ) ; + Size = MAP_APPFONT ( 200 , 111 ) ; OutputSize = TRUE ; SvLook = TRUE ; Text [ en-US ] = "Hyphenation" ; Moveable = TRUE ; + + FixedText FT_WORD + { + Pos = MAP_APPFONT ( 5 , 5 ) ; + Size = MAP_APPFONT ( 120 , 8 ) ; + Text [ en-US ] = "~Word" ; + }; Edit ED_WORD { BORDER = TRUE ; - Pos = MAP_APPFONT ( 6 , 17 ) ; - Size = MAP_APPFONT ( 120 , 12 ) ; + Pos = MAP_APPFONT ( 5 , 17 ) ; + Size = MAP_APPFONT ( 132 , 12 ) ; TABSTOP = TRUE ; LEFT = TRUE ; }; ImageButton BTN_LEFT { - Pos = MAP_APPFONT ( 6 , 33 ) ; + Pos = MAP_APPFONT ( 56 , 33 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; TABSTOP = TRUE ; SYMBOL = IMAGEBUTTON_ARROW_LEFT ; }; ImageButton BTN_RIGHT { - Pos = MAP_APPFONT ( 22 , 33 ) ; + Pos = MAP_APPFONT ( 75 , 33 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; TABSTOP = TRUE ; Symbol = IMAGEBUTTON_ARROW_RIGHT ; }; - FixedText FT_WORD + OKButton BTN_HYPH_CUT { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 120 , 8 ) ; - Text [ en-US ] = "~Word" ; + Pos = MAP_APPFONT ( 144 , 17 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + Text [ en-US ] = "H~yphenate" ; + TABSTOP = TRUE ; + DEFBUTTON = TRUE ; }; PushButton BTN_HYPH_CONTINUE { - Pos = MAP_APPFONT ( 132 , 43 ) ; + Pos = MAP_APPFONT ( 144 , 35 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Next" ; + Text [ en-US ] = "~Skip" ; TABSTOP = TRUE ; }; PushButton BTN_HYPH_DELETE { - Pos = MAP_APPFONT ( 132 , 60 ) ; + Pos = MAP_APPFONT ( 144 , 52 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Remove" ; TABSTOP = TRUE ; }; - OKButton BTN_HYPH_CUT + FixedLine FL_BOTTOM + { + Pos = MAP_APPFONT ( 0 , 81 ) ; + Size = MAP_APPFONT ( 200 , 8 ) ; + }; + HelpButton BTN_HYPH_HELP { - Pos = MAP_APPFONT ( 132 , 6 ) ; + Pos = MAP_APPFONT ( 5 , 93 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Hyphenate" ; TABSTOP = TRUE ; - DEFBUTTON = TRUE ; }; - CancelButton BTN_HYPH_CANCEL + PushButton BTN_HYPH_ALL { - Pos = MAP_APPFONT ( 132 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 63 , 93 ) ; + Size = MAP_APPFONT ( 74 , 14 ) ; + Text [ en-US ] = "Hyphenate ~All" ; TABSTOP = TRUE ; }; - HelpButton BTN_HYPH_HELP + CancelButton BTN_HYPH_CANCEL { - Pos = MAP_APPFONT ( 132 , 80 ) ; + Pos = MAP_APPFONT ( 144 , 93 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; + Text [ en-US ] = "~Close"; TABSTOP = TRUE ; }; }; - // ******************************************************************* EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From ee881a1df6f332ba60fac4f9f50073a17951c12f Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 15 Jan 2010 17:55:53 +0100 Subject: chartpositioning: #i86609# BIFF8 export of manual title position --- sc/source/filter/excel/xechart.cxx | 115 +++++++++++++++++++++++-------------- sc/source/filter/excel/xichart.cxx | 100 +++++++++++++++----------------- sc/source/filter/inc/xechart.hxx | 9 +-- sc/source/filter/inc/xichart.hxx | 8 +-- sc/source/filter/inc/xlchart.hxx | 3 +- 5 files changed, 127 insertions(+), 108 deletions(-) diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index c0d4ac21b914..87fc34b52b0c 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -89,34 +89,38 @@ using ::com::sun::star::i18n::XBreakIterator; using ::com::sun::star::frame::XModel; using ::com::sun::star::drawing::XShape; +using ::com::sun::star::chart2::IncrementData; +using ::com::sun::star::chart2::RelativePosition; +using ::com::sun::star::chart2::ScaleData; +using ::com::sun::star::chart2::SubIncrement; +using ::com::sun::star::chart2::XAxis; using ::com::sun::star::chart2::XChartDocument; -using ::com::sun::star::chart2::XDiagram; -using ::com::sun::star::chart2::XCoordinateSystemContainer; -using ::com::sun::star::chart2::XCoordinateSystem; using ::com::sun::star::chart2::XChartTypeContainer; +using ::com::sun::star::chart2::XColorScheme; +using ::com::sun::star::chart2::XCoordinateSystem; +using ::com::sun::star::chart2::XCoordinateSystemContainer; using ::com::sun::star::chart2::XChartType; -using ::com::sun::star::chart2::XDataSeriesContainer; using ::com::sun::star::chart2::XDataSeries; -using ::com::sun::star::chart2::XRegressionCurveContainer; +using ::com::sun::star::chart2::XDataSeriesContainer; +using ::com::sun::star::chart2::XDiagram; +using ::com::sun::star::chart2::XFormattedString; +using ::com::sun::star::chart2::XLegend; using ::com::sun::star::chart2::XRegressionCurve; -using ::com::sun::star::chart2::XAxis; +using ::com::sun::star::chart2::XRegressionCurveContainer; using ::com::sun::star::chart2::XScaling; -using ::com::sun::star::chart2::ScaleData; -using ::com::sun::star::chart2::IncrementData; -using ::com::sun::star::chart2::SubIncrement; -using ::com::sun::star::chart2::XLegend; -using ::com::sun::star::chart2::XTitled; using ::com::sun::star::chart2::XTitle; -using ::com::sun::star::chart2::XFormattedString; -using ::com::sun::star::chart2::XColorScheme; +using ::com::sun::star::chart2::XTitled; +using ::com::sun::star::chart2::data::XDataSequence; using ::com::sun::star::chart2::data::XDataSource; using ::com::sun::star::chart2::data::XLabeledDataSequence; -using ::com::sun::star::chart2::data::XDataSequence; using ::formula::FormulaGrammar; using ::formula::FormulaToken; +namespace cssc = ::com::sun::star::chart; +namespace cssc2 = ::com::sun::star::chart2; + // Helpers ==================================================================== namespace { @@ -296,14 +300,14 @@ void XclExpChRoot::SetSystemColor( Color& rColor, sal_uInt32& rnColorId, sal_uIn rnColorId = XclExpPalette::GetColorIdFromIndex( nSysColorIdx ); } -sal_uInt16 XclExpChRoot::CalcChartXFromHmm( sal_Int32 nPosX ) const +sal_Int32 XclExpChRoot::CalcChartXFromHmm( sal_Int32 nPosX ) const { - return ::limit_cast< sal_uInt16, double >( (nPosX - mxChData->mnBorderGapX) / mxChData->mfUnitSizeX, 0, EXC_CHART_TOTALUNITS ); + return ::limit_cast< sal_Int32, double >( (nPosX - mxChData->mnBorderGapX) / mxChData->mfUnitSizeX, 0, EXC_CHART_TOTALUNITS ); } -sal_uInt16 XclExpChRoot::CalcChartYFromHmm( sal_Int32 nPosY ) const +sal_Int32 XclExpChRoot::CalcChartYFromHmm( sal_Int32 nPosY ) const { - return ::limit_cast< sal_uInt16, double >( (nPosY - mxChData->mnBorderGapY) / mxChData->mfUnitSizeY, 0, EXC_CHART_TOTALUNITS ); + return ::limit_cast< sal_Int32, double >( (nPosY - mxChData->mnBorderGapY) / mxChData->mfUnitSizeY, 0, EXC_CHART_TOTALUNITS ); } XclChRectangle XclExpChRoot::CalcChartRectFromHmm( const ::com::sun::star::awt::Rectangle& rRect ) const @@ -316,12 +320,12 @@ XclChRectangle XclExpChRoot::CalcChartRectFromHmm( const ::com::sun::star::awt:: return aRect; } -sal_uInt16 XclExpChRoot::CalcChartXFromRelative( double fPosX ) const +sal_Int32 XclExpChRoot::CalcChartXFromRelative( double fPosX ) const { return CalcChartXFromHmm( static_cast< sal_Int32 >( fPosX * mxChData->maChartRect.GetWidth() + 0.5 ) ); } -sal_uInt16 XclExpChRoot::CalcChartYFromRelative( double fPosY ) const +sal_Int32 XclExpChRoot::CalcChartYFromRelative( double fPosY ) const { return CalcChartYFromHmm( static_cast< sal_Int32 >( fPosY * mxChData->maChartRect.GetHeight() + 0.5 ) ); } @@ -1167,6 +1171,36 @@ void XclExpChText::ConvertTitle( Reference< XTitle > xTitle, sal_uInt16 nTarget // rotation ConvertRotationBase( GetChRoot(), aTitleProp, true ); + + // manual text position - only for main title + mxFramePos.reset( new XclExpChFramePos( EXC_CHFRAMEPOS_PARENT, EXC_CHFRAMEPOS_PARENT ) ); + if( nTarget == EXC_CHOBJLINK_TITLE ) + { + Any aRelPos; + if( aTitleProp.GetAnyProperty( aRelPos, EXC_CHPROP_RELATIVEPOSITION ) && aRelPos.has< RelativePosition >() ) try + { + // calculate absolute position for CHTEXT record + Reference< cssc::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW ); + Reference< XShape > xTitleShape( xChart1Doc->getTitle(), UNO_SET_THROW ); + ::com::sun::star::awt::Point aPos = xTitleShape->getPosition(); + ::com::sun::star::awt::Size aSize = xTitleShape->getSize(); + ::com::sun::star::awt::Rectangle aRect( aPos.X, aPos.Y, aSize.Width, aSize.Height ); + maData.maRect = CalcChartRectFromHmm( aRect ); + ::insert_value( maData.mnFlags2, EXC_CHTEXT_POS_MOVED, 0, 4 ); + // manual title position implies manual plot area + GetChartData().SetManualPlotArea(); + // calculate the default title position in chart units + sal_Int32 nDefPosX = ::std::max< sal_Int32 >( (EXC_CHART_TOTALUNITS - maData.maRect.mnWidth) / 2, 0 ); + sal_Int32 nDefPosY = 85; + // set the position relative to the standard position + XclChRectangle& rFrameRect = mxFramePos->GetFramePosData().maRect; + rFrameRect.mnX = maData.maRect.mnX - nDefPosX; + rFrameRect.mnY = maData.maRect.mnY - nDefPosY; + } + catch( Exception& ) + { + } + } } else { @@ -1186,8 +1220,7 @@ bool XclExpChText::ConvertDataLabel( const ScfPropertySet& rPropSet, { SetFutureRecordContext( EXC_CHFRBLOCK_TEXT_DATALABEL, rPointPos.mnPointIdx, rPointPos.mnSeriesIdx ); - namespace cssc = ::com::sun::star::chart2; - cssc::DataPointLabel aPointLabel; + cssc2::DataPointLabel aPointLabel; if( !rPropSet.GetProperty( aPointLabel, EXC_CHPROP_LABEL ) ) return false; @@ -1306,6 +1339,8 @@ sal_uInt16 XclExpChText::GetAttLabelFlags() const void XclExpChText::WriteSubRecords( XclExpStream& rStrm ) { + // CHFRAMEPOS record + lclSaveRecord( rStrm, mxFramePos ); // CHFONT record lclSaveRecord( rStrm, mxFont ); // CHSOURCELINK group @@ -1655,7 +1690,6 @@ bool XclExpChSerErrorBar::Convert( XclExpChSourceLink& rValueLink, sal_uInt16& r bool bOk = rPropSet.GetProperty( nBarStyle, EXC_CHPROP_ERRORBARSTYLE ); if( bOk ) { - namespace cssc = ::com::sun::star::chart; switch( nBarStyle ) { case cssc::ErrorBarStyle::ABSOLUTE: @@ -2194,8 +2228,6 @@ XclExpChLegend::XclExpChLegend( const XclExpChRoot& rRoot ) : void XclExpChLegend::Convert( const ScfPropertySet& rPropSet ) { - namespace cssc = ::com::sun::star::chart2; - // frame properties mxFrame = lclCreateFrame( GetChRoot(), rPropSet, EXC_CHOBJTYPE_LEGEND ); // text properties @@ -2205,7 +2237,7 @@ void XclExpChLegend::Convert( const ScfPropertySet& rPropSet ) // legend position Any aRelPosAny; rPropSet.GetAnyProperty( aRelPosAny, EXC_CHPROP_RELATIVEPOSITION ); - if( aRelPosAny.hasValue() ) + if( aRelPosAny.has< RelativePosition >() ) { try { @@ -2233,14 +2265,14 @@ void XclExpChLegend::Convert( const ScfPropertySet& rPropSet ) } else { - cssc::LegendPosition eApiPos = cssc::LegendPosition_CUSTOM; + cssc2::LegendPosition eApiPos = cssc2::LegendPosition_CUSTOM; rPropSet.GetProperty( eApiPos, EXC_CHPROP_ANCHORPOSITION ); switch( eApiPos ) { - case cssc::LegendPosition_LINE_START: maData.mnDockMode = EXC_CHLEGEND_LEFT; break; - case cssc::LegendPosition_LINE_END: maData.mnDockMode = EXC_CHLEGEND_RIGHT; break; - case cssc::LegendPosition_PAGE_START: maData.mnDockMode = EXC_CHLEGEND_TOP; break; - case cssc::LegendPosition_PAGE_END: maData.mnDockMode = EXC_CHLEGEND_BOTTOM; break; + case cssc2::LegendPosition_LINE_START: maData.mnDockMode = EXC_CHLEGEND_LEFT; break; + case cssc2::LegendPosition_LINE_END: maData.mnDockMode = EXC_CHLEGEND_RIGHT; break; + case cssc2::LegendPosition_PAGE_START: maData.mnDockMode = EXC_CHLEGEND_TOP; break; + case cssc2::LegendPosition_PAGE_END: maData.mnDockMode = EXC_CHLEGEND_BOTTOM; break; default: OSL_ENSURE( false, "XclExpChLegend::Convert - unrecognized legend position" ); maData.mnDockMode = EXC_CHLEGEND_RIGHT; @@ -2248,9 +2280,9 @@ void XclExpChLegend::Convert( const ScfPropertySet& rPropSet ) } // legend expansion - cssc::LegendExpansion eApiExpand = cssc::LegendExpansion_BALANCED; + cssc2::LegendExpansion eApiExpand = cssc2::LegendExpansion_BALANCED; rPropSet.GetProperty( eApiExpand, EXC_CHPROP_EXPANSION ); - ::set_flag( maData.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand != cssc::LegendExpansion_WIDE ); + ::set_flag( maData.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand != cssc2::LegendExpansion_WIDE ); // other flags ::set_flag( maData.mnFlags, EXC_CHLEGEND_AUTOSERIES ); @@ -2359,13 +2391,12 @@ void XclExpChTypeGroup::ConvertSeries( { // stacking direction (stacked/percent/deep 3d) from first series ScfPropertySet aSeriesProp( aSeriesVec.front() ); - namespace cssc = ::com::sun::star::chart2; - cssc::StackingDirection eStacking; + cssc2::StackingDirection eStacking; if( !aSeriesProp.GetProperty( eStacking, EXC_CHPROP_STACKINGDIR ) ) - eStacking = cssc::StackingDirection_NO_STACKING; + eStacking = cssc2::StackingDirection_NO_STACKING; // stacked or percent chart - if( maTypeInfo.mbSupportsStacking && (eStacking == cssc::StackingDirection_Y_STACKING) ) + if( maTypeInfo.mbSupportsStacking && (eStacking == cssc2::StackingDirection_Y_STACKING) ) { // percent overrides simple stacking maType.SetStacked( bPercent ); @@ -2382,7 +2413,7 @@ void XclExpChTypeGroup::ConvertSeries( } // deep 3d chart or clustered 3d chart (stacked is not clustered) - if( (eStacking == cssc::StackingDirection_NO_STACKING) && Is3dWallChart() ) + if( (eStacking == cssc2::StackingDirection_NO_STACKING) && Is3dWallChart() ) mxChart3d->SetClustered(); // varied point colors @@ -2529,7 +2560,6 @@ void XclExpChLabelRange::Convert( const ScaleData& rScaleData, bool bMirrorOrien void XclExpChLabelRange::ConvertAxisPosition( const ScfPropertySet& rPropSet ) { - namespace cssc = ::com::sun::star::chart; cssc::ChartAxisPosition eAxisPos = cssc::ChartAxisPosition_VALUE; rPropSet.GetProperty( eAxisPos, EXC_CHPROP_CROSSOVERPOSITION ); double fCrossingPos = 1.0; @@ -2587,13 +2617,11 @@ void XclExpChValueRange::Convert( const ScaleData& rScaleData ) ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMINOR, bAutoMinor ); // reverse order - namespace cssc = ::com::sun::star::chart2; - ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_REVERSE, rScaleData.Orientation == cssc::AxisOrientation_REVERSE ); + ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_REVERSE, rScaleData.Orientation == cssc2::AxisOrientation_REVERSE ); } void XclExpChValueRange::ConvertAxisPosition( const ScfPropertySet& rPropSet ) { - namespace cssc = ::com::sun::star::chart; cssc::ChartAxisPosition eAxisPos = cssc::ChartAxisPosition_VALUE; double fCrossingPos = 0.0; if( rPropSet.GetProperty( eAxisPos, EXC_CHPROP_CROSSOVERPOSITION ) && rPropSet.GetProperty( fCrossingPos, EXC_CHPROP_CROSSOVERVALUE ) ) @@ -2677,7 +2705,6 @@ void XclExpChTick::Convert( const ScfPropertySet& rPropSet, const XclChExtTypeIn } else { - namespace cssc = ::com::sun::star::chart; cssc::ChartAxisLabelPosition eApiLabelPos = cssc::ChartAxisLabelPosition_NEAR_AXIS; rPropSet.GetProperty( eApiLabelPos, EXC_CHPROP_LABELPOSITION ); switch( eApiLabelPos ) @@ -3117,7 +3144,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot, bool bIncludeHidden = aDiagramProp.GetBoolProperty( EXC_CHPROP_INCLUDEHIDDENCELLS ); ::set_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISIBLEONLY, !bIncludeHidden ); - // initialize API conversion (remembers xChartDoc internally) + // initialize API conversion (remembers xChartDoc and rChartRect internally) InitConversion( xChartDoc, rChartRect ); // chart frame diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 3b19f8faf23e..093ca0d1150a 100755 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -101,38 +101,39 @@ using ::com::sun::star::frame::XModel; using ::com::sun::star::util::XNumberFormatsSupplier; using ::com::sun::star::drawing::XShape; -using ::com::sun::star::chart::XDiagramPositioning; - +using ::com::sun::star::chart2::IncrementData; +using ::com::sun::star::chart2::RelativePosition; +using ::com::sun::star::chart2::ScaleData; +using ::com::sun::star::chart2::SubIncrement; +using ::com::sun::star::chart2::XAxis; using ::com::sun::star::chart2::XChartDocument; -using ::com::sun::star::chart2::XDiagram; -using ::com::sun::star::chart2::XCoordinateSystemContainer; -using ::com::sun::star::chart2::XCoordinateSystem; -using ::com::sun::star::chart2::XChartTypeContainer; using ::com::sun::star::chart2::XChartType; -using ::com::sun::star::chart2::XDataSeriesContainer; +using ::com::sun::star::chart2::XChartTypeContainer; +using ::com::sun::star::chart2::XCoordinateSystem; +using ::com::sun::star::chart2::XCoordinateSystemContainer; using ::com::sun::star::chart2::XDataSeries; +using ::com::sun::star::chart2::XDataSeriesContainer; +using ::com::sun::star::chart2::XDiagram; +using ::com::sun::star::chart2::XFormattedString; +using ::com::sun::star::chart2::XLegend; using ::com::sun::star::chart2::XRegressionCurve; using ::com::sun::star::chart2::XRegressionCurveContainer; -using ::com::sun::star::chart2::XAxis; using ::com::sun::star::chart2::XScaling; -using ::com::sun::star::chart2::ScaleData; -using ::com::sun::star::chart2::IncrementData; -using ::com::sun::star::chart2::SubIncrement; -using ::com::sun::star::chart2::RelativePosition; -using ::com::sun::star::chart2::XLegend; -using ::com::sun::star::chart2::XTitled; using ::com::sun::star::chart2::XTitle; -using ::com::sun::star::chart2::XFormattedString; +using ::com::sun::star::chart2::XTitled; using ::com::sun::star::chart2::data::XDataProvider; using ::com::sun::star::chart2::data::XDataReceiver; +using ::com::sun::star::chart2::data::XDataSequence; using ::com::sun::star::chart2::data::XDataSink; using ::com::sun::star::chart2::data::XLabeledDataSequence; -using ::com::sun::star::chart2::data::XDataSequence; using ::formula::FormulaToken; using ::formula::StackVar; +namespace cssc = ::com::sun::star::chart; +namespace cssc2 = ::com::sun::star::chart2; + // Helpers ==================================================================== namespace { @@ -268,12 +269,12 @@ Reference< XShape > XclImpChRoot::GetTitleShape( const XclChTextKey& rTitleKey ) return mxChData->GetTitleShape( rTitleKey ); } -sal_Int32 XclImpChRoot::CalcHmmFromChartX( sal_uInt16 nPosX ) const +sal_Int32 XclImpChRoot::CalcHmmFromChartX( sal_Int32 nPosX ) const { return static_cast< sal_Int32 >( mxChData->mfUnitSizeX * nPosX + mxChData->mnBorderGapX + 0.5 ); } -sal_Int32 XclImpChRoot::CalcHmmFromChartY( sal_uInt16 nPosY ) const +sal_Int32 XclImpChRoot::CalcHmmFromChartY( sal_Int32 nPosY ) const { return static_cast< sal_Int32 >( mxChData->mfUnitSizeY * nPosY + mxChData->mnBorderGapY + 0.5 ); } @@ -287,12 +288,12 @@ sal_Int32 XclImpChRoot::CalcHmmFromChartY( sal_uInt16 nPosY ) const CalcHmmFromChartY( rRect.mnHeight ) ); } -double XclImpChRoot::CalcRelativeFromChartX( sal_uInt16 nPosX ) const +double XclImpChRoot::CalcRelativeFromChartX( sal_Int32 nPosX ) const { return static_cast< double >( CalcHmmFromChartX( nPosX ) ) / mxChData->maChartRect.GetWidth(); } -double XclImpChRoot::CalcRelativeFromChartY( sal_uInt16 nPosY ) const +double XclImpChRoot::CalcRelativeFromChartY( sal_Int32 nPosY ) const { return static_cast< double >( CalcHmmFromChartY( nPosY ) ) / mxChData->maChartRect.GetHeight(); } @@ -1023,8 +1024,7 @@ void XclImpChText::ConvertDataLabel( ScfPropertySet& rPropSet, const XclChTypeIn bool bShowSymbol = bShowAny && ::get_flag( maData.mnFlags, EXC_CHTEXT_SHOWSYMBOL ); // create API struct for label values, set API label separator - namespace cssc = ::com::sun::star::chart2; - cssc::DataPointLabel aPointLabel( bShowValue, bShowPercent, bShowCateg, bShowSymbol ); + cssc2::DataPointLabel aPointLabel( bShowValue, bShowPercent, bShowCateg, bShowSymbol ); rPropSet.SetProperty( EXC_CHPROP_LABEL, aPointLabel ); String aSep = mxLabelProps.is() ? mxLabelProps->maSeparator : String( sal_Unicode( '\n' ) ); if( aSep.Len() == 0 ) @@ -1037,7 +1037,7 @@ void XclImpChText::ConvertDataLabel( ScfPropertySet& rPropSet, const XclChTypeIn ConvertFont( rPropSet ); ConvertRotation( rPropSet, false ); // label placement - using namespace ::com::sun::star::chart::DataLabelPlacement; + using namespace cssc::DataLabelPlacement; sal_Int32 nPlacement = rTypeInfo.mnDefaultLabelPos; switch( ::extract_value< sal_uInt16 >( maData.mnFlags2, 0, 4 ) ) { @@ -1623,7 +1623,6 @@ Reference< XPropertySet > XclImpChSerErrorBar::CreateErrorBar( const XclImpChSer aBarProp.SetBoolProperty( EXC_CHPROP_SHOWNEGATIVEERROR, pNegBar != 0 ); // type of displayed error - namespace cssc = ::com::sun::star::chart; switch( pPrimaryBar->maData.mnSourceType ) { case EXC_CHSERERR_PERCENT: @@ -2377,7 +2376,6 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const Reference< XLegend > xLegend( ScfApiHelper::CreateInstance( SERVICE_CHART2_LEGEND ), UNO_QUERY ); if( xLegend.is() ) { - namespace cssc = ::com::sun::star::chart2; ScfPropertySet aLegendProp( xLegend ); aLegendProp.SetBoolProperty( EXC_CHPROP_SHOW, true ); @@ -2392,20 +2390,20 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const plot area is positioned automatically (Excel sets the plot area to manual mode, if the legend is moved or resized). With manual plot areas, Excel ignores the value in maData.mnDockMode completely. */ - cssc::LegendPosition eApiPos = cssc::LegendPosition_CUSTOM; - cssc::LegendExpansion eApiExpand = cssc::LegendExpansion_BALANCED; + cssc2::LegendPosition eApiPos = cssc2::LegendPosition_CUSTOM; + cssc2::LegendExpansion eApiExpand = cssc2::LegendExpansion_BALANCED; if( !GetChartData().IsManualPlotArea() ) switch( maData.mnDockMode ) { - case EXC_CHLEGEND_LEFT: eApiPos = cssc::LegendPosition_LINE_START; eApiExpand = cssc::LegendExpansion_HIGH; break; - case EXC_CHLEGEND_RIGHT: eApiPos = cssc::LegendPosition_LINE_END; eApiExpand = cssc::LegendExpansion_HIGH; break; - case EXC_CHLEGEND_TOP: eApiPos = cssc::LegendPosition_PAGE_START; eApiExpand = cssc::LegendExpansion_WIDE; break; - case EXC_CHLEGEND_BOTTOM: eApiPos = cssc::LegendPosition_PAGE_END; eApiExpand = cssc::LegendExpansion_WIDE; break; + case EXC_CHLEGEND_LEFT: eApiPos = cssc2::LegendPosition_LINE_START; eApiExpand = cssc2::LegendExpansion_HIGH; break; + case EXC_CHLEGEND_RIGHT: eApiPos = cssc2::LegendPosition_LINE_END; eApiExpand = cssc2::LegendExpansion_HIGH; break; + case EXC_CHLEGEND_TOP: eApiPos = cssc2::LegendPosition_PAGE_START; eApiExpand = cssc2::LegendExpansion_WIDE; break; + case EXC_CHLEGEND_BOTTOM: eApiPos = cssc2::LegendPosition_PAGE_END; eApiExpand = cssc2::LegendExpansion_WIDE; break; // top-right not supported - case EXC_CHLEGEND_CORNER: eApiPos = cssc::LegendPosition_LINE_END; eApiExpand = cssc::LegendExpansion_HIGH; break; + case EXC_CHLEGEND_CORNER: eApiPos = cssc2::LegendPosition_LINE_END; eApiExpand = cssc2::LegendExpansion_HIGH; break; } // no automatic position: try to find the correct position and size - if( eApiPos == cssc::LegendPosition_CUSTOM ) + if( eApiPos == cssc2::LegendPosition_CUSTOM ) { const XclChFramePos* pFramePos = mxFramePos.is() ? &mxFramePos->GetFramePosData() : 0; @@ -2423,7 +2421,7 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const else { // no manual position found, just go for the default - eApiPos = cssc::LegendPosition_LINE_END; + eApiPos = cssc2::LegendPosition_LINE_END; } @@ -2434,18 +2432,18 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const { // automatic size: determine entry direction from flags eApiExpand = ::get_flagvalue( maData.mnFlags, EXC_CHLEGEND_STACKED, - cssc::LegendExpansion_HIGH, cssc::LegendExpansion_WIDE ); + cssc2::LegendExpansion_HIGH, cssc2::LegendExpansion_WIDE ); } 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::LegendExpansion_WIDE; + eApiExpand = cssc2::LegendExpansion_WIDE; else if( fRatio < 0.75 ) - eApiExpand = cssc::LegendExpansion_HIGH; + eApiExpand = cssc2::LegendExpansion_HIGH; else - eApiExpand = cssc::LegendExpansion_BALANCED; + eApiExpand = cssc2::LegendExpansion_BALANCED; } } aLegendProp.SetProperty( EXC_CHPROP_ANCHORPOSITION, eApiPos ); @@ -2683,13 +2681,12 @@ void XclImpChTypeGroup::InsertDataSeries( Reference< XChartType > xChartType, if( xSeriesCont.is() && xSeries.is() ) { // series stacking mode - namespace cssc = ::com::sun::star::chart2; - cssc::StackingDirection eStacking = cssc::StackingDirection_NO_STACKING; + cssc2::StackingDirection eStacking = cssc2::StackingDirection_NO_STACKING; // stacked overrides deep-3d if( maType.IsStacked() || maType.IsPercent() ) - eStacking = cssc::StackingDirection_Y_STACKING; + eStacking = cssc2::StackingDirection_Y_STACKING; else if( Is3dDeepChart() ) - eStacking = cssc::StackingDirection_Z_STACKING; + eStacking = cssc2::StackingDirection_Z_STACKING; // additional series properties ScfPropertySet aSeriesProp( xSeries ); @@ -2809,11 +2806,9 @@ void XclImpChLabelRange::Convert( ScfPropertySet& rPropSet, ScaleData& rScaleDat // do not break text into several lines unless all labels are visible rPropSet.SetBoolProperty( EXC_CHPROP_TEXTBREAK, maData.mnLabelFreq == 1 ); // do not stagger labels in two lines - namespace cssc = ::com::sun::star::chart; rPropSet.SetProperty( EXC_CHPROP_ARRANGEORDER, cssc::ChartAxisArrangeOrderType_SIDE_BY_SIDE ); // reverse order - namespace cssc2 = ::com::sun::star::chart2; bool bReverse = ::get_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE ) != bMirrorOrient; rScaleData.Orientation = bReverse ? cssc2::AxisOrientation_REVERSE : cssc2::AxisOrientation_MATHEMATICAL; @@ -2827,7 +2822,6 @@ void XclImpChLabelRange::ConvertAxisPosition( ScfPropertySet& rPropSet, bool b3d But: the Y axis has to be moved to "end", if the X axis is mirrored, to keep it at the left end of the chart. */ bool bMaxCross = ::get_flag( maData.mnFlags, b3dChart ? EXC_CHLABELRANGE_REVERSE : EXC_CHLABELRANGE_MAXCROSS ); - namespace cssc = ::com::sun::star::chart; cssc::ChartAxisPosition eAxisPos = bMaxCross ? cssc::ChartAxisPosition_END : cssc::ChartAxisPosition_VALUE; rPropSet.SetProperty( EXC_CHPROP_CROSSOVERPOSITION, eAxisPos ); @@ -2891,7 +2885,6 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co } // reverse order - namespace cssc2 = ::com::sun::star::chart2; bool bReverse = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_REVERSE ) != bMirrorOrient; rScaleData.Orientation = bReverse ? cssc2::AxisOrientation_REVERSE : cssc2::AxisOrientation_MATHEMATICAL; } @@ -2903,7 +2896,6 @@ void XclImpChValueRange::ConvertAxisPosition( ScfPropertySet& rPropSet ) const bool bLogScale = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE ); // crossing mode (max-cross flag overrides other crossing settings) - namespace cssc = ::com::sun::star::chart; cssc::ChartAxisPosition eAxisPos = bMaxCross ? cssc::ChartAxisPosition_END : cssc::ChartAxisPosition_VALUE; rPropSet.SetProperty( EXC_CHPROP_CROSSOVERPOSITION, eAxisPos ); @@ -2926,7 +2918,7 @@ sal_Int32 lclGetApiTickmarks( sal_uInt8 nXclTickPos ) return nApiTickmarks; } -::com::sun::star::chart::ChartAxisLabelPosition lclGetApiLabelPosition( sal_Int8 nXclLabelPos ) +cssc::ChartAxisLabelPosition lclGetApiLabelPosition( sal_Int8 nXclLabelPos ) { using namespace ::com::sun::star::chart; switch( nXclLabelPos ) @@ -2985,7 +2977,7 @@ void XclImpChTick::Convert( ScfPropertySet& rPropSet ) const rPropSet.SetProperty( EXC_CHPROP_MAJORTICKS, lclGetApiTickmarks( maData.mnMajor ) ); rPropSet.SetProperty( EXC_CHPROP_MINORTICKS, lclGetApiTickmarks( maData.mnMinor ) ); rPropSet.SetProperty( EXC_CHPROP_LABELPOSITION, lclGetApiLabelPosition( maData.mnLabelPos ) ); - rPropSet.SetProperty( EXC_CHPROP_MARKPOSITION, ::com::sun::star::chart::ChartAxisMarkPosition_AT_AXIS ); + rPropSet.SetProperty( EXC_CHPROP_MARKPOSITION, cssc::ChartAxisMarkPosition_AT_AXIS ); } // ---------------------------------------------------------------------------- @@ -3076,8 +3068,6 @@ sal_uInt16 XclImpChAxis::GetRotation() const Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup, const XclImpChAxis* pCrossingAxis ) const { - namespace cssc2 = ::com::sun::star::chart2; - // create the axis object (always) Reference< XAxis > xAxis( ScfApiHelper::CreateInstance( SERVICE_CHART2_AXIS ), UNO_QUERY ); if( xAxis.is() ) @@ -3710,10 +3700,10 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB /* Following all conversions needing the old Chart1 API that involves full initialization of the chart view. */ - Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( xChartDoc, UNO_QUERY ); + Reference< cssc::XChartDocument > xChart1Doc( xChartDoc, UNO_QUERY ); if( xChart1Doc.is() ) { - Reference< ::com::sun::star::chart::XDiagram > xDiagram1 = xChart1Doc->getDiagram(); + Reference< cssc::XDiagram > xDiagram1 = xChart1Doc->getDiagram(); /* Set the 'IncludeHiddenCells' property via the old API as only this ensures that the data provider and all created sequences get this @@ -3729,7 +3719,7 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB const XclChFramePos& rFramePos = xPlotAreaPos->GetFramePosData(); if( (rFramePos.mnTLMode == EXC_CHFRAMEPOS_PARENT) && (rFramePos.mnBRMode == EXC_CHFRAMEPOS_PARENT) ) { - Reference< XDiagramPositioning > xPositioning( xDiagram1, UNO_QUERY_THROW ); + Reference< cssc::XDiagramPositioning > xPositioning( xDiagram1, UNO_QUERY_THROW ); ::com::sun::star::awt::Rectangle aDiagramRect = CalcHmmFromChartRect( rFramePos.maRect ); // for pie charts, always set inner plot area size to exclude the data labels as Excel does const XclImpChTypeGroup* pFirstTypeGroup = mxPrimAxesSet->GetFirstTypeGroup().get(); @@ -3895,7 +3885,7 @@ Reference< XDiagram > XclImpChChart::CreateDiagram() const ScfPropertySet aDiaProp( xDiagram ); // treatment of missing values - using namespace ::com::sun::star::chart::MissingValueTreatment; + using namespace cssc::MissingValueTreatment; sal_Int32 nMissingValues = LEAVE_GAP; switch( maProps.mnEmptyMode ) { diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index b9bd474fc545..c823be57fbbd 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -114,16 +114,16 @@ public: void SetSystemColor( Color& rColor, sal_uInt32& rnColorId, sal_uInt16 nSysColorIdx ) const; /** Converts the passed horizontal coordinate from 1/100 mm to Excel chart units. */ - sal_uInt16 CalcChartXFromHmm( sal_Int32 nPosX ) const; + sal_Int32 CalcChartXFromHmm( sal_Int32 nPosX ) const; /** Converts the passed vertical coordinate from 1/100 mm to Excel chart units. */ - sal_uInt16 CalcChartYFromHmm( sal_Int32 nPosY ) const; + sal_Int32 CalcChartYFromHmm( sal_Int32 nPosY ) const; /** Converts the passed rectangle from 1/100 mm to Excel chart units. */ XclChRectangle CalcChartRectFromHmm( const ::com::sun::star::awt::Rectangle& rRect ) const; /** Converts the passed horizontal coordinate from a relative position to Excel chart units. */ - sal_uInt16 CalcChartXFromRelative( double fPosX ) const; + sal_Int32 CalcChartXFromRelative( double fPosX ) const; /** Converts the passed vertical coordinate from a relative position to Excel chart units. */ - sal_uInt16 CalcChartYFromRelative( double fPosY ) const; + sal_Int32 CalcChartYFromRelative( double fPosY ) const; /** Reads all line properties from the passed property set. */ void ConvertLineFormat( @@ -553,6 +553,7 @@ private: private: XclChText maData; /// Contents of the CHTEXT record. + XclExpChFramePosRef mxFramePos; /// Relative text frame position (CHFRAMEPOS record). XclExpChSourceLinkRef mxSrcLink; /// Linked data (CHSOURCELINK with CHSTRING record). XclExpChFrameRef mxFrame; /// Text object frame properties (CHFRAME group). XclExpChFontRef mxFont; /// Index into font buffer (CHFONT record). diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index 50c46586eefc..7ec0ba60db74 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -130,16 +130,16 @@ public: GetTitleShape( const XclChTextKey& rTitleKey ) const; /** Converts the passed horizontal coordinate from Excel chart units into 1/100 mm. */ - sal_Int32 CalcHmmFromChartX( sal_uInt16 nPosX ) const; + sal_Int32 CalcHmmFromChartX( sal_Int32 nPosX ) const; /** Converts the passed vertical coordinate from Excel chart units into 1/100 mm. */ - sal_Int32 CalcHmmFromChartY( sal_uInt16 nPosY ) const; + sal_Int32 CalcHmmFromChartY( sal_Int32 nPosY ) const; /** 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 Excel chart units into a relative position. */ - double CalcRelativeFromChartX( sal_uInt16 nPosX ) const; + double CalcRelativeFromChartX( sal_Int32 nPosX ) const; /** Converts the passed vertical coordinate from Excel chart units into a relative position. */ - double CalcRelativeFromChartY( sal_uInt16 nPosY ) const; + double CalcRelativeFromChartY( sal_Int32 nPosY ) const; /** Writes all line properties to the passed property set. */ void ConvertLineFormat( diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index 95c3cded8df0..3fd04f0b073f 100755 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -1300,7 +1300,8 @@ private: // Chart text and title object helpers ======================================== -/** Enumerates different text box types for default text formatting. */ +/** Enumerates different text box types for default text formatting and title + positioning. */ enum XclChTextType { EXC_CHTEXTTYPE_TITLE, /// Chart title. -- cgit v1.2.3 From df4b4ef4da48195b747373fb5a185cc7afd0a2bf Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Fri, 15 Jan 2010 17:55:53 +0100 Subject: chartpositioning: #i86609# BIFF8 export of manual title position --- oox/source/dump/biffdumper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oox/source/dump/biffdumper.cxx b/oox/source/dump/biffdumper.cxx index 2a341ec11538..fc3848a09b89 100644 --- a/oox/source/dump/biffdumper.cxx +++ b/oox/source/dump/biffdumper.cxx @@ -1997,7 +1997,7 @@ void WorkbookStreamObject::implDumpRecordBody() dumpRect< sal_Int32 >( "position", (eBiff <= BIFF4) ? "CONV-TWIP-TO-CM" : "" ); dumpHex< sal_uInt16 >( "flags-1", "CHTEXT-FLAGS1" ); if( eBiff == BIFF8 ) dumpColorIdx(); - if( eBiff == BIFF8 ) dumpDec< sal_uInt16 >( "flags-2", "CHTEXT-FLAGS2" ); + if( eBiff == BIFF8 ) dumpHex< sal_uInt16 >( "flags-2", "CHTEXT-FLAGS2" ); if( eBiff == BIFF8 ) dumpDec< sal_uInt16 >( "rotation", "TEXTROTATION" ); break; -- cgit v1.2.3 From 8f5509e83dbd92e7f8660c58241d782ec99f626e Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 19 Jan 2010 12:13:46 +0100 Subject: #i107721# tab-order and travel select fixed --- svx/source/dialog/thesdlg.cxx | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index 25dca8f3cc4a..9fdca370c535 100755 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -233,17 +233,16 @@ struct SvxThesaurusDialog_Impl { FixedText aWordText; ListBox aWordLB; - FixedText aReplaceText; - Edit aReplaceEdit; + MenuButton aLangMBtn; FixedText m_aAlternativesText; boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT; + FixedText aReplaceText; + Edit aReplaceEdit; + PushButton aLookUpBtn; FixedLine aFL; - + HelpButton aHelpBtn; OKButton aOkBtn; CancelButton aCancelBtn; - PushButton aLookUpBtn; - MenuButton aLangMBtn; - HelpButton aHelpBtn; String aErrStr; @@ -251,7 +250,7 @@ struct SvxThesaurusDialog_Impl OUString aLookUpText; LanguageType nLookUpLanguage; - SfxErrorContext* pErrContext; // ErrorContext, w"ahrend der Dialog oben ist + SfxErrorContext* pErrContext; // error context while dfalog is opened SvxThesaurusDialog_Impl( Window* pParent ); @@ -262,16 +261,16 @@ struct SvxThesaurusDialog_Impl SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : aWordText ( pParent, SVX_RES( FT_WORD ) ), aWordLB ( pParent, SVX_RES( LB_WORD ) ), - aReplaceText ( pParent, SVX_RES( FT_REPL ) ), - aReplaceEdit ( pParent, SVX_RES( ED_REPL ) ), + aLangMBtn ( pParent, SVX_RES( MB_LANGUAGE ) ), m_aAlternativesText ( pParent, SVX_RES( FT_THES_ALTERNATIVES ) ), m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( pParent ) ), + aReplaceText ( pParent, SVX_RES( FT_REPL ) ), + aReplaceEdit ( pParent, SVX_RES( ED_REPL ) ), + aLookUpBtn ( pParent, SVX_RES( BTN_LOOKUP ) ), aFL ( pParent, SVX_RES( FL_VAR ) ), + aHelpBtn ( pParent, SVX_RES( BTN_THES_HELP ) ), aOkBtn ( pParent, SVX_RES( BTN_THES_OK ) ), aCancelBtn ( pParent, SVX_RES( BTN_THES_CANCEL ) ), - aLookUpBtn ( pParent, SVX_RES( BTN_LOOKUP ) ), - aLangMBtn ( pParent, SVX_RES( MB_LANGUAGE ) ), - aHelpBtn ( pParent, SVX_RES( BTN_THES_HELP ) ), aErrStr ( SVX_RES( STR_ERR_WORDNOTFOUND ) ), xThesaurus ( NULL ), aLookUpText (), @@ -308,9 +307,9 @@ SvxThesaurusDialog::SvxThesaurusDialog( FreeResource(); + m_pImpl->aWordLB.SetSelectHdl( LINK( this, SvxThesaurusDialog, WordSelectHdl_Impl ) ); m_pImpl->aLangMBtn.SetSelectHdl( LINK( this, SvxThesaurusDialog, LanguageHdl_Impl ) ); m_pImpl->aLookUpBtn.SetClickHdl( LINK( this, SvxThesaurusDialog, LookUpHdl_Impl ) ); - m_pImpl->aWordLB.SetSelectHdl( LINK( this, SvxThesaurusDialog, WordSelectHdl_Impl ) ); m_pImpl->m_pAlternativesCT->SetSelectHdl( LINK( this, SvxThesaurusDialog, AlternativesSelectHdl_Impl )); m_pImpl->m_pAlternativesCT->SetDoubleClickHdl( LINK( this, SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl )); @@ -491,6 +490,7 @@ IMPL_LINK( SvxThesaurusDialog, LookUpHdl_Impl, Button *, pBtn ) m_pImpl->aWordLB.SelectEntry( aText ); m_pImpl->aReplaceEdit.SetText( String() ); + m_pImpl->m_pAlternativesCT->GrabFocus(); return 0; } @@ -499,11 +499,14 @@ IMPL_LINK( SvxThesaurusDialog, LookUpHdl_Impl, Button *, pBtn ) IMPL_LINK( SvxThesaurusDialog, WordSelectHdl_Impl, ListBox *, pBox ) { - String aStr( pBox->GetSelectEntry() ); - GetReplaceEditString( aStr ); - m_pImpl->aReplaceEdit.SetText( aStr ); + if (!m_pImpl->aWordLB.IsTravelSelect()) // act only upon return key and not when traveling with cursor keys + { + String aStr( pBox->GetSelectEntry() ); + GetReplaceEditString( aStr ); + m_pImpl->aReplaceEdit.SetText( aStr ); - LookUpHdl_Impl( &m_pImpl->aCancelBtn ); + LookUpHdl_Impl( &m_pImpl->aCancelBtn ); + } return 0; } -- cgit v1.2.3 From 8e071e3e2a509c15afcbbfcdf2b0e3bf404c25f5 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 20 Jan 2010 10:46:21 +0100 Subject: #i107721# setting selection after double click fixed --- svx/inc/svx/thesdlg.hxx | 2 ++ svx/source/dialog/thesdlg.cxx | 53 ++++++++++++++++++++++++++++++++----------- svx/source/dialog/thesdlg.src | 4 ++-- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/svx/inc/svx/thesdlg.hxx b/svx/inc/svx/thesdlg.hxx index 9ec4d21f7549..f3687496b6bb 100755 --- a/svx/inc/svx/thesdlg.hxx +++ b/svx/inc/svx/thesdlg.hxx @@ -67,6 +67,8 @@ class SVX_DLLPUBLIC SvxThesaurusDialog : public SvxStandardDialog DECL_LINK( WordSelectHdl_Impl, ListBox * ); DECL_LINK( AlternativesSelectHdl_Impl, SvxCheckListBox * ); DECL_LINK( AlternativesDoubleClickHdl_Impl, SvxCheckListBox * ); + + DECL_STATIC_LINK( SvxThesaurusDialog, SelectFirstHdl_Impl, SvxCheckListBox * ); #endif SVX_DLLPRIVATE virtual void Apply(); diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index 9fdca370c535..ebed699ad0f6 100755 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -405,17 +405,18 @@ sal_uInt16 SvxThesaurusDialog::GetLanguage() const bool SvxThesaurusDialog::UpdateAlternativesBox_Impl() { + lang::Locale aLocale( SvxCreateLocale( m_pImpl->nLookUpLanguage ) ); + uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeanings = queryMeanings_Impl( + m_pImpl->aLookUpText, aLocale, uno::Sequence< beans::PropertyValue >() ); + const sal_Int32 nMeanings = aMeanings.getLength(); + const uno::Reference< linguistic2::XMeaning > *pMeanings = aMeanings.getConstArray(); + // clear old user data of control before creating new ones via AddEntry below m_pImpl->m_pAlternativesCT->ClearUserData(); m_pImpl->m_pAlternativesCT->Clear(); m_pImpl->m_pAlternativesCT->SetUpdateMode( FALSE ); - lang::Locale aLocale( SvxCreateLocale( m_pImpl->nLookUpLanguage ) ); - uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeanings = queryMeanings_Impl( - m_pImpl->aLookUpText, aLocale, uno::Sequence< beans::PropertyValue >() ); - const sal_Int32 nMeanings = aMeanings.getLength(); - const uno::Reference< linguistic2::XMeaning > *pMeanings = aMeanings.getConstArray(); for (sal_Int32 i = 0; i < nMeanings; ++i) { OUString rMeaningTxt = pMeanings[i]->getMeaning(); @@ -467,14 +468,16 @@ IMPL_LINK( SvxThesaurusDialog, LanguageHdl_Impl, MenuButton *, pBtn ) if (m_pImpl->xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) m_pImpl->nLookUpLanguage = nLang; SetWindowTitle( nLang ); - UpdateAlternativesBox_Impl(); + bool bWordFound = UpdateAlternativesBox_Impl(); + if (!bWordFound) + InfoBox( this, m_pImpl->aErrStr ).Execute(); } return 0; } // ----------------------------------------------------------------------- -IMPL_LINK( SvxThesaurusDialog, LookUpHdl_Impl, Button *, pBtn ) +IMPL_LINK( SvxThesaurusDialog, LookUpHdl_Impl, Button *, EMPTYARG /*pBtn*/ ) { String aText( m_pImpl->aReplaceEdit.GetText() ); @@ -490,6 +493,7 @@ IMPL_LINK( SvxThesaurusDialog, LookUpHdl_Impl, Button *, pBtn ) m_pImpl->aWordLB.SelectEntry( aText ); m_pImpl->aReplaceEdit.SetText( String() ); + m_pImpl->aOkBtn.Enable( FALSE ); m_pImpl->m_pAlternativesCT->GrabFocus(); return 0; @@ -504,8 +508,9 @@ IMPL_LINK( SvxThesaurusDialog, WordSelectHdl_Impl, ListBox *, pBox ) String aStr( pBox->GetSelectEntry() ); GetReplaceEditString( aStr ); m_pImpl->aReplaceEdit.SetText( aStr ); + m_pImpl->aOkBtn.Enable( aStr.Len() > 0 ); - LookUpHdl_Impl( &m_pImpl->aCancelBtn ); + LookUpHdl_Impl( NULL ); } return 0; @@ -519,9 +524,14 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesSelectHdl_Impl, SvxCheckListBox *, pB if (pEntry) { AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData(); - String aStr( pData->GetText() ); - GetReplaceEditString( aStr ); + String aStr; + if (!pData->IsHeader()) + { + aStr = pData->GetText(); + GetReplaceEditString( aStr ); + } m_pImpl->aReplaceEdit.SetText( aStr ); + m_pImpl->aOkBtn.Enable( aStr.Len() > 0 ); } return 0; } @@ -534,12 +544,29 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvxCheckListBox if (pEntry) { AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData(); - String aStr( pData->GetText() ); - GetReplaceEditString( aStr ); + String aStr; + if (!pData->IsHeader()) + { + aStr = pData->GetText(); + GetReplaceEditString( aStr ); + } m_pImpl->aReplaceEdit.SetText( aStr ); - LookUpHdl_Impl( &m_pImpl->aCancelBtn ); + m_pImpl->aOkBtn.Enable( aStr.Len() > 0 ); + + if (aStr.Len() > 0) + LookUpHdl_Impl( NULL ); } + + //! workaround to set the selection since calling SelectEntryPos within + //! the double click handler does not work + Application::PostUserEvent( STATIC_LINK( this, SvxThesaurusDialog, SelectFirstHdl_Impl ), pBox ); return 0; } +IMPL_STATIC_LINK( SvxThesaurusDialog, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) +{ + if (pBox && pBox->GetEntryCount() > 0) + pBox->SelectEntryPos( 0 ); + return 0; +} \ No newline at end of file diff --git a/svx/source/dialog/thesdlg.src b/svx/source/dialog/thesdlg.src index 9af5fc0b49a5..6e7ea88ceff2 100755 --- a/svx/source/dialog/thesdlg.src +++ b/svx/source/dialog/thesdlg.src @@ -116,8 +116,8 @@ ModalDialog RID_SVXDLG_THESAURUS }; OkButton BTN_THES_OK { - Pos = MAP_APPFONT ( 70 , 210 ) ; - Size = MAP_APPFONT ( 79 , 14 ) ; + Pos = MAP_APPFONT ( 89 , 210 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Replace" ; DefButton = TRUE ; }; -- cgit v1.2.3 From ed22274c92f84abaebc53b5ddac922964894943d Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 20 Jan 2010 12:41:09 +0100 Subject: cws tl74: warning-free code --- svx/source/dialog/thesdlg.cxx | 122 +++++++++++++++++++++--------------------- svx/source/dialog/thesdlg.hrc | 0 svx/source/dialog/thesdlg.src | 0 3 files changed, 62 insertions(+), 60 deletions(-) mode change 100755 => 100644 svx/source/dialog/thesdlg.cxx mode change 100755 => 100644 svx/source/dialog/thesdlg.hrc mode change 100755 => 100644 svx/source/dialog/thesdlg.src diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx old mode 100755 new mode 100644 index ebed699ad0f6..afe53e0865a7 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -39,10 +39,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -189,8 +189,8 @@ ThesaurusAlternativesCtrl_Impl::~ThesaurusAlternativesCtrl_Impl() void ThesaurusAlternativesCtrl_Impl::ClearUserData() { - for (USHORT i = 0; i < GetEntryCount(); ++i) - delete (AlternativesUserData_Impl*)GetEntry(i)->GetUserData(); + for (USHORT i = 0; i < GetEntryCount(); ++i) + delete (AlternativesUserData_Impl*)GetEntry(i)->GetUserData(); } @@ -208,10 +208,10 @@ SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const St pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0 ) ); // otherwise crash pEntry->AddItem( new AlternativesString_Impl( pEntry, 0, aText ) ); - AlternativesUserData_Impl* pUserData = new AlternativesUserData_Impl( rText, bIsHeader ); - pEntry->SetUserData( pUserData ); - GetModel()->Insert( pEntry ); - + AlternativesUserData_Impl* pUserData = new AlternativesUserData_Impl( rText, bIsHeader ); + pEntry->SetUserData( pUserData ); + GetModel()->Insert( pEntry ); + return pEntry; } @@ -231,30 +231,30 @@ void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) struct SvxThesaurusDialog_Impl { - FixedText aWordText; - ListBox aWordLB; - MenuButton aLangMBtn; - FixedText m_aAlternativesText; - boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT; - FixedText aReplaceText; - Edit aReplaceEdit; - PushButton aLookUpBtn; - FixedLine aFL; - HelpButton aHelpBtn; - OKButton aOkBtn; - CancelButton aCancelBtn; - - String aErrStr; - + FixedText aWordText; + ListBox aWordLB; + MenuButton aLangMBtn; + FixedText m_aAlternativesText; + boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT; + FixedText aReplaceText; + Edit aReplaceEdit; + PushButton aLookUpBtn; + FixedLine aFL; + HelpButton aHelpBtn; + OKButton aOkBtn; + CancelButton aCancelBtn; + + String aErrStr; + uno::Reference< linguistic2::XThesaurus > xThesaurus; OUString aLookUpText; LanguageType nLookUpLanguage; SfxErrorContext* pErrContext; // error context while dfalog is opened - - - SvxThesaurusDialog_Impl( Window* pParent ); - ~SvxThesaurusDialog_Impl(); + + + SvxThesaurusDialog_Impl( Window* pParent ); + ~SvxThesaurusDialog_Impl(); }; @@ -308,7 +308,7 @@ SvxThesaurusDialog::SvxThesaurusDialog( FreeResource(); m_pImpl->aWordLB.SetSelectHdl( LINK( this, SvxThesaurusDialog, WordSelectHdl_Impl ) ); - m_pImpl->aLangMBtn.SetSelectHdl( LINK( this, SvxThesaurusDialog, LanguageHdl_Impl ) ); + m_pImpl->aLangMBtn.SetSelectHdl( LINK( this, SvxThesaurusDialog, LanguageHdl_Impl ) ); m_pImpl->aLookUpBtn.SetClickHdl( LINK( this, SvxThesaurusDialog, LookUpHdl_Impl ) ); m_pImpl->m_pAlternativesCT->SetSelectHdl( LINK( this, SvxThesaurusDialog, AlternativesSelectHdl_Impl )); m_pImpl->m_pAlternativesCT->SetDoubleClickHdl( LINK( this, SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl )); @@ -331,20 +331,20 @@ SvxThesaurusDialog::SvxThesaurusDialog( aLocales = m_pImpl->xThesaurus->getLocales(); const sal_Int32 nLocales = aLocales.getLength(); const lang::Locale *pLocales = aLocales.getConstArray(); - delete m_pImpl->aLangMBtn.GetPopupMenu(); + delete m_pImpl->aLangMBtn.GetPopupMenu(); PopupMenu* pMenu = new PopupMenu; pMenu->SetMenuFlags( MENU_FLAG_NOAUTOMNEMONICS ); - std::vector< OUString > aLangVec; - for (sal_Int32 i = 0; i < nLocales; ++i ) - { - const LanguageType nLang = SvxLocaleToLanguage( pLocales[i] ); - DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); - aLangVec.push_back( aLangTab.GetString( nLang ) ); - } - std::sort( aLangVec.begin(), aLangVec.end() ); - for (size_t i = 0; i < aLangVec.size(); ++i) - pMenu->InsertItem( (USHORT)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0 - m_pImpl->aLangMBtn.SetPopupMenu( pMenu ); + std::vector< OUString > aLangVec; + for (sal_Int32 i = 0; i < nLocales; ++i ) + { + const LanguageType nLang = SvxLocaleToLanguage( pLocales[i] ); + DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); + aLangVec.push_back( aLangTab.GetString( nLang ) ); + } + std::sort( aLangVec.begin(), aLangVec.end() ); + for (size_t i = 0; i < aLangVec.size(); ++i) + pMenu->InsertItem( (USHORT)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0 + m_pImpl->aLangMBtn.SetPopupMenu( pMenu ); // disable controls if service is missing if (!m_pImpl->xThesaurus.is()) @@ -388,11 +388,11 @@ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL SvxThesaurusDi } // ----------------------------------------------------------------------- - -String SvxThesaurusDialog::GetWord() -{ - return m_pImpl->aReplaceEdit.GetText(); -} + +String SvxThesaurusDialog::GetWord() +{ + return m_pImpl->aReplaceEdit.GetText(); +} // ----------------------------------------------------------------------- @@ -455,8 +455,8 @@ void SvxThesaurusDialog::SetWindowTitle(sal_Int16 nLanguage) } // ----------------------------------------------------------------------- - -IMPL_LINK( SvxThesaurusDialog, LanguageHdl_Impl, MenuButton *, pBtn ) + +IMPL_LINK( SvxThesaurusDialog, LanguageHdl_Impl, MenuButton *, pBtn ) { PopupMenu *pMenu = m_pImpl->aLangMBtn.GetPopupMenu(); if (pMenu && pBtn) @@ -464,11 +464,11 @@ IMPL_LINK( SvxThesaurusDialog, LanguageHdl_Impl, MenuButton *, pBtn ) USHORT nItem = pBtn->GetCurItemId(); String aLangText( pMenu->GetItemText( nItem ) ); LanguageType nLang = SvtLanguageTable().GetType( aLangText ); - DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); - if (m_pImpl->xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) - m_pImpl->nLookUpLanguage = nLang; - SetWindowTitle( nLang ); - bool bWordFound = UpdateAlternativesBox_Impl(); + DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); + if (m_pImpl->xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) + m_pImpl->nLookUpLanguage = nLang; + SetWindowTitle( nLang ); + bool bWordFound = UpdateAlternativesBox_Impl(); if (!bWordFound) InfoBox( this, m_pImpl->aErrStr ).Execute(); } @@ -564,9 +564,11 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvxCheckListBox } -IMPL_STATIC_LINK( SvxThesaurusDialog, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) -{ - if (pBox && pBox->GetEntryCount() > 0) - pBox->SelectEntryPos( 0 ); - return 0; -} \ No newline at end of file +IMPL_STATIC_LINK( SvxThesaurusDialog, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) +{ + (void) pThis; + if (pBox && pBox->GetEntryCount() > 0) + pBox->SelectEntryPos( 0 ); + return 0; +} + diff --git a/svx/source/dialog/thesdlg.hrc b/svx/source/dialog/thesdlg.hrc old mode 100755 new mode 100644 diff --git a/svx/source/dialog/thesdlg.src b/svx/source/dialog/thesdlg.src old mode 100755 new mode 100644 -- cgit v1.2.3 From dc964072aee8f92ff5792d36b24a2e5b6507ff05 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Mon, 25 Jan 2010 11:29:30 +0100 Subject: hb33patches01: #i105645#: applied patch --- sw/source/core/layout/tabfrm.cxx | 156 +-------------------------------------- 1 file changed, 2 insertions(+), 154 deletions(-) diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 61f08281e5f9..893938242aca 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1685,62 +1685,6 @@ BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm, return bRet; } -void MA_FASTCALL lcl_FirstTabCalc( SwTabFrm *pTab ) -{ - SWRECTFN( pTab ) - if ( !pTab->IsFollow() && !pTab->GetTable()->IsTblComplex() ) - { - SwLayoutFrm* pRow = (SwLayoutFrm*)pTab->Lower(); - // --> FME 2006-07-17 #134526# TabFrm without a lower? Better we check - // it before crashing. However, I still don't know how this can happen! - while ( pRow ) - { - SwLayoutFrm *pCell = (SwLayoutFrm*)pRow->Lower(); - SwFrm *pCnt = pCell->Lower(); - // --> OD 2006-11-08 #i70641# - make code robust - if ( pCnt ) - { - pCnt->Calc(); - const long nCellHeight = (pCell->Frm().*fnRect->fnGetHeight)(); - const long nCellY = (pCell->Frm().*fnRect->fnGetTop)()-1; - const long nCntHeight = (pCnt->Frm().*fnRect->fnGetHeight)(); - const long nCntY = (pCnt->Frm().*fnRect->fnGetTop)()-1; - if ( 0 != (pCell = (SwLayoutFrm*)pCell->GetNext()) ) - { - do - { - (pCell->Frm().*fnRect->fnSetTopAndHeight)( nCellY, nCellHeight ); - (pCell->Prt().*fnRect->fnSetHeight)( nCellHeight ); - pCell->_InvalidateAll(); - - pCnt = pCell->Lower(); - if ( pCnt ) - { - (pCnt->Frm().*fnRect->fnSetTopAndHeight)(nCntY, nCntHeight); - (pCnt->Prt().*fnRect->fnSetHeight)( nCntHeight ); - pCnt->_InvalidateAll(); - } - - pCell = (SwLayoutFrm*)pCell->GetNext(); - } while ( pCell ); - } - - SwTwips nRowTop = (pRow->Frm().*fnRect->fnGetTop)(); - SwTwips nUpBot = (pTab->GetUpper()->Frm().*fnRect->fnGetBottom)(); - if( (*fnRect->fnYDiff)( nUpBot, nRowTop ) < 0 ) - break; - } - // <-- - pRow = (SwLayoutFrm*)pRow->GetNext(); - } - } - SwFrm *pUp = pTab->GetUpper(); - long nBottom = (pUp->*fnRect->fnGetPrtBottom)(); - if ( pTab->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ) - nBottom += pUp->Grow( LONG_MAX, TRUE ); - lcl_CalcLowers( (SwLayoutFrm*)pTab->Lower(), pTab, LONG_MAX, false ); -} - void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom ) { // --> OD 2004-10-05 #i26945# - For correct appliance of the 'straightforward @@ -2151,17 +2095,13 @@ void SwTabFrm::MakeAll() if ( !bValidSize || !bValidPrtArea ) { - // HB #i101593# no optimization as it leeds to not layouting certain nested tables - // const BOOL bOptLower = (Frm().*fnRect->fnGetHeight)() == 0; - const BOOL bOptLower = FALSE; - const long nOldPrtWidth = (Prt().*fnRect->fnGetWidth)(); const long nOldFrmWidth = (Frm().*fnRect->fnGetWidth)(); const Point aOldPrtPos = (Prt().*fnRect->fnGetPos)(); Format( pAttrs ); SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout(); - if ( /*!bOptLower &&*/ pLayout && + if ( pLayout && ((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth || (Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) ) { @@ -2172,100 +2112,8 @@ void SwTabFrm::MakeAll() pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this ); pAttrs = pAccess->Get(); } - if ( !bOptLower && aOldPrtPos != (Prt().*fnRect->fnGetPos)() ) + if ( aOldPrtPos != (Prt().*fnRect->fnGetPos)() ) aNotify.SetLowersComplete( FALSE ); - - if ( bOptLower && Lower() ) - { - //MA 24. May. 95: Optimierungsversuch! - //Ganz nigel nagel neu das Teil. Damit wir nicht n-fach - //MakeAll'en formatieren wir flugs den Inhalt. - //Das erste Format mussten wir allerdings abwarten, damit - //die Breiten Stimmen! - //MA: Fix, Kein Calc wenn evtl. noch Seitengebunde Flys - //an den Cntnt haengen (siehe frmtool.cxx, ~SwCntntNotify). - SwDoc *pDoc = GetFmt()->GetDoc(); - if ( !pDoc->GetSpzFrmFmts()->Count() || - pDoc->IsLoaded() || pDoc->IsNewDoc() ) - { - //MA 28. Nov. 95: Und wieder ein Trick, gleich mal sehen - //ob ein Rueckfluss lohnt. - if ( bMoveable && !GetPrev() ) - { - GetLeaf( MAKEPAGE_NONE, FALSE ); //setzt das BackMoveJump - if ( SwFlowFrm::IsMoveBwdJump() ) - { - BOOL bDummy; - SwFtnBossFrm *pOldBoss = bFtnsInDoc ? - FindFtnBossFrm( TRUE ) : 0; - const BOOL bOldPrev = GetPrev() != 0; - if ( MoveBwd( bDummy ) ) - { - SWREFRESHFN( this ) - bMovedBwd = TRUE; - if ( bFtnsInDoc ) - MoveLowerFtns( 0, pOldBoss, 0, TRUE ); - - long nOldTop = (Frm().*fnRect->fnGetTop)(); - MakePos(); - if( nOldTop != (Frm().*fnRect->fnGetTop)() ) - { - SwHTMLTableLayout *pHTMLLayout = - GetTable()->GetHTMLTableLayout(); - if( pHTMLLayout ) - { - delete pAccess; - bCalcLowers |= pHTMLLayout->Resize( - pHTMLLayout->GetBrowseWidthByTabFrm( - *this ), FALSE ); - pAccess= new SwBorderAttrAccess( - SwFrm::GetCache(), this ); - pAttrs = pAccess->Get(); - } - } - - if ( bOldPrev != (0 != GetPrev()) ) - { - //Abstand nicht vergessen! - bValidPrtArea = FALSE; - Format( pAttrs ); - } - if ( bKeep && KEEPTAB ) - { - // --> OD 2005-09-28 #b6329202# - // Consider case that table is inside another - // table, because it has to be avoided, that - // superior table is formatted. - // Thus, find next content, table or section - // and, if a section is found, get its first - // content. -// SwFrm *pNxt = FindNextCnt(); -// // FindNextCnt geht ggf. in einen Bereich -// // hinein, in eine Tabelle allerdings auch -// if( pNxt && pNxt->IsInTab() ) -// pNxt = pNxt->FindTabFrm(); -// if ( pNxt ) -// { -// pNxt->Calc(); -// if ( !GetNext() ) -// bValidPos = FALSE; -// } - if ( 0 != lcl_FormatNextCntntForKeep( this ) && - !GetNext() ) - { - bValidPos = FALSE; - } - // <-- - } - } - } - } - ::lcl_FirstTabCalc( this ); - bValidSize = bValidPrtArea = FALSE; - Format( pAttrs ); - aNotify.SetLowersComplete( TRUE ); - } - } } //Wenn ich der erste einer Kette bin koennte ich mal sehen ob -- cgit v1.2.3 From 393e4f73f7b8477eeca268526f477160b567ae49 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 26 Jan 2010 15:05:10 +0100 Subject: cws tl74: #i107721# further changes to new thesaurus dialog --- svx/inc/svx/thesdlg.hxx | 30 +-- svx/source/dialog/thesdlg.cxx | 460 +++++++++++++++++-------------------- svx/source/dialog/thesdlg.hrc | 3 +- svx/source/dialog/thesdlg.src | 52 +++-- svx/source/dialog/thesdlg_impl.hxx | 185 +++++++++++++++ 5 files changed, 434 insertions(+), 296 deletions(-) create mode 100755 svx/source/dialog/thesdlg_impl.hxx diff --git a/svx/inc/svx/thesdlg.hxx b/svx/inc/svx/thesdlg.hxx index f3687496b6bb..dd58f3670aed 100755 --- a/svx/inc/svx/thesdlg.hxx +++ b/svx/inc/svx/thesdlg.hxx @@ -29,21 +29,18 @@ ************************************************************************/ #ifndef _SVX_THESDLG_HXX #define _SVX_THESDLG_HXX -// include --------------------------------------------------------------- -#include -#include -#include -#include +#include #include "svx/stddlg.hxx" #include "svx/svxdllapi.h" +#include -class MenuButton; class Button; -class ListBox; +class MenuButton; +class ComboBox; class SvxCheckListBox; ///////////////////////////////////////////////////////////////// @@ -54,29 +51,12 @@ class SVX_DLLPUBLIC SvxThesaurusDialog : public SvxStandardDialog { boost::shared_ptr< SvxThesaurusDialog_Impl > m_pImpl; -#ifdef _SVX_THESDLG_CXX - SVX_DLLPRIVATE bool UpdateAlternativesBox_Impl(); - SVX_DLLPRIVATE void SetWindowTitle(sal_Int16 nLanguage); - - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XMeaning > > SAL_CALL - queryMeanings_Impl( ::rtl::OUString& rTerm, const ::com::sun::star::lang::Locale& rLocale, const ::com::sun::star::beans::PropertyValues& rProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - // Handler - DECL_LINK( LanguageHdl_Impl, MenuButton * ); - DECL_LINK( LookUpHdl_Impl, Button * ); - DECL_LINK( WordSelectHdl_Impl, ListBox * ); - DECL_LINK( AlternativesSelectHdl_Impl, SvxCheckListBox * ); - DECL_LINK( AlternativesDoubleClickHdl_Impl, SvxCheckListBox * ); - - DECL_STATIC_LINK( SvxThesaurusDialog, SelectFirstHdl_Impl, SvxCheckListBox * ); -#endif - SVX_DLLPRIVATE virtual void Apply(); public: SvxThesaurusDialog( Window* pParent, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, - const String &rWord, sal_Int16 nLanguage ); + const String &rWord, LanguageType nLanguage ); ~SvxThesaurusDialog(); String GetWord(); diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index ebed699ad0f6..e4cf77453e9d 100755 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -31,6 +31,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include "thesdlg_impl.hxx" +#include "thesdlg.hrc" + #include #include @@ -39,30 +50,10 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include #include -#define _SVX_THESDLG_CXX - -#include -#include -#include "dlgutil.hxx" -#include "svxerr.hxx" -#include "thesdlg.hrc" - -#include -#include -#include -#include - +#include #include using namespace ::com::sun::star; @@ -71,6 +62,8 @@ using ::rtl::OUString; #define A2S(x) String::CreateFromAscii( x ) + + // GetReplaceEditString ------------------------------- static void GetReplaceEditString( String &rText ) @@ -100,35 +93,40 @@ static void GetReplaceEditString( String &rText ) rText.EraseLeadingAndTrailingChars( sal_Unicode(' ') ); } -// class ThesaurusAlternativesCtrl_Impl ---------------------------------- +// class LookUpComboBox -------------------------------------------------- -class AlternativesUserData_Impl +LookUpComboBox::LookUpComboBox( + Window *pParent, const ResId &rResId ) : + ComboBox (pParent, rResId) { - String sText; - bool bHeader; +} -public: - AlternativesUserData_Impl( const String &rText, bool bIsHeader ) : - sText(rText), - bHeader(bIsHeader) - { - } - bool IsHeader() const { return bHeader; } - const String& GetText() const { return sText; } -}; +LookUpComboBox::~LookUpComboBox() +{ +} + +void LookUpComboBox::Modify() +{ + if (m_pBtn) + m_pBtn->Enable( GetText().Len() > 0 ); +} -class AlternativesString_Impl : public SvLBoxString +void LookUpComboBox::SetText( const XubString& rStr ) { -public: + ComboBox::SetText( rStr ); + Modify(); +} - AlternativesString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) - : SvLBoxString( pEntry, nFlags, rStr ) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry); -}; +void LookUpComboBox::SetText( const XubString& rStr, const Selection& rNewSelection ) +{ + ComboBox::SetText( rStr, rNewSelection ); + Modify(); +} +// class ThesaurusAlternativesCtrl_Impl ---------------------------------- void AlternativesString_Impl::Paint( const Point& rPos, @@ -152,29 +150,11 @@ void AlternativesString_Impl::Paint( } -class ThesaurusAlternativesCtrl_Impl : - public SvxCheckListBox -{ - // disable copy c-tor and assignment operator - ThesaurusAlternativesCtrl_Impl( const ThesaurusAlternativesCtrl_Impl & ); - ThesaurusAlternativesCtrl_Impl & operator = ( const ThesaurusAlternativesCtrl_Impl & ); - -public: - ThesaurusAlternativesCtrl_Impl( Window* pParent ); - virtual ~ThesaurusAlternativesCtrl_Impl(); - - - - SvLBoxEntry * AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader ); - void ClearUserData(); - - virtual void KeyInput( const KeyEvent& rKEvt ); -}; - - ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl( - Window* pParent ) : - SvxCheckListBox( pParent, SVX_RES( CT_THES_ALTERNATIVES ) ) + Window* pParent, + SvxThesaurusDialog_Impl &rImpl ) : + SvxCheckListBox( pParent, SVX_RES( CT_THES_ALTERNATIVES ) ), + m_rDialogImpl( rImpl ) { SetWindowBits( WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE ); SetHighlightRange(); @@ -222,53 +202,28 @@ void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) if (rKey.GetCode() == KEY_RETURN || rKey.GetCode() == KEY_ESCAPE) GetParent()->KeyInput( rKEvt ); // parent will close dialog... - else if ( GetEntryCount() ) + else if (rKey.GetCode() == KEY_SPACE) + m_rDialogImpl.AlternativesDoubleClickHdl_Impl( this ); // look up current selected entry + else if (GetEntryCount()) SvxCheckListBox::KeyInput( rKEvt ); } // struct SvxThesaurusDialog_Impl ---------------------------------------- -struct SvxThesaurusDialog_Impl -{ - FixedText aWordText; - ListBox aWordLB; - MenuButton aLangMBtn; - FixedText m_aAlternativesText; - boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT; - FixedText aReplaceText; - Edit aReplaceEdit; - PushButton aLookUpBtn; - FixedLine aFL; - HelpButton aHelpBtn; - OKButton aOkBtn; - CancelButton aCancelBtn; - - String aErrStr; - - uno::Reference< linguistic2::XThesaurus > xThesaurus; - OUString aLookUpText; - LanguageType nLookUpLanguage; - - SfxErrorContext* pErrContext; // error context while dfalog is opened - - - SvxThesaurusDialog_Impl( Window* pParent ); - ~SvxThesaurusDialog_Impl(); -}; - - SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : + m_pParent ( pParent ), + aLeftBtn ( pParent, SVX_RES( BTN_LEFT ) ), aWordText ( pParent, SVX_RES( FT_WORD ) ), - aWordLB ( pParent, SVX_RES( LB_WORD ) ), - aLangMBtn ( pParent, SVX_RES( MB_LANGUAGE ) ), + aWordCB ( pParent, SVX_RES( CB_WORD ) ), + aLookUpBtn ( pParent, SVX_RES( BTN_LOOKUP ) ), m_aAlternativesText ( pParent, SVX_RES( FT_THES_ALTERNATIVES ) ), - m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( pParent ) ), + m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( pParent, *this ) ), aReplaceText ( pParent, SVX_RES( FT_REPL ) ), aReplaceEdit ( pParent, SVX_RES( ED_REPL ) ), - aLookUpBtn ( pParent, SVX_RES( BTN_LOOKUP ) ), aFL ( pParent, SVX_RES( FL_VAR ) ), aHelpBtn ( pParent, SVX_RES( BTN_THES_HELP ) ), + aLangMBtn ( pParent, SVX_RES( MB_LANGUAGE ) ), aOkBtn ( pParent, SVX_RES( BTN_THES_OK ) ), aCancelBtn ( pParent, SVX_RES( BTN_THES_CANCEL ) ), aErrStr ( SVX_RES( STR_ERR_WORDNOTFOUND ) ), @@ -278,6 +233,15 @@ SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : pErrContext ( NULL ) { // note: FreeResource must only be called in the c-tor of SvxThesaurusDialog + + aWordCB.SetButton( &aLookUpBtn ); + + aLeftBtn.SetClickHdl( LINK( this, SvxThesaurusDialog_Impl, LeftBtnHdl_Impl ) ); + aWordCB.SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, WordSelectHdl_Impl ) ); + aLangMBtn.SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, LanguageHdl_Impl ) ); + aLookUpBtn.SetClickHdl( LINK( this, SvxThesaurusDialog_Impl, LookUpHdl_Impl ) ); + m_pAlternativesCT->SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl )); + m_pAlternativesCT->SetDoubleClickHdl( LINK( this, SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl )); } @@ -287,87 +251,15 @@ SvxThesaurusDialog_Impl::~SvxThesaurusDialog_Impl() delete pErrContext; } -// class SvxThesaurusDialog ---------------------------------------------- -SvxThesaurusDialog::SvxThesaurusDialog( - Window* pParent, - uno::Reference< linguistic2::XThesaurus > xThes, - const String &rWord, - sal_Int16 nLanguage ) : - - SvxStandardDialog( pParent, SVX_RES( RID_SVXDLG_THESAURUS ) ) -{ - m_pImpl = boost::shared_ptr< SvxThesaurusDialog_Impl >(new SvxThesaurusDialog_Impl( this )); - - m_pImpl->xThesaurus = xThes; - m_pImpl->aLookUpText = OUString( rWord ); - m_pImpl->nLookUpLanguage = nLanguage; - m_pImpl->pErrContext = new SfxErrorContext( ERRCTX_SVX_LINGU_THESAURUS, String(), this, - RID_SVXERRCTX, &DIALOG_MGR() ); - - FreeResource(); - - m_pImpl->aWordLB.SetSelectHdl( LINK( this, SvxThesaurusDialog, WordSelectHdl_Impl ) ); - m_pImpl->aLangMBtn.SetSelectHdl( LINK( this, SvxThesaurusDialog, LanguageHdl_Impl ) ); - m_pImpl->aLookUpBtn.SetClickHdl( LINK( this, SvxThesaurusDialog, LookUpHdl_Impl ) ); - m_pImpl->m_pAlternativesCT->SetSelectHdl( LINK( this, SvxThesaurusDialog, AlternativesSelectHdl_Impl )); - m_pImpl->m_pAlternativesCT->SetDoubleClickHdl( LINK( this, SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl )); - - OUString aTmp( rWord ); - linguistic::RemoveHyphens( aTmp ); - linguistic::ReplaceControlChars( aTmp ); - m_pImpl->aReplaceEdit.SetText( aTmp ); - m_pImpl->aWordLB.InsertEntry( aTmp ); - m_pImpl->aWordLB.SelectEntry( aTmp ); - - SetWindowTitle( nLanguage ); - UpdateAlternativesBox_Impl(); - m_pImpl->m_pAlternativesCT->GrabFocus(); - - // fill language menu button list - SvtLanguageTable aLangTab; - uno::Sequence< lang::Locale > aLocales; - if (m_pImpl->xThesaurus.is()) - aLocales = m_pImpl->xThesaurus->getLocales(); - const sal_Int32 nLocales = aLocales.getLength(); - const lang::Locale *pLocales = aLocales.getConstArray(); - delete m_pImpl->aLangMBtn.GetPopupMenu(); - PopupMenu* pMenu = new PopupMenu; - pMenu->SetMenuFlags( MENU_FLAG_NOAUTOMNEMONICS ); - std::vector< OUString > aLangVec; - for (sal_Int32 i = 0; i < nLocales; ++i ) - { - const LanguageType nLang = SvxLocaleToLanguage( pLocales[i] ); - DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); - aLangVec.push_back( aLangTab.GetString( nLang ) ); - } - std::sort( aLangVec.begin(), aLangVec.end() ); - for (size_t i = 0; i < aLangVec.size(); ++i) - pMenu->InsertItem( (USHORT)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0 - m_pImpl->aLangMBtn.SetPopupMenu( pMenu ); - - // disable controls if service is missing - if (!m_pImpl->xThesaurus.is()) - Enable( sal_False ); -} - - -// ----------------------------------------------------------------------- - -SvxThesaurusDialog::~SvxThesaurusDialog() -{ -} - -// ----------------------------------------------------------------------- - -uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL SvxThesaurusDialog::queryMeanings_Impl( +uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL SvxThesaurusDialog_Impl::queryMeanings_Impl( OUString& rTerm, const lang::Locale& rLocale, const beans::PropertyValues& rProperties ) throw(lang::IllegalArgumentException, uno::RuntimeException) { uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeanings( - m_pImpl->xThesaurus->queryMeanings( rTerm, rLocale, rProperties ) ); + xThesaurus->queryMeanings( rTerm, rLocale, rProperties ) ); // text with '.' at the end? if (0 == aMeanings.getLength() && rTerm.getLength() && @@ -377,7 +269,7 @@ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL SvxThesaurusDi // end of a sentence and not an abbreviation... String aTxt( rTerm ); aTxt.EraseTrailingChars( '.' ); - aMeanings = m_pImpl->xThesaurus->queryMeanings( aTxt, rLocale, rProperties ); + aMeanings = xThesaurus->queryMeanings( aTxt, rLocale, rProperties ); if (aMeanings.getLength()) { rTerm = aTxt; @@ -387,35 +279,20 @@ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL SvxThesaurusDi return aMeanings; } -// ----------------------------------------------------------------------- - -String SvxThesaurusDialog::GetWord() -{ - return m_pImpl->aReplaceEdit.GetText(); -} - -// ----------------------------------------------------------------------- - -sal_uInt16 SvxThesaurusDialog::GetLanguage() const -{ - return m_pImpl->nLookUpLanguage; -} - -// ----------------------------------------------------------------------- -bool SvxThesaurusDialog::UpdateAlternativesBox_Impl() +bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() { - lang::Locale aLocale( SvxCreateLocale( m_pImpl->nLookUpLanguage ) ); + lang::Locale aLocale( SvxCreateLocale( nLookUpLanguage ) ); uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeanings = queryMeanings_Impl( - m_pImpl->aLookUpText, aLocale, uno::Sequence< beans::PropertyValue >() ); + aLookUpText, aLocale, uno::Sequence< beans::PropertyValue >() ); const sal_Int32 nMeanings = aMeanings.getLength(); const uno::Reference< linguistic2::XMeaning > *pMeanings = aMeanings.getConstArray(); // clear old user data of control before creating new ones via AddEntry below - m_pImpl->m_pAlternativesCT->ClearUserData(); + m_pAlternativesCT->ClearUserData(); - m_pImpl->m_pAlternativesCT->Clear(); - m_pImpl->m_pAlternativesCT->SetUpdateMode( FALSE ); + m_pAlternativesCT->Clear(); + m_pAlternativesCT->SetUpdateMode( FALSE ); for (sal_Int32 i = 0; i < nMeanings; ++i) { @@ -426,89 +303,96 @@ bool SvxThesaurusDialog::UpdateAlternativesBox_Impl() DBG_ASSERT( rMeaningTxt.getLength() > 0, "meaning with empty text" ); DBG_ASSERT( nSynonyms > 0, "meaning without synonym" ); - m_pImpl->m_pAlternativesCT->AddEntry( i + 1, rMeaningTxt, true ); + m_pAlternativesCT->AddEntry( i + 1, rMeaningTxt, true ); for (sal_Int32 k = 0; k < nSynonyms; ++k) - m_pImpl->m_pAlternativesCT->AddEntry( -1, pSynonyms[k], false ); + m_pAlternativesCT->AddEntry( -1, pSynonyms[k], false ); } - m_pImpl->m_pAlternativesCT->SetUpdateMode( TRUE ); + m_pAlternativesCT->SetUpdateMode( TRUE ); - return nMeanings > 0; + const bool bWordFound = nMeanings > 0; + if (!bWordFound) + InfoBox( m_pParent, aErrStr ).Execute(); + return bWordFound; } -// ----------------------------------------------------------------------- - -void SvxThesaurusDialog::Apply() -{ -} -// ----------------------------------------------------------------------- -void SvxThesaurusDialog::SetWindowTitle(sal_Int16 nLanguage) +void SvxThesaurusDialog_Impl::SetWindowTitle( LanguageType nLanguage ) { // Sprache anpassen - String aStr( GetText() ); + String aStr( m_pParent->GetText() ); aStr.Erase( aStr.Search( sal_Unicode( '(' ) ) - 1 ); aStr.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ) ); aStr += GetLanguageString( (LanguageType) nLanguage ); aStr.Append( sal_Unicode( ')' ) ); - SetText( aStr ); // set window title + m_pParent->SetText( aStr ); // set window title +} + + +IMPL_LINK( SvxThesaurusDialog_Impl, LeftBtnHdl_Impl, Button *, pBtn ) +{ + if (pBtn) + { + aLookUpHistory.pop(); // remove current look up word from stack + aWordCB.SetText( aLookUpHistory.top() ); // retrieve previous look up word + aLookUpHistory.pop(); + LookUpHdl_Impl( NULL ); + } + return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxThesaurusDialog, LanguageHdl_Impl, MenuButton *, pBtn ) +IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) { - PopupMenu *pMenu = m_pImpl->aLangMBtn.GetPopupMenu(); + PopupMenu *pMenu = aLangMBtn.GetPopupMenu(); if (pMenu && pBtn) { USHORT nItem = pBtn->GetCurItemId(); String aLangText( pMenu->GetItemText( nItem ) ); LanguageType nLang = SvtLanguageTable().GetType( aLangText ); DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); - if (m_pImpl->xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) - m_pImpl->nLookUpLanguage = nLang; + if (xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) + nLookUpLanguage = nLang; SetWindowTitle( nLang ); - bool bWordFound = UpdateAlternativesBox_Impl(); - if (!bWordFound) - InfoBox( this, m_pImpl->aErrStr ).Execute(); + UpdateAlternativesBox_Impl(); } return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxThesaurusDialog, LookUpHdl_Impl, Button *, EMPTYARG /*pBtn*/ ) +IMPL_LINK( SvxThesaurusDialog_Impl, LookUpHdl_Impl, Button *, EMPTYARG /*pBtn*/ ) { - String aText( m_pImpl->aReplaceEdit.GetText() ); + String aText( aWordCB.GetText() ); - OUString aOldLookUpText = m_pImpl->aLookUpText; - m_pImpl->aLookUpText = OUString( aText ); + aLookUpText = OUString( aText ); + if (aLookUpText.getLength() > 0) + aLookUpHistory.push( aLookUpText ); - bool bWordFound = UpdateAlternativesBox_Impl(); - if (!bWordFound) - InfoBox( this, m_pImpl->aErrStr ).Execute(); + UpdateAlternativesBox_Impl(); - if ( m_pImpl->aWordLB.GetEntryPos( aText ) == LISTBOX_ENTRY_NOTFOUND ) - m_pImpl->aWordLB.InsertEntry( aText ); + if ( aWordCB.GetEntryPos( aText ) == LISTBOX_ENTRY_NOTFOUND ) + aWordCB.InsertEntry( aText ); - m_pImpl->aWordLB.SelectEntry( aText ); - m_pImpl->aReplaceEdit.SetText( String() ); - m_pImpl->aOkBtn.Enable( FALSE ); - m_pImpl->m_pAlternativesCT->GrabFocus(); + aWordCB.SelectEntryPos( aWordCB.GetEntryPos( aText ) ); + aReplaceEdit.SetText( String() ); + aOkBtn.Enable( FALSE ); + m_pAlternativesCT->GrabFocus(); + + aLeftBtn.Enable( aLookUpHistory.size() > 1 ); return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxThesaurusDialog, WordSelectHdl_Impl, ListBox *, pBox ) +IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox ) { - if (!m_pImpl->aWordLB.IsTravelSelect()) // act only upon return key and not when traveling with cursor keys + if (pBox && !aWordCB.IsTravelSelect()) // act only upon return key and not when traveling with cursor keys { - String aStr( pBox->GetSelectEntry() ); + USHORT nPos = pBox->GetSelectEntryPos(); + String aStr( pBox->GetEntry( nPos ) ); GetReplaceEditString( aStr ); - m_pImpl->aReplaceEdit.SetText( aStr ); - m_pImpl->aOkBtn.Enable( aStr.Len() > 0 ); + aWordCB.SetText( aStr ); + aOkBtn.Enable( aStr.Len() > 0 ); LookUpHdl_Impl( NULL ); } @@ -516,11 +400,10 @@ IMPL_LINK( SvxThesaurusDialog, WordSelectHdl_Impl, ListBox *, pBox ) return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxThesaurusDialog, AlternativesSelectHdl_Impl, SvxCheckListBox *, pBox ) +IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox *, pBox ) { - SvLBoxEntry *pEntry = pBox->GetCurEntry(); + SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL; if (pEntry) { AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData(); @@ -530,17 +413,16 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesSelectHdl_Impl, SvxCheckListBox *, pB aStr = pData->GetText(); GetReplaceEditString( aStr ); } - m_pImpl->aReplaceEdit.SetText( aStr ); - m_pImpl->aOkBtn.Enable( aStr.Len() > 0 ); + aReplaceEdit.SetText( aStr ); + aOkBtn.Enable( aStr.Len() > 0 ); } return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvxCheckListBox *, pBox ) +IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckListBox *, pBox ) { - SvLBoxEntry *pEntry = pBox->GetCurEntry(); + SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL; if (pEntry) { AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData(); @@ -550,8 +432,8 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvxCheckListBox aStr = pData->GetText(); GetReplaceEditString( aStr ); } - m_pImpl->aReplaceEdit.SetText( aStr ); - m_pImpl->aOkBtn.Enable( aStr.Len() > 0 ); + aWordCB.SetText( aStr ); + aOkBtn.Enable( aStr.Len() > 0 ); if (aStr.Len() > 0) LookUpHdl_Impl( NULL ); @@ -559,14 +441,100 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvxCheckListBox //! workaround to set the selection since calling SelectEntryPos within //! the double click handler does not work - Application::PostUserEvent( STATIC_LINK( this, SvxThesaurusDialog, SelectFirstHdl_Impl ), pBox ); + Application::PostUserEvent( STATIC_LINK( this, SvxThesaurusDialog_Impl, SelectFirstHdl_Impl ), pBox ); return 0; } -IMPL_STATIC_LINK( SvxThesaurusDialog, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) +IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) { if (pBox && pBox->GetEntryCount() > 0) pBox->SelectEntryPos( 0 ); return 0; -} \ No newline at end of file +} + + +// class SvxThesaurusDialog ---------------------------------------------- + +SvxThesaurusDialog::SvxThesaurusDialog( + Window* pParent, + uno::Reference< linguistic2::XThesaurus > xThes, + const String &rWord, + LanguageType nLanguage ) : + + SvxStandardDialog( pParent, SVX_RES( RID_SVXDLG_THESAURUS ) ) +{ + m_pImpl = boost::shared_ptr< SvxThesaurusDialog_Impl >(new SvxThesaurusDialog_Impl( this )); + + m_pImpl->xThesaurus = xThes; + m_pImpl->aLookUpText = OUString( rWord ); + m_pImpl->nLookUpLanguage = nLanguage; + if (rWord.Len() > 0) + m_pImpl->aLookUpHistory.push( rWord ); + m_pImpl->pErrContext = new SfxErrorContext( ERRCTX_SVX_LINGU_THESAURUS, String(), this, + RID_SVXERRCTX, &DIALOG_MGR() ); + + FreeResource(); + + OUString aTmp( rWord ); + linguistic::RemoveHyphens( aTmp ); + linguistic::ReplaceControlChars( aTmp ); + String aTmp2( aTmp ); + m_pImpl->aReplaceEdit.SetText( aTmp2 ); + m_pImpl->aWordCB.InsertEntry( aTmp2 ); + m_pImpl->aWordCB.SelectEntryPos( m_pImpl->aWordCB.GetEntryPos( aTmp2 ) ); + + m_pImpl->SetWindowTitle( nLanguage ); + m_pImpl->UpdateAlternativesBox_Impl(); + m_pImpl->m_pAlternativesCT->GrabFocus(); + m_pImpl->aLeftBtn.Enable( sal_False ); + + // fill language menu button list + SvtLanguageTable aLangTab; + uno::Sequence< lang::Locale > aLocales; + if (m_pImpl->xThesaurus.is()) + aLocales = m_pImpl->xThesaurus->getLocales(); + const sal_Int32 nLocales = aLocales.getLength(); + const lang::Locale *pLocales = aLocales.getConstArray(); + delete m_pImpl->aLangMBtn.GetPopupMenu(); + PopupMenu* pMenu = new PopupMenu; + pMenu->SetMenuFlags( MENU_FLAG_NOAUTOMNEMONICS ); + std::vector< OUString > aLangVec; + for (sal_Int32 i = 0; i < nLocales; ++i ) + { + const LanguageType nLang = SvxLocaleToLanguage( pLocales[i] ); + DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); + aLangVec.push_back( aLangTab.GetString( nLang ) ); + } + std::sort( aLangVec.begin(), aLangVec.end() ); + for (size_t i = 0; i < aLangVec.size(); ++i) + pMenu->InsertItem( (USHORT)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0 + m_pImpl->aLangMBtn.SetPopupMenu( pMenu ); + + // disable controls if service is missing + if (!m_pImpl->xThesaurus.is()) + Enable( sal_False ); +} + + +SvxThesaurusDialog::~SvxThesaurusDialog() +{ +} + + +String SvxThesaurusDialog::GetWord() +{ + return m_pImpl->aReplaceEdit.GetText(); +} + + +sal_uInt16 SvxThesaurusDialog::GetLanguage() const +{ + return m_pImpl->nLookUpLanguage; +} + + +void SvxThesaurusDialog::Apply() +{ +} + diff --git a/svx/source/dialog/thesdlg.hrc b/svx/source/dialog/thesdlg.hrc index 4a11bb126e67..aa7a7abf31a3 100755 --- a/svx/source/dialog/thesdlg.hrc +++ b/svx/source/dialog/thesdlg.hrc @@ -32,13 +32,14 @@ // defines --------------------------------------------------------------- +#define BTN_LEFT 9 #define BTN_THES_OK 10 #define BTN_THES_CANCEL 11 #define MB_LANGUAGE 12 #define BTN_THES_HELP 13 #define BTN_LOOKUP 14 #define FT_WORD 15 -#define LB_WORD 16 +#define CB_WORD 16 #define FT_REPL 21 #define ED_REPL 22 #define FL_VAR 23 diff --git a/svx/source/dialog/thesdlg.src b/svx/source/dialog/thesdlg.src index 6e7ea88ceff2..67b37a97e15e 100755 --- a/svx/source/dialog/thesdlg.src +++ b/svx/source/dialog/thesdlg.src @@ -39,37 +39,42 @@ ModalDialog RID_SVXDLG_THESAURUS { HelpId = SID_THESAURUS ; OutputSize = TRUE ; -// Size = MAP_APPFONT ( 285, 116 ) ; - Size = MAP_APPFONT ( 220, 230 ) ; + Size = MAP_APPFONT ( 265, 230 ) ; Text [ en-US ] = "Thesaurus" ; Moveable = TRUE ; SvLook = TRUE ; + ImageButton BTN_LEFT + { + Pos = MAP_APPFONT ( 5 , 15 ) ; + Size = MAP_APPFONT ( 14 , 14 ) ; + TABSTOP = TRUE ; + SYMBOL = IMAGEBUTTON_ARROW_LEFT ; + }; FixedText FT_WORD { - Pos = MAP_APPFONT ( 5 , 5 ) ; + Pos = MAP_APPFONT ( 24 , 5 ) ; Size = MAP_APPFONT ( 143 , 8 ) ; Text [ en-US ] = "Current ~word" ; LEFT = TRUE ; }; - ListBox LB_WORD + ComboBox CB_WORD { DropDown = TRUE ; - Pos = MAP_APPFONT ( 5 , 16 ) ; - Size = MAP_APPFONT ( 143 , 60 ) ; // have drop down space for several lines + Pos = MAP_APPFONT ( 24 , 16 ) ; + Size = MAP_APPFONT ( 171 , 60 ) ; // have drop down space for several lines }; - MenuButton MB_LANGUAGE + PushButton BTN_LOOKUP { - Pos = MAP_APPFONT ( 154 , 16 ) ; - Pos = MAP_APPFONT ( 154 , 16 ) ; + Pos = MAP_APPFONT ( 200 , 16 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "~Language" ; + Text [ en-US ] = "Look ~Up" ; }; FixedText FT_THES_ALTERNATIVES { Pos = MAP_APPFONT ( 5 , 33 ) ; - Size = MAP_APPFONT ( 220 , 8 ) ; + Size = MAP_APPFONT ( 255 , 8 ) ; Text [ en-US ] = "~Alternatives" ; LEFT = TRUE ; }; @@ -77,7 +82,7 @@ ModalDialog RID_SVXDLG_THESAURUS { HelpID = HID_CT_THES_ALTERNATIVES ; Pos = MAP_APPFONT ( 5 , 45 ) ; - Size = MAP_APPFONT ( 209 , 121 ) ; + Size = MAP_APPFONT ( 255 , 121 ) ; Border = TRUE; TabStop = TRUE ; }; @@ -85,7 +90,7 @@ ModalDialog RID_SVXDLG_THESAURUS FixedText FT_REPL { Pos = MAP_APPFONT ( 5 , 173 ) ; - Size = MAP_APPFONT ( 143 , 8 ) ; + Size = MAP_APPFONT ( 255 , 8 ) ; Text [ en-US ] = "Replace ~with" ; LEFT = TRUE ; }; @@ -93,37 +98,36 @@ ModalDialog RID_SVXDLG_THESAURUS { BORDER = TRUE ; Pos = MAP_APPFONT ( 5 , 184 ) ; - Size = MAP_APPFONT ( 143 , 12 ) ; + Size = MAP_APPFONT ( 255 , 12 ) ; LEFT = TRUE ; }; - PushButton BTN_LOOKUP - { - Pos = MAP_APPFONT ( 154 , 184 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "Look ~Up" ; - }; FixedLine FL_VAR { Pos = MAP_APPFONT ( 0 , 200 ) ; - Size = MAP_APPFONT ( 220 , 8 ) ; + Size = MAP_APPFONT ( 265 , 8 ) ; }; - HelpButton BTN_THES_HELP { Pos = MAP_APPFONT ( 5 , 210 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; }; + MenuButton MB_LANGUAGE + { + Pos = MAP_APPFONT ( 70 , 210 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + Text [ en-US ] = "~Language" ; + }; OkButton BTN_THES_OK { - Pos = MAP_APPFONT ( 89 , 210 ) ; + Pos = MAP_APPFONT ( 135 , 210 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Replace" ; DefButton = TRUE ; }; CancelButton BTN_THES_CANCEL { - Pos = MAP_APPFONT ( 154 , 210 ) ; + Pos = MAP_APPFONT ( 200 , 210 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; }; diff --git a/svx/source/dialog/thesdlg_impl.hxx b/svx/source/dialog/thesdlg_impl.hxx new file mode 100755 index 000000000000..e862f2199730 --- /dev/null +++ b/svx/source/dialog/thesdlg_impl.hxx @@ -0,0 +1,185 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * 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 _SVX_THESDLG_IMPL_HXX +#define _SVX_THESDLG_IMPL_HXX + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +using namespace ::com::sun::star; +using ::rtl::OUString; + +// class LookUpComboBox -------------------------------------------------- + +class LookUpComboBox : public ComboBox +{ + Button * m_pBtn; + + // disable copy c-tor and assignment operator + LookUpComboBox( const LookUpComboBox & ); + LookUpComboBox & operator = ( const LookUpComboBox & ); + +public: + LookUpComboBox( Window *pParent, const ResId &rResId ); + virtual ~LookUpComboBox(); + + void SetButton( Button *pBtn ) { m_pBtn = pBtn; } + + // ComboBox + virtual void Modify(); + virtual void SetText( const XubString& rStr ); + virtual void SetText( const XubString& rStr, const Selection& rNewSelection ); +}; + +// class ThesaurusAlternativesCtrl_Impl ---------------------------------- + +class AlternativesUserData_Impl +{ + String sText; + bool bHeader; + + // disable copy c-tor and assignment operator + AlternativesUserData_Impl( const AlternativesUserData_Impl & ); + AlternativesUserData_Impl & operator = ( const AlternativesUserData_Impl & ); + +public: + AlternativesUserData_Impl( const String &rText, bool bIsHeader ) : + sText(rText), + bHeader(bIsHeader) + { + } + + bool IsHeader() const { return bHeader; } + const String& GetText() const { return sText; } +}; + + +class AlternativesString_Impl : public SvLBoxString +{ +public: + + AlternativesString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) + : SvLBoxString( pEntry, nFlags, rStr ) {} + + virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry); +}; + + +class ThesaurusAlternativesCtrl_Impl : + public SvxCheckListBox +{ + SvxThesaurusDialog_Impl & m_rDialogImpl; + + // disable copy c-tor and assignment operator + ThesaurusAlternativesCtrl_Impl( const ThesaurusAlternativesCtrl_Impl & ); + ThesaurusAlternativesCtrl_Impl & operator = ( const ThesaurusAlternativesCtrl_Impl & ); + +public: + ThesaurusAlternativesCtrl_Impl( Window* pParent, SvxThesaurusDialog_Impl &rImpl ); + virtual ~ThesaurusAlternativesCtrl_Impl(); + + + SvLBoxEntry * AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader ); + void ClearUserData(); + + virtual void KeyInput( const KeyEvent& rKEvt ); +}; + + +// struct SvxThesaurusDialog_Impl ---------------------------------------- + +struct SvxThesaurusDialog_Impl +{ + Window* m_pParent; + + ImageButton aLeftBtn; + FixedText aWordText; + LookUpComboBox aWordCB; + PushButton aLookUpBtn; + FixedText m_aAlternativesText; + boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT; + FixedText aReplaceText; + Edit aReplaceEdit; + FixedLine aFL; + HelpButton aHelpBtn; + MenuButton aLangMBtn; + OKButton aOkBtn; + CancelButton aCancelBtn; + + String aErrStr; + + uno::Reference< linguistic2::XThesaurus > xThesaurus; + OUString aLookUpText; + LanguageType nLookUpLanguage; + std::stack< OUString > aLookUpHistory; + + SfxErrorContext* pErrContext; // error context while dfalog is opened + + + // Handler + DECL_LINK( LeftBtnHdl_Impl, Button * ); + DECL_LINK( LanguageHdl_Impl, MenuButton * ); + DECL_LINK( LookUpHdl_Impl, Button * ); + DECL_LINK( WordSelectHdl_Impl, ComboBox * ); + DECL_LINK( AlternativesSelectHdl_Impl, SvxCheckListBox * ); + DECL_LINK( AlternativesDoubleClickHdl_Impl, SvxCheckListBox * ); + + DECL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox * ); + + + SvxThesaurusDialog_Impl( Window* pParent ); + ~SvxThesaurusDialog_Impl(); + + uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL + queryMeanings_Impl( ::rtl::OUString& rTerm, const lang::Locale& rLocale, const beans::PropertyValues& rProperties ) throw(lang::IllegalArgumentException, uno::RuntimeException); + + bool UpdateAlternativesBox_Impl(); + void SetWindowTitle( LanguageType nLanguage ); +}; + +#endif + -- cgit v1.2.3 From 382d6a28327cd53e6fe1da612a1086b1e5242e20 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 26 Jan 2010 15:05:10 +0100 Subject: cws tl74: #i107721# further changes to new thesaurus dialog --- sw/source/ui/uiview/viewling.cxx | 54 +--------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) mode change 100644 => 100755 sw/source/ui/uiview/viewling.cxx diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx old mode 100644 new mode 100755 index 111704c90c42..50ff6cae2295 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -265,21 +265,9 @@ void SwView::StartTextConversion( // do not do text conversion if it is active elsewhere if (GetWrtShell().HasConvIter()) { -// MessBox( 0, WB_OK, String( SW_RES( STR_SPELL_TITLE ) ), -// String( SW_RES( STR_MULT_INTERACT_SPELL_WARN ) ) ).Execute(); return; } -/* - SfxErrorContext aContext( ERRCTX_SVX_LINGU_SPELLING, aEmptyStr, pEditWin, - RID_SVXERRCTX, DIALOG_MGR() ); - Reference< XSpellChecker1 > xSpell = ::GetSpellChecker(); - if(!xSpell.is()) - { // keine Arme keine Kekse - ErrorHandler::HandleError( ERRCODE_SVX_LINGU_LINGUNOTEXISTS ); - return; - } -*/ SpellKontext(sal_True); const SwViewOption* pVOpt = pWrtShell->GetViewOptions(); @@ -642,12 +630,6 @@ void SwView::StartThesaurus() sal_Bool bOldIdle = pVOpt->IsIdle(); pVOpt->SetIdle( sal_False ); -#ifdef TL_NEVER -//!!! hier mu� noch was getan werden... (Umsetzung der Funktionalitaet) - // ErrorLink setzen, alten merken - Link aOldLnk = pSpell->ChgErrorLink(LINK(this, SwView, SpellError)); -#endif - // get initial LookUp text const sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection(); String aTmp = GetThesaurusLookUpText( bSelection ); @@ -656,47 +638,13 @@ void SwView::StartThesaurus() SvxThesaurusDialog *pDlg = NULL; if ( !xThes.is() || !xThes->hasLocale( SvxCreateLocale( eLang ) ) ) - { SpellError( &eLang ); - } else { // create dialog { //Scope for SwWait-Object SwWait aWait( *GetDocShell(), sal_True ); - pDlg = new SvxThesaurusDialog( &GetEditWin(), - xThes, aTmp, eLang ); - } - - { - // Hier wird der Thesaurus-Dialog im Applikationsfenster zentriert, - // und zwar oberhalb oder unterhalb der Cursorposition, je nachdem, - // wo mehr Platz ist. - - // Current Word: - SwRect aRect( pWrtShell->GetCharRect() ); - Point aTopPos = aRect.Pos(); - Point aBtmPos( aTopPos.X(), aRect.Bottom() ); - aTopPos = GetEditWin().LogicToPixel( aTopPos ); - aTopPos = GetEditWin().OutputToScreenPixel( aTopPos ); - aBtmPos = GetEditWin().LogicToPixel( aBtmPos ); - aBtmPos = GetEditWin().OutputToScreenPixel( aBtmPos ); - // ::frame::Desktop: - Rectangle aRct = GetEditWin().GetDesktopRectPixel(); - Point aWinTop( aRct.TopLeft() ); - Point aWinBtm( aRct.BottomRight() ); - if ( aTopPos.Y() - aWinTop.Y() > aWinBtm.Y() - aBtmPos.Y() ) - aWinBtm.Y() = aTopPos.Y(); - else - aWinTop.Y() = aBtmPos.Y(); - - Size aSz = pDlg->GetSizePixel(); - if ( aWinBtm.Y() - aWinTop.Y() > aSz.Height() ) - { - aWinTop.X() = ( aWinTop.X() + aWinBtm.X() - aSz.Width() ) / 2; - aWinTop.Y() = ( aWinTop.Y() + aWinBtm.Y() - aSz.Height() ) / 2; - pDlg->SetPosPixel( aWinTop ); - } + pDlg = new SvxThesaurusDialog( &GetEditWin(), xThes, aTmp, eLang ); } if ( pDlg->Execute()== RET_OK ) -- cgit v1.2.3 From 4c8c50fdc10ef9afb826a826c4de23781a70bf43 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 5 Feb 2010 13:45:10 +0100 Subject: #161586# allowing for thesaurus vendor images --- .../schema/org/openoffice/Office/Linguistic.xcs | 25 +++ sfx2/source/menu/mnumgr.cxx | 38 ++++ sfx2/source/menu/thessubmenu.cxx | 105 ++++++++--- sfx2/source/menu/thessubmenu.hxx | 20 +- svx/source/dialog/thesdlg.cxx | 208 ++++++++++++++++++++- svx/source/dialog/thesdlg.hrc | 13 +- svx/source/dialog/thesdlg.src | 18 +- svx/source/dialog/thesdlg_impl.hxx | 6 + 8 files changed, 395 insertions(+), 38 deletions(-) mode change 100644 => 100755 sfx2/source/menu/mnumgr.cxx mode change 100644 => 100755 sfx2/source/menu/thessubmenu.cxx diff --git a/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs b/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs index 99bee988ab09..0ed6b4ad3d7c 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs @@ -124,6 +124,31 @@ + + + The path to the image for the thesaurus dialog. + + + + + + The path to the image for the thesaurus dialog in high contrast mode. + + + + + + The path to the image for the synonyms context menu. + + + + + + The path to the image for the synonyms context menu in high contrast mode. + + + + diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx old mode 100644 new mode 100755 index 3244bbabb934..7cb599f858c0 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -30,8 +30,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" + #include #include +#include #ifdef SOLARIS // HACK: prevent conflict between STLPORT and Workshop headers on Solaris 8 @@ -53,10 +55,15 @@ #include #include #include +#include #include #include #include #include +#include +#include +#include +#include #include @@ -177,6 +184,24 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen //-------------------------------------------------------------------- + +static Image lcl_GetImageFromPngUrl( const ::rtl::OUString &rFileUrl ) +{ + Image aRes; + + ::rtl::OUString aTmp; + osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); + + Graphic aGraphic; + const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) ); + if( GRFILTER_OK == lcl_LoadGraphic( aTmp, aFilterName, aGraphic ) ) + { + aRes = Image( aGraphic.GetBitmapEx() ); + } + return aRes; +} + + PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) { // @@ -209,15 +234,28 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) const size_t nNumSynonyms = aSynonyms.size(); if (nNumSynonyms > 0) { + SvtLinguConfig aCfg; + const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + + Image aImage; + String sThesImplName( aHelper.GetThesImplName( aLocale ) ); + ::rtl::OUString aSynonymsImageUrl( aCfg.GetSynonymsContextImage( sThesImplName, bHC ) ); + if (sThesImplName.Len() > 0 && aSynonymsImageUrl.getLength() > 0) + aImage = Image( lcl_GetImageFromPngUrl( aSynonymsImageUrl ) ); + for (USHORT i = 0; (size_t)i < nNumSynonyms; ++i) { //! item ids should start with values > 0, since 0 has special meaning const USHORT nId = i + 1; + String aItemText( GetThesaurusReplaceText_Impl( aSynonyms[i] ) ); pThesSubMenu->InsertItem( nId, aItemText ); ::rtl::OUString aCmd( ::rtl::OUString::createFromAscii( ".uno:ThesaurusFromContext?WordReplace:string=" ) ); aCmd += aItemText; pThesSubMenu->SetItemCommand( nId, aCmd ); + + if (aSynonymsImageUrl.getLength() > 0) + pThesSubMenu->SetItemImage( nId, aImage ); } } else // nNumSynonyms == 0 diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx old mode 100644 new mode 100755 index 192562817199..4a6d7cd26bc6 --- a/sfx2/source/menu/thessubmenu.cxx +++ b/sfx2/source/menu/thessubmenu.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -102,7 +103,8 @@ SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBi { rMenu.SetPopupMenu(nSlotId, pMenu); pMenu->SetSelectHdl(LINK(this, SfxThesSubMenuControl, MenuSelect)); - FillMenu(); + pMenu->Clear(); + rParent.EnableItem( GetId(), FALSE ); } @@ -112,28 +114,8 @@ SfxThesSubMenuControl::~SfxThesSubMenuControl() } -/* - Fuellt das Menu mit den aktuellen Verben aus der ViewShell. - */ -void SfxThesSubMenuControl::FillMenu() -{ - pMenu->Clear(); - pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); - SfxViewShell *pView = GetBindings().GetDispatcher()->GetFrame()->GetViewShell(); - if (pView) - { - pMenu->InsertItem( 1, String::CreateFromAscii("bla blub") ); - - } - - rParent.EnableItem( GetId(), (BOOL)pMenu->GetItemCount() ); -} - - /* Statusbenachrichtigung; - fuellt gfs. das Menu mit den aktuellen Verben aus der ViewShell. - der DocumentShell. Ist die Funktionalit"at disabled, wird der entsprechende Menueeintrag im Parentmenu disabled, andernfalls wird er enabled. */ @@ -143,8 +125,6 @@ void SfxThesSubMenuControl::StateChanged( const SfxPoolItem* /*pState*/ ) { rParent.EnableItem(GetId(), SFX_ITEM_AVAILABLE == eState ); - if ( SFX_ITEM_AVAILABLE == eState ) - FillMenu(); } @@ -199,9 +179,10 @@ SfxThesSubMenuHelper::SfxThesSubMenuHelper() try { uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); - m_xThesarus = uno::Reference< linguistic2::XThesaurus > ( xMSF->createInstance( + m_xLngMgr = uno::Reference< linguistic2::XLinguServiceManager >( xMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.linguistic2.Thesaurus" ) ) ), uno::UNO_QUERY_THROW ) ; + "com.sun.star.linguistic2.LinguServiceManager" ))), uno::UNO_QUERY_THROW ); + m_xThesarus = m_xLngMgr->getThesaurus(); } catch (uno::Exception &e) { @@ -269,6 +250,80 @@ bool SfxThesSubMenuHelper::GetMeanings( } +String SfxThesSubMenuHelper::GetThesImplName( const lang::Locale &rLocale ) const +{ + String aRes; + DBG_ASSERT( m_xLngMgr.is(), "LinguServiceManager missing" ); + if (m_xLngMgr.is()) + { + uno::Sequence< OUString > aServiceNames = m_xLngMgr->getConfiguredServices( + OUString::createFromAscii("com.sun.star.linguistic2.Thesaurus"), rLocale ); + // there should be at most one thesaurus configured for each language + DBG_ASSERT( aServiceNames.getLength() <= 1, "more than one thesaurus found. Should not be possible" ); + if (aServiceNames.getLength() == 1) + aRes = aServiceNames[0]; + } + return aRes; +} + //////////////////////////////////////////////////////////// +//!! temporary implement locally: +//!! once MBAs latest CWS is integrated this functions are available in svtools +//!! under a slightly different name + +#include + +#define IMPGRF_INIKEY_ASLINK "ImportGraphicAsLink" +#define IMPGRF_INIKEY_PREVIEW "ImportGraphicPreview" +#define IMPGRF_CONFIGNAME String(DEFINE_CONST_UNICODE("ImportGraphicDialog")) + +GraphicFilter* lcl_GetGrfFilter() +{ + return GraphicFilter::GetGraphicFilter(); +} + +// ----------------------------------------------------------------------- + +int lcl_LoadGraphic( const String &rPath, const String &rFilterName, + Graphic& rGraphic, GraphicFilter* pFilter, + USHORT* pDeterminedFormat ) +{ + if ( !pFilter ) + pFilter = ::lcl_GetGrfFilter(); + + const USHORT nFilter = rFilterName.Len() && pFilter->GetImportFormatCount() + ? pFilter->GetImportFormatNumber( rFilterName ) + : GRFILTER_FORMAT_DONTKNOW; + + SfxMedium* pMed = 0; + + // dann teste mal auf File-Protokoll: + SvStream* pStream = NULL; + INetURLObject aURL( rPath ); + + if ( aURL.HasError() || INET_PROT_NOT_VALID == aURL.GetProtocol() ) + { + aURL.SetSmartProtocol( INET_PROT_FILE ); + aURL.SetSmartURL( rPath ); + } + else if ( INET_PROT_FILE != aURL.GetProtocol() ) + { + // z.Z. nur auf die aktuelle DocShell + pMed = new SfxMedium( rPath, STREAM_READ, TRUE ); + pMed->DownLoad(); + pStream = pMed->GetInStream(); + } + int nRes = GRFILTER_OK; + + if ( !pStream ) + nRes = pFilter->ImportGraphic( rGraphic, aURL, nFilter, pDeterminedFormat ); + else + nRes = pFilter->ImportGraphic( rGraphic, rPath, *pStream, + nFilter, pDeterminedFormat ); + if ( pMed ) + delete pMed; + return nRes; +} + diff --git a/sfx2/source/menu/thessubmenu.hxx b/sfx2/source/menu/thessubmenu.hxx index 845594f4ba6a..60d877a13495 100755 --- a/sfx2/source/menu/thessubmenu.hxx +++ b/sfx2/source/menu/thessubmenu.hxx @@ -33,6 +33,7 @@ #define _THESSUBMENU_HXX_ #include +#include #include #include @@ -55,7 +56,6 @@ class SfxThesSubMenuControl : public SfxMenuControl Menu& rParent; private: - void FillMenu(); virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState ); DECL_LINK( MenuSelect, Menu * ); @@ -72,7 +72,8 @@ public: class SfxThesSubMenuHelper { - css::uno::Reference< css::linguistic2::XThesaurus > m_xThesarus; + css::uno::Reference< css::linguistic2::XLinguServiceManager > m_xLngMgr; + css::uno::Reference< css::linguistic2::XThesaurus > m_xThesarus; private: @@ -94,9 +95,24 @@ public: // get the first nMax Synonym entries, even if different meanings need to be evaluated bool GetMeanings( std::vector< ::rtl::OUString > & rSynonyms, const ::rtl::OUString & rWord, const css::lang::Locale & rLocale, sal_Int16 nMaxSynonms ); + + String GetThesImplName( const css::lang::Locale &rLocale ) const; }; //////////////////////////////////////////////////////////// + + +#include + +//!! temporary implemented locally: +//!! once MBAs latest CWS is integrated this functions are available in svtools +//!! under a slightly different name +GraphicFilter* lcl_GetGrfFilter(); +int lcl_LoadGraphic( const String& rPath, const String& rFilter, + Graphic& rGraphic, + GraphicFilter* pFilter = NULL, + USHORT* pDeterminedFormat = NULL ); + #endif diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index e4cf77453e9d..7b37f9a40a8e 100755 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -44,13 +44,17 @@ #include #include +#include #include #include #include #include #include +#include #include +#include +#include #include @@ -213,6 +217,7 @@ void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : m_pParent ( pParent ), + aVendorImageFI ( pParent , SVX_RES( IMG_VENDOR ) ), aLeftBtn ( pParent, SVX_RES( BTN_LEFT ) ), aWordText ( pParent, SVX_RES( FT_WORD ) ), aWordCB ( pParent, SVX_RES( CB_WORD ) ), @@ -227,6 +232,8 @@ SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : aOkBtn ( pParent, SVX_RES( BTN_THES_OK ) ), aCancelBtn ( pParent, SVX_RES( BTN_THES_CANCEL ) ), aErrStr ( SVX_RES( STR_ERR_WORDNOTFOUND ) ), + aVendorDefaultImage ( SVX_RES( IMG_DEFAULT_VENDOR ) ), + aVendorDefaultImageHC ( SVX_RES( IMG_DEFAULT_VENDOR_HC ) ), xThesaurus ( NULL ), aLookUpText (), nLookUpLanguage ( LANGUAGE_NONE ), @@ -242,6 +249,8 @@ SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : aLookUpBtn.SetClickHdl( LINK( this, SvxThesaurusDialog_Impl, LookUpHdl_Impl ) ); m_pAlternativesCT->SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl )); m_pAlternativesCT->SetDoubleClickHdl( LINK( this, SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl )); + + Application::PostUserEvent( STATIC_LINK( this, SvxThesaurusDialog_Impl, VendorImageInitHdl ) ); } @@ -354,7 +363,8 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) if (xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) nLookUpLanguage = nLang; SetWindowTitle( nLang ); - UpdateAlternativesBox_Impl(); + UpdateVendorImage(); + UpdateAlternativesBox_Impl(); } return 0; } @@ -453,6 +463,202 @@ IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox return 0; } +//////////////////////////////////////////////////////////// + +//!! temporary implement locally: +//!! once MBAs latest CWS is integrated this functions are available in svtools +//!! under a slightly different name + +#include +#include + +#define IMPGRF_INIKEY_ASLINK "ImportGraphicAsLink" +#define IMPGRF_INIKEY_PREVIEW "ImportGraphicPreview" +#define IMPGRF_CONFIGNAME String(DEFINE_CONST_UNICODE("ImportGraphicDialog")) + +GraphicFilter* lcl_GetGrfFilter() +{ + return GraphicFilter::GetGraphicFilter(); +} + +// ----------------------------------------------------------------------- + +int lcl_LoadGraphic( const String &rPath, const String &rFilterName, + Graphic& rGraphic, GraphicFilter* pFilter, + USHORT* pDeterminedFormat ) +{ + if ( !pFilter ) + pFilter = ::lcl_GetGrfFilter(); + + const USHORT nFilter = rFilterName.Len() && pFilter->GetImportFormatCount() + ? pFilter->GetImportFormatNumber( rFilterName ) + : GRFILTER_FORMAT_DONTKNOW; + + SfxMedium* pMed = 0; + + // dann teste mal auf File-Protokoll: + SvStream* pStream = NULL; + INetURLObject aURL( rPath ); + + if ( aURL.HasError() || INET_PROT_NOT_VALID == aURL.GetProtocol() ) + { + aURL.SetSmartProtocol( INET_PROT_FILE ); + aURL.SetSmartURL( rPath ); + } + else if ( INET_PROT_FILE != aURL.GetProtocol() ) + { + // z.Z. nur auf die aktuelle DocShell + pMed = new SfxMedium( rPath, STREAM_READ, TRUE ); + pMed->DownLoad(); + pStream = pMed->GetInStream(); + } + int nRes = GRFILTER_OK; + + if ( !pStream ) + nRes = pFilter->ImportGraphic( rGraphic, aURL, nFilter, pDeterminedFormat ); + else + nRes = pFilter->ImportGraphic( rGraphic, rPath, *pStream, + nFilter, pDeterminedFormat ); + if ( pMed ) + delete pMed; + return nRes; +} + +//////////////////////////////////////////////////////////// + +static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) +{ + Image aRes; + + OUString aTmp; + osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); + + Graphic aGraphic; + const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) ); + if( GRFILTER_OK == lcl_LoadGraphic( aTmp, aFilterName, aGraphic, NULL, NULL ) ) + { + aRes = Image( aGraphic.GetBitmapEx() ); + } + return aRes; +} + + +static String lcl_GetThesImplName( const lang::Locale &rLocale ) +{ + String aRes; + + uno::Reference< linguistic2::XLinguServiceManager > xLngMgr; + try + { + uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); + xLngMgr = uno::Reference< linguistic2::XLinguServiceManager >( xMSF->createInstance( + OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.linguistic2.LinguServiceManager" ))), uno::UNO_QUERY_THROW ); + + DBG_ASSERT( xLngMgr.is(), "LinguServiceManager missing" ); + if (xLngMgr.is()) + { + uno::Sequence< OUString > aServiceNames = xLngMgr->getConfiguredServices( + OUString::createFromAscii("com.sun.star.linguistic2.Thesaurus"), rLocale ); + // there should be at most one thesaurus configured for each language + DBG_ASSERT( aServiceNames.getLength() <= 1, "more than one thesaurus found. Should not be possible" ); + if (aServiceNames.getLength() == 1) + aRes = aServiceNames[0]; + } + } + catch (uno::Exception &e) + { + (void) e; + DBG_ASSERT( 0, "failed to get thesaurus" ); + } + + return aRes; +} + + +void SvxThesaurusDialog_Impl::UpdateVendorImage() +{ + m_pParent->SetUpdateMode( sal_False ); + + SvtLinguConfig aCfg; + if (aCfg.HasVendorImages( "ThesaurusDialogImage" )) + { + const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + + Image aImage; + String sThesImplName( lcl_GetThesImplName( SvxCreateLocale( nLookUpLanguage ) ) ); + OUString aThesDialogImageUrl( aCfg.GetThesaurusDialogImage( sThesImplName, bHC ) ); + if (sThesImplName.Len() > 0 && aThesDialogImageUrl.getLength() > 0) + aImage = Image( lcl_GetImageFromPngUrl( aThesDialogImageUrl ) ); + else + aImage = bHC ? aVendorDefaultImageHC : aVendorDefaultImage; + aVendorImageFI.SetImage( aImage ); + } + + m_pParent->SetUpdateMode( sal_True ); +} + + +IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl *, EMPTYARG ) +{ + pThis->m_pParent->SetUpdateMode( sal_False ); + + SvtLinguConfig aCfg; + if (aCfg.HasVendorImages( "ThesaurusDialogImage" )) + { + const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + Image aImage( bHC ? pThis->aVendorDefaultImageHC : pThis->aVendorDefaultImage ); + pThis->aVendorImageFI.SetImage( aImage ); + pThis->aVendorImageFI.Show(); + + // move down visible controls according to the vendor images height + Size aVendorSize = pThis->aVendorImageFI.GetSizePixel(); + Size aImageSize = pThis->aVendorImageFI.GetImage().GetSizePixel(); + if (aImageSize.Height()) + { + aVendorSize.Height() = aImageSize.Height(); + if(aVendorSize.Width() < aImageSize.Width()) + aVendorSize.Width() = aImageSize.Width(); + pThis->aVendorImageFI.SetSizePixel( aVendorSize ); + } + const sal_Int32 nDiff = aVendorSize.Height(); + pThis->aVendorImageFI.SetSizePixel( aVendorSize ); + Control* aControls[] = { + &pThis->aLeftBtn, + &pThis->aWordText, + &pThis->aWordCB, + &pThis->aLookUpBtn, + &pThis->m_aAlternativesText, + pThis->m_pAlternativesCT.get(), + &pThis->aReplaceText, + &pThis->aReplaceEdit, + &pThis->aFL, + &pThis->aHelpBtn, + &pThis->aLangMBtn, + &pThis->aOkBtn, + &pThis->aCancelBtn, + 0 + }; + sal_Int32 nControl = 0; + while (aControls[nControl]) + { + Point aPos = aControls[nControl]->GetPosPixel(); + aPos.Y() += nDiff; + aControls[nControl]->SetPosPixel(aPos); + ++nControl; + } + Size aDlgSize = pThis->m_pParent->GetSizePixel(); + aDlgSize.Height() += nDiff; + pThis->m_pParent->SetSizePixel( aDlgSize ); + pThis->m_pParent->Invalidate(); + } + + pThis->UpdateVendorImage(); + pThis->m_pParent->SetUpdateMode( sal_True ); + + return 0; +}; + // class SvxThesaurusDialog ---------------------------------------------- diff --git a/svx/source/dialog/thesdlg.hrc b/svx/source/dialog/thesdlg.hrc index aa7a7abf31a3..2d776ca92d4f 100755 --- a/svx/source/dialog/thesdlg.hrc +++ b/svx/source/dialog/thesdlg.hrc @@ -45,16 +45,11 @@ #define FL_VAR 23 #define FT_THES_ALTERNATIVES 24 #define CT_THES_ALTERNATIVES 25 +#define IMG_VENDOR 26 +#define IMG_DEFAULT_VENDOR 27 +#define IMG_DEFAULT_VENDOR_HC 28 -#define STR_ERR_WORDNOTFOUND 30 - -// LanguageDialog -------------------------------------------------------- - -#define LB_THES_LANGUAGE 10 -#define FL_THES_LANGUAGE 11 -#define BTN_LANG_OK 12 -#define BTN_LANG_CANCEL 12 -#define BTN_LANG_HELP 13 +#define STR_ERR_WORDNOTFOUND 101 #endif diff --git a/svx/source/dialog/thesdlg.src b/svx/source/dialog/thesdlg.src index 67b37a97e15e..501b54964946 100755 --- a/svx/source/dialog/thesdlg.src +++ b/svx/source/dialog/thesdlg.src @@ -41,8 +41,15 @@ ModalDialog RID_SVXDLG_THESAURUS OutputSize = TRUE ; Size = MAP_APPFONT ( 265, 230 ) ; Text [ en-US ] = "Thesaurus" ; - Moveable = TRUE ; SvLook = TRUE ; + Moveable = TRUE ; + + FixedImage IMG_VENDOR + { + Pos = MAP_APPFONT ( 0, 0 ) ; + Size = MAP_APPFONT ( 265, 0 ) ; // correct size will be applied at runtime + Hide = TRUE; + }; ImageButton BTN_LEFT { @@ -135,5 +142,14 @@ ModalDialog RID_SVXDLG_THESAURUS { Text [ en-US ] = "Word not found in thesaurus" ; }; + + Image IMG_DEFAULT_VENDOR + { + ImageBitmap = Bitmap { File = "vendor01.png"; }; + }; + Image IMG_DEFAULT_VENDOR_HC + { + ImageBitmap = Bitmap { File = "vendor01h.png"; }; + }; }; diff --git a/svx/source/dialog/thesdlg_impl.hxx b/svx/source/dialog/thesdlg_impl.hxx index e862f2199730..848d86fca54b 100755 --- a/svx/source/dialog/thesdlg_impl.hxx +++ b/svx/source/dialog/thesdlg_impl.hxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -136,6 +137,7 @@ struct SvxThesaurusDialog_Impl { Window* m_pParent; + FixedImage aVendorImageFI; ImageButton aLeftBtn; FixedText aWordText; LookUpComboBox aWordCB; @@ -151,6 +153,8 @@ struct SvxThesaurusDialog_Impl CancelButton aCancelBtn; String aErrStr; + Image aVendorDefaultImage; + Image aVendorDefaultImageHC; uno::Reference< linguistic2::XThesaurus > xThesaurus; OUString aLookUpText; @@ -169,6 +173,7 @@ struct SvxThesaurusDialog_Impl DECL_LINK( AlternativesDoubleClickHdl_Impl, SvxCheckListBox * ); DECL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox * ); + DECL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl * ); SvxThesaurusDialog_Impl( Window* pParent ); @@ -178,6 +183,7 @@ struct SvxThesaurusDialog_Impl queryMeanings_Impl( ::rtl::OUString& rTerm, const lang::Locale& rLocale, const beans::PropertyValues& rProperties ) throw(lang::IllegalArgumentException, uno::RuntimeException); bool UpdateAlternativesBox_Impl(); + void UpdateVendorImage(); void SetWindowTitle( LanguageType nLanguage ); }; -- cgit v1.2.3 From 0e3b2c2af5e872665e2c57a0176f4956a1b8f3db Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 5 Feb 2010 13:45:10 +0100 Subject: #161586# allowing for thesaurus vendor images --- unotools/inc/unotools/lingucfg.hxx | 4 ++- unotools/source/config/lingucfg.cxx | 71 +++++++++++++++++++++++++++++++------ 2 files changed, 64 insertions(+), 11 deletions(-) mode change 100644 => 100755 unotools/inc/unotools/lingucfg.hxx mode change 100644 => 100755 unotools/source/config/lingucfg.cxx diff --git a/unotools/inc/unotools/lingucfg.hxx b/unotools/inc/unotools/lingucfg.hxx old mode 100644 new mode 100755 index 49500db964c2..68d0acb43ff7 --- a/unotools/inc/unotools/lingucfg.hxx +++ b/unotools/inc/unotools/lingucfg.hxx @@ -233,8 +233,10 @@ public: ::rtl::OUString GetSpellAndGrammarDialogImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; ::rtl::OUString GetSpellAndGrammarContextSuggestionImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; ::rtl::OUString GetSpellAndGrammarContextDictionaryImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; + ::rtl::OUString GetThesaurusDialogImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; + ::rtl::OUString GetSynonymsContextImage( const ::rtl::OUString &rServiceImplName, bool bHighContrast = false ) const; - bool HasAnyVendorImages() const; + bool HasVendorImages( const char *pImageName ) const; bool HasGrammarChecker() const; }; diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx old mode 100644 new mode 100755 index d4eff83efec6..917862fdd5bf --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -1409,21 +1409,72 @@ rtl::OUString SvtLinguConfig::GetSpellAndGrammarContextDictionaryImage( } -bool SvtLinguConfig::HasAnyVendorImages() const +::rtl::OUString SvtLinguConfig::GetThesaurusDialogImage( + const ::rtl::OUString &rServiceImplName, + bool bHighContrast ) const { - bool bRes = false; - try + rtl::OUString aRes; + if (rServiceImplName.getLength() > 0) { - uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); - xNA.set( xNA->getByName( A2OU("Images") ), uno::UNO_QUERY_THROW ); - xNA.set( xNA->getByName( A2OU("VendorImages") ), uno::UNO_QUERY_THROW ); + rtl::OUString aImageName( A2OU( bHighContrast ? "ThesaurusDialogImage_HC" : "ThesaurusDialogImage" )); + rtl::OUString aPath( GetVendorImageUrl_Impl( rServiceImplName, aImageName ) ); + aRes = aPath; + } + return aRes; +} - uno::Sequence< rtl::OUString > aElementNames( xNA->getElementNames() ); - bRes = aElementNames.getLength() > 0; + +::rtl::OUString SvtLinguConfig::GetSynonymsContextImage( + const ::rtl::OUString &rServiceImplName, + bool bHighContrast ) const +{ + rtl::OUString aRes; + if (rServiceImplName.getLength() > 0) + { + rtl::OUString aImageName( A2OU( bHighContrast ? "SynonymsContextMenuImage_HC" : "SynonymsContextMenuImage" )); + rtl::OUString aPath( GetVendorImageUrl_Impl( rServiceImplName, aImageName ) ); + aRes = aPath; } - catch (uno::Exception &) + return aRes; +} + + +bool SvtLinguConfig::HasVendorImages( const char *pImageName ) const +{ + bool bRes = false; + if (pImageName) { - DBG_ASSERT( 0, "exception caught. HasAnyVendorImages failed" ); + try + { + uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); + xNA.set( xNA->getByName( A2OU("Images") ), uno::UNO_QUERY_THROW ); + xNA.set( xNA->getByName( A2OU("VendorImages") ), uno::UNO_QUERY_THROW ); + + uno::Sequence< rtl::OUString > aElementNames( xNA->getElementNames() ); + sal_Int32 nVendors = aElementNames.getLength(); + const rtl::OUString *pVendor = aElementNames.getConstArray(); + for (sal_Int32 i = 0; i < nVendors; ++i) + { + uno::Reference< container::XNameAccess > xNA2( xNA->getByName( pVendor[i] ), uno::UNO_QUERY_THROW ); + uno::Sequence< rtl::OUString > aPropNames( xNA2->getElementNames() ); + sal_Int32 nProps = aPropNames.getLength(); + const rtl::OUString *pPropNames = aPropNames.getConstArray(); + for (sal_Int32 k = 0; k < nProps; ++k) + { + // for a quicker check we ignore the HC image names here + const OUString &rName = pPropNames[k]; + if (rName.equalsAscii( pImageName )) + { + bRes = true; + break; + } + } + } + } + catch (uno::Exception &) + { + DBG_ASSERT( 0, "exception caught. HasVendorImages failed" ); + } } return bRes; } -- cgit v1.2.3 From 97ed06ff8bed722b12d8037a9f641664e06a3c13 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 5 Feb 2010 13:45:10 +0100 Subject: #161586# allowing for thesaurus vendor images --- cui/source/dialogs/SpellDialog.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 cui/source/dialogs/SpellDialog.cxx diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx old mode 100644 new mode 100755 index 0e69585a4ff4..48ecbf5205f7 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -476,7 +476,7 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG ) } else { - if( SvtLinguConfig().HasAnyVendorImages() ) + if( SvtLinguConfig().HasVendorImages( "SpellAndGrammarDialogImage" ) ) { pThis->aVendorImageFI.Show(); Size aVendorSize = pThis->aVendorImageFI.GetSizePixel(); -- cgit v1.2.3 From e474be5696a4c026ba6831b54f3a3abe532542e5 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 5 Feb 2010 14:55:32 +0100 Subject: #161586# minor fix for LookUp --- svx/source/dialog/thesdlg.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 svx/source/dialog/thesdlg.cxx diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx old mode 100644 new mode 100755 index a47bee57b79a..2c77545d2bae --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -340,7 +340,7 @@ void SvxThesaurusDialog_Impl::SetWindowTitle( LanguageType nLanguage ) IMPL_LINK( SvxThesaurusDialog_Impl, LeftBtnHdl_Impl, Button *, pBtn ) { - if (pBtn) + if (pBtn && aLookUpHistory.size() >= 2) { aLookUpHistory.pop(); // remove current look up word from stack aWordCB.SetText( aLookUpHistory.top() ); // retrieve previous look up word @@ -364,7 +364,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) nLookUpLanguage = nLang; SetWindowTitle( nLang ); UpdateVendorImage(); - UpdateAlternativesBox_Impl(); + LookUpHdl_Impl( NULL ); } return 0; } @@ -375,7 +375,8 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LookUpHdl_Impl, Button *, EMPTYARG /*pBtn*/ String aText( aWordCB.GetText() ); aLookUpText = OUString( aText ); - if (aLookUpText.getLength() > 0) + if (aLookUpText.getLength() > 0 && + (aLookUpHistory.size() == 0 || aLookUpText != aLookUpHistory.top())) aLookUpHistory.push( aLookUpText ); UpdateAlternativesBox_Impl(); -- cgit v1.2.3 From 89246e3b483b26859b105902f9042ca9fdefe374 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 11 Feb 2010 10:11:09 +0100 Subject: cws tl74: #i51258# thesaurus context menu --- sfx2/source/menu/mnumgr.cxx | 1 - sfx2/source/menu/thessubmenu.cxx | 3 +++ sfx2/source/menu/thessubmenu.hxx | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 7cb599f858c0..321bbf44c7b6 100755 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -63,7 +63,6 @@ #include #include #include -#include #include diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx index 4a6d7cd26bc6..2e1dec33c09e 100755 --- a/sfx2/source/menu/thessubmenu.cxx +++ b/sfx2/source/menu/thessubmenu.cxx @@ -39,6 +39,9 @@ #include #include #include +#include +#include + #include diff --git a/sfx2/source/menu/thessubmenu.hxx b/sfx2/source/menu/thessubmenu.hxx index 60d877a13495..0569161c5c7f 100755 --- a/sfx2/source/menu/thessubmenu.hxx +++ b/sfx2/source/menu/thessubmenu.hxx @@ -102,11 +102,13 @@ public: //////////////////////////////////////////////////////////// -#include +// taken from #include : //!! temporary implemented locally: //!! once MBAs latest CWS is integrated this functions are available in svtools //!! under a slightly different name +class GraphicFilter; +class Graphic; GraphicFilter* lcl_GetGrfFilter(); int lcl_LoadGraphic( const String& rPath, const String& rFilter, Graphic& rGraphic, -- cgit v1.2.3 From 8fa4cba15fb359d280dfc9711100f61b010df512 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 11 Feb 2010 17:28:24 -0500 Subject: koheiextref01: #i109168# Reworked the design of the external cache table. With this change, the cache table no longer stores empty cells at all, with no exceptions. Instead, it keeps track of cached ranges to determine whether a cell is empty or unretrieved. This change also helps simplify the logic of getting the value of an external cell. --- sc/inc/externalrefmgr.hxx | 48 ++++- sc/source/core/data/documen5.cxx | 3 + sc/source/core/data/document.cxx | 4 + sc/source/filter/excel/xilink.cxx | 1 + sc/source/filter/xml/xmltabi.cxx | 1 + sc/source/ui/docshell/externalrefmgr.cxx | 329 ++++++++++++++++++++++++------- 6 files changed, 301 insertions(+), 85 deletions(-) diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 90adedd6d346..1d555f08a45c 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -39,6 +39,7 @@ #include "vcl/timer.hxx" #include "svl/zforlist.hxx" #include "scmatrix.hxx" +#include "rangelst.hxx" #include #include @@ -129,6 +130,15 @@ public: class Table; friend class ScExternalRefCache::Table; + /** + * Represents a single cached table in an external document. It only + * stores non-empty cells; empty cells should never be stored in the data + * cache. Instead, cached ranges should be used to determine whether or + * not a cell is empty or needs fetching from the source document. If a + * cell's value is not stored but its address is within the cached ranges, + * that cell is already queried in the source document and we know it's + * empty. + */ class Table { public: @@ -143,7 +153,7 @@ public: Table(); ~Table(); - SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 nFmtIndex = 0); + SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 nFmtIndex = 0, bool bSetCacheRange = true); TokenRef getCell(SCCOL nCol, SCROW nRow, sal_uInt32* pnFmtIndex = NULL) const; bool hasRow( SCROW nRow ) const; /** Set/clear referenced status flag only if current status is not @@ -154,14 +164,35 @@ public: ReferencedFlag getReferencedFlag() const; bool isReferenced() const; /// Obtain a sorted vector of rows. - void getAllRows(::std::vector& rRows) const; + void getAllRows(::std::vector& rRows, SCROW nLow = 0, SCROW nHigh = MAXROW) const; /// Obtain a sorted vector of columns. - void getAllCols(SCROW nRow, ::std::vector& rCols) const; + void getAllCols(SCROW nRow, ::std::vector& rCols, SCCOL nLow = 0, SCCOL nHigh = MAXCOL) const; void getAllNumberFormats(::std::vector& rNumFmts) const; + const ScRangeList& getCachedRanges() const; + bool isRangeCached(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; + + void setCachedCell(SCCOL nCol, SCROW nRow); + void setCachedCellRange(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); + + /** + * Call this to mark the entire table "cached". This will prevent all + * future attempts to access the source document even when non-cached + * cells are queried. In such case, non-cached cells are treated as + * empty cells. Useful when loading a document with own external data + * cache. + */ + SC_DLLPUBLIC void setWholeTableCached(); + private: + bool isInCachedRanges(SCCOL nCol, SCROW nRow) const; + TokenRef getEmptyOrNullToken(SCCOL nCol, SCROW nRow) const; private: - RowsDataType maRows; - ReferencedFlag meReferenced; + /** Data cache */ + RowsDataType maRows; + /** Collection of individual cached ranges. The table ranges are + * not used & always zero. */ + ScRangeList maCachedRanges; + ReferencedFlag meReferenced; }; typedef ::boost::shared_ptr TableTypeRef; @@ -184,8 +215,7 @@ public: * @return pointer to the token instance in the cache. */ ScExternalRefCache::TokenRef getCellData( - sal_uInt16 nFileId, const String& rTabName, SCCOL nCol, SCROW nRow, - bool bEmptyCellOnNull, bool bWriteEmpty, sal_uInt32* pnFmtIndex); + sal_uInt16 nFileId, const String& rTabName, SCCOL nCol, SCROW nRow, sal_uInt32* pnFmtIndex); /** * Get a cached cell range data. @@ -195,12 +225,12 @@ public: * guaranteed if the TokenArrayRef is properly used.. */ ScExternalRefCache::TokenArrayRef getCellRangeData( - sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange, bool bEmptyCellOnNull, bool bWriteEmpty); + sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange); ScExternalRefCache::TokenArrayRef getRangeNameTokens(sal_uInt16 nFileId, const String& rName); void setRangeNameTokens(sal_uInt16 nFileId, const String& rName, TokenArrayRef pArray); - void setCellData(sal_uInt16 nFileId, const String& rTabName, SCROW nRow, SCCOL nCol, TokenRef pToken, sal_uInt32 nFmtIndex); + void setCellData(sal_uInt16 nFileId, const String& rTabName, SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 nFmtIndex); struct SingleRangeData { diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index 0be1e6717891..b8144dccc061 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -930,6 +930,9 @@ void ScDocument::UpdateChartListenerCollection() SdrPage* pPage = pDrawLayer->GetPage(static_cast(nTab)); DBG_ASSERT(pPage,"Page ?"); + if (!pPage) + continue; + SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS ); SdrObject* pObject = aIter.Next(); while (pObject) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index f8fa2bc46c9b..3f6b50df29e6 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -663,6 +663,10 @@ bool ScDocument::ShrinkToDataArea(SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow if (nRow2 < rEndRow) rEndRow = nRow2; + if (rStartCol > rEndCol || rStartRow > rEndRow) + // invalid range. + return false; + return true; // success! } diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx index 00268215a5dc..b76baf60377f 100644 --- a/sc/source/filter/excel/xilink.cxx +++ b/sc/source/filter/excel/xilink.cxx @@ -570,6 +570,7 @@ void XclImpSupbook::LoadCachedValues() const String& rTabName = pTab->GetTabName(); ScExternalRefCache::TableTypeRef pCacheTable = pRefMgr->getCacheTable(nFileId, rTabName, true); pTab->LoadCachedValues(pCacheTable); + pCacheTable->setWholeTableCached(); } } diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index 8ea9701ecd32..f7d4d54d2735 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -209,6 +209,7 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport, ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); pExternalRefInfo->mnFileId = pRefMgr->getExternalFileId(aExtUrl); pExternalRefInfo->mpCacheTable = pRefMgr->getCacheTable(pExternalRefInfo->mnFileId, aExtTabName, true); + pExternalRefInfo->mpCacheTable->setWholeTableCached(); } } else diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index e18ef20d96b9..4cac1ea0c435 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -68,6 +68,8 @@ #include #include +#include + using ::std::auto_ptr; using ::com::sun::star::uno::Any; using ::rtl::OUString; @@ -173,7 +175,7 @@ bool ScExternalRefCache::Table::isReferenced() const return meReferenced != UNREFERENCED; } -void ScExternalRefCache::Table::setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 nFmtIndex) +void ScExternalRefCache::Table::setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 nFmtIndex, bool bSetCacheRange) { using ::std::pair; RowsDataType::iterator itrRow = maRows.find(nRow); @@ -196,6 +198,8 @@ void ScExternalRefCache::Table::setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, aCell.mxToken = pToken; aCell.mnFmtIndex = nFmtIndex; rRow.insert(RowDataType::value_type(nCol, aCell)); + if (bSetCacheRange) + setCachedCell(nCol, nRow); } ScExternalRefCache::TokenRef ScExternalRefCache::Table::getCell(SCCOL nCol, SCROW nRow, sal_uInt32* pnFmtIndex) const @@ -204,7 +208,7 @@ ScExternalRefCache::TokenRef ScExternalRefCache::Table::getCell(SCCOL nCol, SCRO if (itrTable == maRows.end()) { // this table doesn't have the specified row. - return TokenRef(); + return getEmptyOrNullToken(nCol, nRow); } const RowDataType& rRowData = itrTable->second; @@ -212,7 +216,7 @@ ScExternalRefCache::TokenRef ScExternalRefCache::Table::getCell(SCCOL nCol, SCRO if (itrRow == rRowData.end()) { // this row doesn't have the specified column. - return TokenRef(); + return getEmptyOrNullToken(nCol, nRow); } const Cell& rCell = itrRow->second; @@ -228,20 +232,21 @@ bool ScExternalRefCache::Table::hasRow( SCROW nRow ) const return itrRow != maRows.end(); } -void ScExternalRefCache::Table::getAllRows(vector& rRows) const +void ScExternalRefCache::Table::getAllRows(vector& rRows, SCROW nLow, SCROW nHigh) const { vector aRows; aRows.reserve(maRows.size()); RowsDataType::const_iterator itr = maRows.begin(), itrEnd = maRows.end(); for (; itr != itrEnd; ++itr) - aRows.push_back(itr->first); + if (nLow <= itr->first && itr->first <= nHigh) + aRows.push_back(itr->first); // hash map is not ordered, so we need to explicitly sort it. ::std::sort(aRows.begin(), aRows.end()); rRows.swap(aRows); } -void ScExternalRefCache::Table::getAllCols(SCROW nRow, vector& rCols) const +void ScExternalRefCache::Table::getAllCols(SCROW nRow, vector& rCols, SCCOL nLow, SCCOL nHigh) const { RowsDataType::const_iterator itrRow = maRows.find(nRow); if (itrRow == maRows.end()) @@ -253,7 +258,8 @@ void ScExternalRefCache::Table::getAllCols(SCROW nRow, vector& rCols) con aCols.reserve(rRowData.size()); RowDataType::const_iterator itrCol = rRowData.begin(), itrColEnd = rRowData.end(); for (; itrCol != itrColEnd; ++itrCol) - aCols.push_back(itrCol->first); + if (nLow <= itrCol->first && itrCol->first <= nHigh) + aCols.push_back(itrCol->first); // hash map is not ordered, so we need to explicitly sort it. ::std::sort(aCols.begin(), aCols.end()); @@ -275,6 +281,54 @@ void ScExternalRefCache::Table::getAllNumberFormats(vector& rNumFmts } } +const ScRangeList& ScExternalRefCache::Table::getCachedRanges() const +{ + return maCachedRanges; +} + +bool ScExternalRefCache::Table::isRangeCached(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const +{ + return maCachedRanges.In(ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0)); +} + +void ScExternalRefCache::Table::setCachedCell(SCCOL nCol, SCROW nRow) +{ + setCachedCellRange(nCol, nRow, nCol, nRow); +} + +void ScExternalRefCache::Table::setCachedCellRange(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) +{ + ScRange aRange(nCol1, nRow1, 0, nCol2, nRow2, 0); + if (!maCachedRanges.Count()) + maCachedRanges.Append(aRange); + else + maCachedRanges.Join(aRange); + + String aStr; + maCachedRanges.Format(aStr, SCA_VALID); +} + +void ScExternalRefCache::Table::setWholeTableCached() +{ + setCachedCellRange(0, 0, MAXCOL, MAXROW); +} + +bool ScExternalRefCache::Table::isInCachedRanges(SCCOL nCol, SCROW nRow) const +{ + return maCachedRanges.In(ScRange(nCol, nRow, 0, nCol, nRow, 0)); +} + +ScExternalRefCache::TokenRef ScExternalRefCache::Table::getEmptyOrNullToken( + SCCOL nCol, SCROW nRow) const +{ + if (isInCachedRanges(nCol, nRow)) + { + TokenRef p(new ScEmptyCellToken(false, false)); + return p; + } + return TokenRef(); +} + // ---------------------------------------------------------------------------- ScExternalRefCache::TableName::TableName(const String& rUpper, const String& rReal) : @@ -339,8 +393,7 @@ const String* ScExternalRefCache::getRealRangeName(sal_uInt16 nFileId, const Str } ScExternalRefCache::TokenRef ScExternalRefCache::getCellData( - sal_uInt16 nFileId, const String& rTabName, SCCOL nCol, SCROW nRow, - bool bEmptyCellOnNull, bool bWriteEmpty, sal_uInt32* pnFmtIndex) + sal_uInt16 nFileId, const String& rTabName, SCCOL nCol, SCROW nRow, sal_uInt32* pnFmtIndex) { DocDataType::const_iterator itrDoc = maDocs.find(nFileId); if (itrDoc == maDocs.end()) @@ -365,18 +418,11 @@ ScExternalRefCache::TokenRef ScExternalRefCache::getCellData( return TokenRef(); } - TokenRef pToken = pTableData->getCell(nCol, nRow, pnFmtIndex); - if (!pToken && bEmptyCellOnNull) - { - pToken.reset(new ScEmptyCellToken(false, false)); - if (bWriteEmpty) - pTableData->setCell(nCol, nRow, pToken); - } - return pToken; + return pTableData->getCell(nCol, nRow, pnFmtIndex); } ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData( - sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange, bool bEmptyCellOnNull, bool bWriteEmpty) + sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange) { DocDataType::iterator itrDoc = maDocs.find(nFileId); if (itrDoc == maDocs.end()) @@ -406,13 +452,14 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData( return TokenArrayRef(); ScRange aCacheRange( nCol1, nRow1, static_cast(nTabFirstId), nCol2, nRow2, static_cast(nTabLastId)); + RangeArrayMap::const_iterator itrRange = rDoc.maRangeArrays.find( aCacheRange); if (itrRange != rDoc.maRangeArrays.end()) - { + // Cache hit! return itrRange->second; - } - TokenArrayRef pArray(new ScTokenArray); + ::boost::scoped_ptr pNewRange; + TokenArrayRef pArray; bool bFirstTab = true; for (size_t nTab = nTabFirstId; nTab <= nTabLastId; ++nTab) { @@ -420,27 +467,63 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData( if (!pTab.get()) return TokenArrayRef(); + SCCOL nDataCol1 = nCol1, nDataCol2 = nCol2; + SCROW nDataRow1 = nRow1, nDataRow2 = nRow2; + + if (!pTab->isRangeCached(nDataCol1, nDataRow1, nDataCol2, nDataRow2)) + { + // specified range is not entirely within cached ranges. + return TokenArrayRef(); + } + ScMatrixRef xMat = new ScMatrix( - static_cast(nCol2-nCol1+1), static_cast(nRow2-nRow1+1)); + static_cast(nDataCol2-nDataCol1+1), static_cast(nDataRow2-nDataRow1+1)); - for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow) +#if 0 + // TODO: Switch to this code block once we have support for sparsely-filled + // matrices in ScMatrix. + + // Only fill non-empty cells, for better performance. + vector aRows; + pTab->getAllRows(aRows, nDataRow1, nDataRow2); + for (vector::const_iterator itr = aRows.begin(), itrEnd = aRows.end(); itr != itrEnd; ++itr) { - for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol) + SCROW nRow = *itr; + vector aCols; + pTab->getAllCols(nRow, aCols, nDataCol1, nDataCol2); + for (vector::const_iterator itrCol = aCols.begin(), itrColEnd = aCols.end(); itrCol != itrColEnd; ++itrCol) { + SCCOL nCol = *itrCol; TokenRef pToken = pTab->getCell(nCol, nRow); if (!pToken) + // This should never happen! + return TokenArrayRef(); + + SCSIZE nC = nCol - nDataCol1, nR = nRow - nDataRow1; + switch (pToken->GetType()) { - if (bEmptyCellOnNull) - { - pToken.reset(new ScEmptyCellToken(false, false)); - if (bWriteEmpty) - pTab->setCell(nCol, nRow, pToken); - } - else - return TokenArrayRef(); + case svDouble: + xMat->PutDouble(pToken->GetDouble(), nC, nR); + break; + case svString: + xMat->PutString(pToken->GetString(), nC, nR); + break; + default: + ; } - + } + } +#else + // Empty all matrix elements first, and fill only non-empty elements. + for (SCROW nRow = nDataRow1; nRow <= nDataRow2; ++nRow) + { + for (SCCOL nCol = nDataCol1; nCol <= nDataCol2; ++nCol) + { + TokenRef pToken = pTab->getCell(nCol, nRow); SCSIZE nC = nCol - nCol1, nR = nRow - nRow1; + if (!pToken) + return TokenArrayRef(); + switch (pToken->GetType()) { case svDouble: @@ -454,17 +537,27 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData( } } } +#endif if (!bFirstTab) pArray->AddOpCode(ocSep); ScMatrix* pMat2 = xMat; ScMatrixToken aToken(pMat2); + if (!pArray) + pArray.reset(new ScTokenArray); pArray->AddToken(aToken); bFirstTab = false; + + if (!pNewRange) + pNewRange.reset(new ScRange(nDataCol1, nDataRow1, 0, nDataCol2, nDataRow2, 0)); + else + pNewRange->ExtendTo(ScRange(nDataCol1, nDataRow1, 0, nDataCol2, nDataRow2, 0)); } - rDoc.maRangeArrays.insert( RangeArrayMap::value_type( aCacheRange, pArray)); + + if (pNewRange) + rDoc.maRangeArrays.insert( RangeArrayMap::value_type(*pNewRange, pArray)); return pArray; } @@ -495,7 +588,7 @@ void ScExternalRefCache::setRangeNameTokens(sal_uInt16 nFileId, const String& rN pDoc->maRealRangeNameMap.insert(NamePairMap::value_type(aUpperName, rName)); } -void ScExternalRefCache::setCellData(sal_uInt16 nFileId, const String& rTabName, SCROW nRow, SCCOL nCol, +void ScExternalRefCache::setCellData(sal_uInt16 nFileId, const String& rTabName, SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 nFmtIndex) { if (!isDocInitialized(nFileId)) @@ -520,6 +613,7 @@ void ScExternalRefCache::setCellData(sal_uInt16 nFileId, const String& rTabName, pTableData.reset(new Table); pTableData->setCell(nCol, nRow, pToken, nFmtIndex); + pTableData->setCachedCell(nCol, nRow); } void ScExternalRefCache::setCellRangeData(sal_uInt16 nFileId, const ScRange& rRange, const vector& rData, @@ -565,20 +659,27 @@ void ScExternalRefCache::setCellRangeData(sal_uInt16 nFileId, const ScRange& rRa SCSIZE nC = nCol - nCol1, nR = nRow - nRow1; TokenRef pToken; const ScMatrixRef& pMat = itrData->mpRangeData; + if (pMat->IsEmpty(nC, nR)) + // Don't cache empty cells. + continue; + if (pMat->IsValue(nC, nR)) pToken.reset(new formula::FormulaDoubleToken(pMat->GetDouble(nC, nR))); else if (pMat->IsString(nC, nR)) pToken.reset(new formula::FormulaStringToken(pMat->GetString(nC, nR))); - else - pToken.reset(new ScEmptyCellToken(false, false)); - pTabData->setCell(nCol, nRow, pToken); + if (pToken) + // Don't mark this cell 'cached' here, for better performance. + pTabData->setCell(nCol, nRow, pToken, 0, false); } } + // Mark the whole range 'cached'. + pTabData->setCachedCellRange(nCol1, nRow1, nCol2, nRow2); } size_t nTabLastId = nTabFirstId + rRange.aEnd.Tab() - rRange.aStart.Tab(); ScRange aCacheRange( nCol1, nRow1, static_cast(nTabFirstId), nCol2, nRow2, static_cast(nTabLastId)); + rDoc.maRangeArrays.insert( RangeArrayMap::value_type( aCacheRange, pArray)); } @@ -975,6 +1076,9 @@ ScExternalRefCache::TableTypeRef ScExternalRefCache::getCacheTable(sal_uInt16 nF { // specified table found. if( pnIndex ) *pnIndex = nIndex; + if (bCreateNew && !rDoc.maTables[nIndex]) + rDoc.maTables[nIndex].reset(new Table); + return rDoc.maTables[nIndex]; } @@ -1139,11 +1243,11 @@ static FormulaToken* lcl_convertToToken(ScBaseCell* pCell) return NULL; } -static ScTokenArray* lcl_convertToTokenArray(ScDocument* pSrcDoc, const ScRange& rRange, +static ScTokenArray* lcl_convertToTokenArray(ScDocument* pSrcDoc, ScRange& rRange, vector& rCacheData) { - const ScAddress& s = rRange.aStart; - const ScAddress& e = rRange.aEnd; + ScAddress& s = rRange.aStart; + ScAddress& e = rRange.aEnd; SCTAB nTab1 = s.Tab(), nTab2 = e.Tab(); SCCOL nCol1 = s.Col(), nCol2 = e.Col(); @@ -1157,19 +1261,35 @@ static ScTokenArray* lcl_convertToTokenArray(ScDocument* pSrcDoc, const ScRange& // range to it. return NULL; + ::boost::scoped_ptr pUsedRange; + auto_ptr pArray(new ScTokenArray); bool bFirstTab = true; vector::iterator itrCache = rCacheData.begin(), itrCacheEnd = rCacheData.end(); + for (SCTAB nTab = nTab1; nTab <= nTab2 && itrCache != itrCacheEnd; ++nTab, ++itrCache) { + // Only loop within the data area. + SCCOL nDataCol1 = nCol1, nDataCol2 = nCol2; + SCROW nDataRow1 = nRow1, nDataRow2 = nRow2; + if (!pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2)) + // no data within specified range. + continue; + + if (pUsedRange.get()) + // Make sure the used area only grows, not shrinks. + pUsedRange->ExtendTo(ScRange(nDataCol1, nDataRow1, 0, nDataCol2, nDataRow2, 0)); + else + pUsedRange.reset(new ScRange(nDataCol1, nDataRow1, 0, nDataCol2, nDataRow2, 0)); + ScMatrixRef xMat = new ScMatrix( - static_cast(nCol2-nCol1+1), - static_cast(nRow2-nRow1+1)); + static_cast(nDataCol2-nDataCol1+1), + static_cast(nDataRow2-nDataRow1+1)); - for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol) + for (SCCOL nCol = nDataCol1; nCol <= nDataCol2; ++nCol) { - for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow) + for (SCROW nRow = nDataRow1; nRow <= nDataRow2; ++nRow) { SCSIZE nC = nCol - nCol1, nR = nRow - nRow1; ScBaseCell* pCell; @@ -1236,6 +1356,31 @@ static ScTokenArray* lcl_convertToTokenArray(ScDocument* pSrcDoc, const ScRange& bFirstTab = false; } + + if (!pUsedRange.get()) + return NULL; + + s.SetCol(pUsedRange->aStart.Col()); + s.SetRow(pUsedRange->aStart.Row()); + e.SetCol(pUsedRange->aEnd.Col()); + e.SetRow(pUsedRange->aEnd.Row()); + + return pArray.release(); +} + +static ScTokenArray* lcl_fillEmptyMatrix(const ScRange& rRange) +{ + SCSIZE nC = static_cast(rRange.aEnd.Col()-rRange.aStart.Col()+1); + SCSIZE nR = static_cast(rRange.aEnd.Row()-rRange.aStart.Row()+1); + ScMatrixRef xMat = new ScMatrix(nC, nR); + for (SCSIZE i = 0; i < nC; ++i) + for (SCSIZE j = 0; j < nR; ++j) + xMat->PutEmpty(i, j); + + ScMatrix* pMat2 = xMat; + ScMatrixToken aToken(pMat2); + auto_ptr pArray(new ScTokenArray); + pArray->AddToken(aToken); return pArray.release(); } @@ -1595,20 +1740,13 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefToken( if (pFmt) pFmt->mbIsSet = false; - bool bLoading = mpDoc->IsImportingXML(); - // Check if the given table name and the cell position is cached. - // #i101304# When loading a file, the saved cache (hidden sheet) - // is assumed to contain all data for the loaded formulas. - // No cache entries are created from empty cells in the saved sheet, - // so they have to be created here (bWriteEmpty parameter). - // Otherwise, later interpretation of the loaded formulas would - // load the source document even if the user didn't want to update. sal_uInt32 nFmtIndex = 0; ScExternalRefCache::TokenRef pToken = maRefCache.getCellData( - nFileId, rTabName, rCell.Col(), rCell.Row(), bLoading, bLoading, &nFmtIndex); + nFileId, rTabName, rCell.Col(), rCell.Row(), &nFmtIndex); if (pToken) { + // Cache hit ! if (pFmt) { short nFmtType = mpDoc->GetFormatTable()->GetType(nFmtIndex); @@ -1626,11 +1764,8 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefToken( ScDocument* pSrcDoc = getSrcDocument(nFileId); if (!pSrcDoc) { - // Source document is not reachable. Try to get data from the cache - // once again, but this time treat a non-cached cell as an empty cell - // as long as the table itself is cached. - pToken = maRefCache.getCellData( - nFileId, rTabName, rCell.Col(), rCell.Row(), true, false, &nFmtIndex); + // Source document not reachable. Throw a reference error. + pToken.reset(new FormulaErrorToken(errNoRef)); return pToken; } @@ -1639,12 +1774,30 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefToken( if (!pSrcDoc->GetTable(rTabName, nTab)) { // specified table name doesn't exist in the source document. - return ScExternalRefCache::TokenRef(); + pToken.reset(new FormulaErrorToken(errNoRef)); + return pToken; } if (pTab) *pTab = nTab; + SCCOL nDataCol1 = 0, nDataCol2 = MAXCOL; + SCROW nDataRow1 = 0, nDataRow2 = MAXROW; + pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2); + if (rCell.Col() < nDataCol1 || nDataCol2 < rCell.Col() || rCell.Row() < nDataRow1 || nDataRow2 < rCell.Row()) + { + // requested cell is outside the data area. Don't even bother caching + // this data, but add it to the cached range to prevent accessing the + // source document time and time again. + ScExternalRefCache::TableTypeRef pCacheTab = + maRefCache.getCacheTable(nFileId, rTabName, true, NULL); + if (pCacheTab) + pCacheTab->setCachedCell(rCell.Col(), rCell.Row()); + + pToken.reset(new ScEmptyCellToken(false, false)); + return pToken; + } + pSrcDoc->GetCell(rCell.Col(), rCell.Row(), nTab, pCell); ScExternalRefCache::TokenRef pTok(lcl_convertToToken(pCell)); @@ -1667,39 +1820,45 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefToken( pTok.reset( new FormulaErrorToken( errNoValue)); } - // Now, insert the token into cache table. - maRefCache.setCellData(nFileId, rTabName, rCell.Row(), rCell.Col(), pTok, nFmtIndex); + // Now, insert the token into cache table but don't cache empty cells. + if (pTok->GetType() != formula::svEmptyCell) + maRefCache.setCellData(nFileId, rTabName, rCell.Col(), rCell.Row(), pTok, nFmtIndex); + return pTok; } -ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokens(sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange, const ScAddress* pCurPos) +ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokens( + sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange, const ScAddress* pCurPos) { if (pCurPos) insertRefCell(nFileId, *pCurPos); maybeLinkExternalFile(nFileId); - bool bLoading = mpDoc->IsImportingXML(); - // Check if the given table name and the cell position is cached. - // #i101304# When loading, put empty cells into cache, see getSingleRefToken. - ScExternalRefCache::TokenArrayRef p = maRefCache.getCellRangeData(nFileId, rTabName, rRange, bLoading, bLoading); - if (p.get()) - return p; + ScExternalRefCache::TokenArrayRef pArray = + maRefCache.getCellRangeData(nFileId, rTabName, rRange); + if (pArray) + // Cache hit ! + return pArray; ScDocument* pSrcDoc = getSrcDocument(nFileId); if (!pSrcDoc) { - // Source document is not reachable. Try to get data from the cache - // once again, but this time treat non-cached cells as empty cells as - // long as the table itself is cached. - return maRefCache.getCellRangeData(nFileId, rTabName, rRange, true, false); + // Source document is not reachable. Throw a reference error. + pArray.reset(new ScTokenArray); + pArray->AddToken(FormulaErrorToken(errNoRef)); + return pArray; } SCTAB nTab1; if (!pSrcDoc->GetTable(rTabName, nTab1)) + { // specified table name doesn't exist in the source document. - return ScExternalRefCache::TokenArrayRef(); + pArray.reset(new ScTokenArray); + pArray->AddToken(FormulaErrorToken(errNoRef)); + return pArray; + } ScRange aRange(rRange); SCTAB nTabSpan = aRange.aEnd.Tab() - aRange.aStart.Tab(); @@ -1723,12 +1882,24 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokens(sal_u aRange.aStart.SetTab(nTab1); aRange.aEnd.SetTab(nTab1 + nTabSpan); - ScExternalRefCache::TokenArrayRef pArray; pArray.reset(lcl_convertToTokenArray(pSrcDoc, aRange, aCacheData)); if (pArray) // Cache these values. - maRefCache.setCellRangeData(nFileId, rRange, aCacheData, pArray); + maRefCache.setCellRangeData(nFileId, aRange, aCacheData, pArray); + else + { + // Array is empty. Fill it with an empty matrix of the required size. + pArray.reset(lcl_fillEmptyMatrix(rRange)); + + // Make sure to set this range 'cached', to prevent unnecessarily + // accessing the src document time and time again. + ScExternalRefCache::TableTypeRef pCacheTab = + maRefCache.getCacheTable(nFileId, rTabName, true, NULL); + if (pCacheTab) + pCacheTab->setCachedCellRange( + rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row()); + } return pArray; } @@ -1855,6 +2026,12 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId) if (itr != itrEnd) { + // document already loaded. + + // TODO: Find out a way to access a document that's already open in + // memory and re-use that instance, instead of loading it from the + // disk again. + SfxObjectShell* p = itr->second.maShell; itr->second.maLastAccess = Time(); return static_cast(p)->GetDocument(); -- cgit v1.2.3 From 0fe44ab08684b630e0a62dfbf873a19c368df33f Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 11 Feb 2010 17:31:47 -0500 Subject: koheiextref01: patched dmake it get it to work on SLED 11. --- dmake/getinp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dmake/getinp.c b/dmake/getinp.c index 5445193d1a90..1ac312a53b59 100644 --- a/dmake/getinp.c +++ b/dmake/getinp.c @@ -88,17 +88,23 @@ FILE *fil; /* Reading the internal rule table. Set rule_ind to zero after the * last entry so that ReadEnvironment() works as expected every time. */ - while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) ) + while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) ) { /* The last test in this if *p != '~', handles the environment * passing conventions used by MKS to pass arguments. We want to * skip those environment entries. Also CYGWIN likes to export '!' - * prefixed environment variables that cause severe pain, axe them too */ - if( !Readenv || (Readenv && (strchr(p,'=') != NIL(char)) && *p!='~' && *p!='!')){ + * prefixed environment variables that cause severe pain, axe them too. + * And finally it is possible to do "env 'GGG HHH'='some value' bash" + * which causes that there are env variables with spaces in the name + * defined which causes dmake to malfunction too */ + char *equal = strchr(p,'='); + char *space = strchr(p,' '); + if( !Readenv || (Readenv && (equal != NIL(char)) && (space == NIL(char) || space > equal) && *p!='~' && *p!='!')){ strcpy( buf, p ); DB_PRINT( "io", ("Returning [%s]", buf) ); DB_RETURN( FALSE ); } + } rule_ind = 0; -- cgit v1.2.3 From 594ffd1d561d75217d1bfcb1cb9aeca5cf31c676 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 12 Feb 2010 12:45:29 +0100 Subject: cws tl74: switching from DBG_ASSERT to OSL_ENSURE (don't use 'tools') --- i18npool/source/transliteration/transliteration_body.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index d041a1d8f915..07ca4a781a25 100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include "characterclassificationImpl.hxx" @@ -99,7 +99,7 @@ static sal_uInt8 lcl_getMappingTypeForToggleCase( sal_uInt8 nMappingType, sal_Un nRes = MappingTypeLowerToUpper; else { - DBG_ASSERT( nType & 0x01 /* upper case */, "uppercase character expected! 'Toggle case' failed?" ); + OSL_ENSURE( nType & 0x01 /* upper case */, "uppercase character expected! 'Toggle case' failed?" ); nRes = MappingTypeUpperToLower; } } -- cgit v1.2.3 From 64f1d786dd49626cec33d231292ce4ecb28b9c1f Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 12 Feb 2010 15:52:52 +0100 Subject: cws tl74: merge --- i18npool/source/transliteration/transliteration_body.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 i18npool/source/transliteration/transliteration_body.cxx diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx old mode 100644 new mode 100755 index d041a1d8f915..807a09b65e39 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include "characterclassificationImpl.hxx" @@ -99,7 +99,7 @@ static sal_uInt8 lcl_getMappingTypeForToggleCase( sal_uInt8 nMappingType, sal_Un nRes = MappingTypeLowerToUpper; else { - DBG_ASSERT( nType & 0x01 /* upper case */, "uppercase character expected! 'Toggle case' failed?" ); + OSL_ENSURE( nType & 0x01 /* upper case */, "uppercase character expected! 'Toggle case' failed?" ); nRes = MappingTypeUpperToLower; } } -- cgit v1.2.3 From e54a20bf1a45c1c0d2abfe2a7a19bbf2c0bd6bee Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 16 Feb 2010 10:47:11 +0100 Subject: cws tl74: merge problem fixed --- starmath/source/unomodel.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 starmath/source/unomodel.cxx diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx old mode 100644 new mode 100755 index 62f8282069fe..08be8010b632 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -88,7 +88,7 @@ SmPrintUIOptions::SmPrintUIOptions() if( aLocalizedStrings.Count() < 18 ) // bad resource ? return; - SmModule *pp = SM_MOD1(); + SmModule *pp = SM_MOD(); SmConfig *pConfig = pp->GetConfig(); DBG_ASSERT( pConfig, "SmConfig not found" ); if (!pConfig) -- cgit v1.2.3 From 9869559159a38726912bed85f28e076c2848156b Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 17 Feb 2010 11:06:26 +0100 Subject: hb33patches1: #i109325# applied patch --- sw/source/filter/ww8/ww8scan.cxx | 7 ++----- sw/source/filter/ww8/ww8scan.hxx | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 55834f5c0816..bde7bc39f3c4 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -2124,7 +2124,7 @@ xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr, // Bei nStartPos < 0 wird das erste Element des PLCFs genommen WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF, - long nStruct, long nStartPos, bool bNoEnd) + long nStruct, long nStartPos) : nIdx(0), nStru(nStruct) { nIMax = ( nPLCF - 4 ) / ( 4 + nStruct ); @@ -2140,8 +2140,6 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF, pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] ); nIdx = 0; #endif // OSL_BIGENDIAN - if( bNoEnd ) - nIMax++; if( nStruct ) // Pointer auf Inhalts-Array pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1]; else @@ -4007,8 +4005,7 @@ WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTblSt, const WW8Fib& rFib) { pBook[0] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkf,rFib.lcbPlcfbkf,4); - pBook[1] = new WW8PLCFspecial( pTblSt, rFib.fcPlcfbkl, rFib.lcbPlcfbkl, - 0, -1, true); + pBook[1] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkl,rFib.lcbPlcfbkl,0); rtl_TextEncoding eStructChrSet = WW8Fib::GetFIBCharset(rFib.chseTables); diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 85c80ba51025..9223773826a5 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -223,7 +223,7 @@ private: long nStru; public: WW8PLCFspecial( SvStream* pSt, long nFilePos, long nPLCF, - long nStruct, long nStartPos = -1, bool bNoEnd = false); + long nStruct, long nStartPos = -1 ); ~WW8PLCFspecial() { delete[] pPLCF_PosArray; } long GetIdx() const { return nIdx; } void SetIdx( long nI ) { nIdx = nI; } -- cgit v1.2.3 From 8c8c70768157550d0d30d09808b22eeca7ffebab Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 18 Feb 2010 10:36:50 +0100 Subject: cws tl74: #i106019# fixed problem with language status bar --- framework/inc/helper/mischelper.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 framework/inc/helper/mischelper.hxx diff --git a/framework/inc/helper/mischelper.hxx b/framework/inc/helper/mischelper.hxx old mode 100644 new mode 100755 index fd9c790aec7e..c7e793283aea --- a/framework/inc/helper/mischelper.hxx +++ b/framework/inc/helper/mischelper.hxx @@ -56,7 +56,7 @@ namespace framework // menu ids for language status bar control enum LangMenuIDs { - MID_LANG_SEL_1, + MID_LANG_SEL_1 = 1, // need to start with 1 since xPopupMenu->execute will return 0 if the menu is cancelled MID_LANG_SEL_2, MID_LANG_SEL_3, MID_LANG_SEL_4, -- cgit v1.2.3 From 05e896cd790b601feb373ebfd2d69a1031145ae1 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 22 Feb 2010 13:09:07 +0100 Subject: #i107721# another rework of the thesaurus dialog --- svx/source/dialog/thesdlg.cxx | 182 ++++++++++++++++++++++++------------- svx/source/dialog/thesdlg.hrc | 3 +- svx/source/dialog/thesdlg.src | 32 +++---- svx/source/dialog/thesdlg_impl.hxx | 103 +++++++++++++-------- 4 files changed, 199 insertions(+), 121 deletions(-) diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index 2c77545d2bae..8d95cb0b542e 100755 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -97,39 +97,73 @@ static void GetReplaceEditString( String &rText ) rText.EraseLeadingAndTrailingChars( sal_Unicode(' ') ); } -// class LookUpComboBox -------------------------------------------------- +// class LookUpComboBox_Impl -------------------------------------------------- -LookUpComboBox::LookUpComboBox( +LookUpComboBox_Impl::LookUpComboBox_Impl( + Window *pParent, const ResId &rResId, SvxThesaurusDialog_Impl &rImpl ) : + ComboBox (pParent, rResId), + m_rDialogImpl( rImpl ) +{ + m_aModifyTimer.SetTimeoutHdl( LINK( this, LookUpComboBox_Impl, ModifyTimer_Hdl ) ); + m_aModifyTimer.SetTimeout( 500 ); + + EnableAutocomplete( FALSE ); +} + + +LookUpComboBox_Impl::~LookUpComboBox_Impl() +{ +} + + +void LookUpComboBox_Impl::Modify() +{ + m_aModifyTimer.Start(); +} + + +IMPL_LINK( LookUpComboBox_Impl, ModifyTimer_Hdl, Timer *, EMPTYARG /*pTimer*/ ) +{ + m_rDialogImpl.LookUp( GetText() ); + m_aModifyTimer.Stop(); + return 0; +} + + +// class ReplaceEdit_Impl -------------------------------------------------- + +ReplaceEdit_Impl::ReplaceEdit_Impl( Window *pParent, const ResId &rResId ) : - ComboBox (pParent, rResId) + Edit (pParent, rResId) { } -LookUpComboBox::~LookUpComboBox() +ReplaceEdit_Impl::~ReplaceEdit_Impl() { } -void LookUpComboBox::Modify() +void ReplaceEdit_Impl::Modify() { if (m_pBtn) m_pBtn->Enable( GetText().Len() > 0 ); } -void LookUpComboBox::SetText( const XubString& rStr ) +void ReplaceEdit_Impl::SetText( const XubString& rStr ) { - ComboBox::SetText( rStr ); + Edit::SetText( rStr ); Modify(); } -void LookUpComboBox::SetText( const XubString& rStr, const Selection& rNewSelection ) +void ReplaceEdit_Impl::SetText( const XubString& rStr, const Selection& rNewSelection ) { - ComboBox::SetText( rStr, rNewSelection ); + Edit::SetText( rStr ); Modify(); } + // class ThesaurusAlternativesCtrl_Impl ---------------------------------- void AlternativesString_Impl::Paint( @@ -182,7 +216,7 @@ SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const St { SvLBoxEntry* pEntry = new SvLBoxEntry; String aText; - if (bIsHeader) + if (bIsHeader && nVal >= 0) { aText = String::CreateFromInt32( nVal ); aText += A2S( ". " ); @@ -194,7 +228,10 @@ SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const St AlternativesUserData_Impl* pUserData = new AlternativesUserData_Impl( rText, bIsHeader ); pEntry->SetUserData( pUserData ); - GetModel()->Insert( pEntry ); + USHORT nPos = GetModel()->Insert( pEntry ); + + if (bIsHeader) + GetViewDataEntry( pEntry )->SetSelectable( false ); return pEntry; } @@ -213,6 +250,31 @@ void ThesaurusAlternativesCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) } +void ThesaurusAlternativesCtrl_Impl::Paint( const Rectangle& rRect ) +{ + if (!m_rDialogImpl.m_bWordFound) + { + Push( PUSH_FONT ); + + Font aFont(GetFont() ); + aFont.SetHeight( 2 * aFont.GetHeight() ); + SetFont( aFont ); + + Size aTextSize( GetTextWidth( m_rDialogImpl.aErrStr ), GetTextHeight() ); + aTextSize = LogicToPixel( aTextSize ); + Point aPos = GetPosPixel(); + aPos.X() += GetSizePixel().Width() / 2 - aTextSize.Width() / 2; + aPos.Y() += /*GetSizePixel().Height() / 2 - */aTextSize.Height() / 2; + aPos = PixelToLogic( aPos ); + DrawText( aPos, m_rDialogImpl.aErrStr ); + + Pop(); + } + else + SvxCheckListBox::Paint( rRect ); +} + + // struct SvxThesaurusDialog_Impl ---------------------------------------- SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : @@ -220,8 +282,7 @@ SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : aVendorImageFI ( pParent , SVX_RES( IMG_VENDOR ) ), aLeftBtn ( pParent, SVX_RES( BTN_LEFT ) ), aWordText ( pParent, SVX_RES( FT_WORD ) ), - aWordCB ( pParent, SVX_RES( CB_WORD ) ), - aLookUpBtn ( pParent, SVX_RES( BTN_LOOKUP ) ), + aWordCB ( pParent, SVX_RES( CB_WORD ), *this ), m_aAlternativesText ( pParent, SVX_RES( FT_THES_ALTERNATIVES ) ), m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( pParent, *this ) ), aReplaceText ( pParent, SVX_RES( FT_REPL ) ), @@ -229,24 +290,24 @@ SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : aFL ( pParent, SVX_RES( FL_VAR ) ), aHelpBtn ( pParent, SVX_RES( BTN_THES_HELP ) ), aLangMBtn ( pParent, SVX_RES( MB_LANGUAGE ) ), - aOkBtn ( pParent, SVX_RES( BTN_THES_OK ) ), + aReplaceBtn ( pParent, SVX_RES( BTN_THES_OK ) ), aCancelBtn ( pParent, SVX_RES( BTN_THES_CANCEL ) ), - aErrStr ( SVX_RES( STR_ERR_WORDNOTFOUND ) ), - aVendorDefaultImage ( SVX_RES( IMG_DEFAULT_VENDOR ) ), - aVendorDefaultImageHC ( SVX_RES( IMG_DEFAULT_VENDOR_HC ) ), + aErrStr ( SVX_RES( STR_ERR_TEXTNOTFOUND ) ), + aVendorDefaultImage ( SVX_RES( IMG_DEFAULT_VENDOR ) ), + aVendorDefaultImageHC ( SVX_RES( IMG_DEFAULT_VENDOR_HC ) ), xThesaurus ( NULL ), aLookUpText (), nLookUpLanguage ( LANGUAGE_NONE ), + m_bWordFound( false ), pErrContext ( NULL ) { // note: FreeResource must only be called in the c-tor of SvxThesaurusDialog - aWordCB.SetButton( &aLookUpBtn ); + aReplaceEdit.SetButton( &aReplaceBtn ); aLeftBtn.SetClickHdl( LINK( this, SvxThesaurusDialog_Impl, LeftBtnHdl_Impl ) ); aWordCB.SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, WordSelectHdl_Impl ) ); - aLangMBtn.SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, LanguageHdl_Impl ) ); - aLookUpBtn.SetClickHdl( LINK( this, SvxThesaurusDialog_Impl, LookUpHdl_Impl ) ); + aLangMBtn.SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, LanguageHdl_Impl ) ); m_pAlternativesCT->SetSelectHdl( LINK( this, SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl )); m_pAlternativesCT->SetDoubleClickHdl( LINK( this, SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl )); @@ -297,12 +358,12 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() const sal_Int32 nMeanings = aMeanings.getLength(); const uno::Reference< linguistic2::XMeaning > *pMeanings = aMeanings.getConstArray(); + m_pAlternativesCT->SetUpdateMode( FALSE ); + // clear old user data of control before creating new ones via AddEntry below m_pAlternativesCT->ClearUserData(); m_pAlternativesCT->Clear(); - m_pAlternativesCT->SetUpdateMode( FALSE ); - for (sal_Int32 i = 0; i < nMeanings; ++i) { OUString rMeaningTxt = pMeanings[i]->getMeaning(); @@ -319,10 +380,7 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() m_pAlternativesCT->SetUpdateMode( TRUE ); - const bool bWordFound = nMeanings > 0; - if (!bWordFound) - InfoBox( m_pParent, aErrStr ).Execute(); - return bWordFound; + return nMeanings > 0; } @@ -338,6 +396,14 @@ void SvxThesaurusDialog_Impl::SetWindowTitle( LanguageType nLanguage ) } +void SvxThesaurusDialog_Impl::LookUp( const String &rText ) +{ + if (rText != aWordCB.GetText()) // avoid moving of the cursor if the text is the same + aWordCB.SetText( rText ); + LookUp_Impl(); +} + + IMPL_LINK( SvxThesaurusDialog_Impl, LeftBtnHdl_Impl, Button *, pBtn ) { if (pBtn && aLookUpHistory.size() >= 2) @@ -345,13 +411,13 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LeftBtnHdl_Impl, Button *, pBtn ) aLookUpHistory.pop(); // remove current look up word from stack aWordCB.SetText( aLookUpHistory.top() ); // retrieve previous look up word aLookUpHistory.pop(); - LookUpHdl_Impl( NULL ); + LookUp_Impl(); } return 0; } - -IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) + +IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) { PopupMenu *pMenu = aLangMBtn.GetPopupMenu(); if (pMenu && pBtn) @@ -359,18 +425,18 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) USHORT nItem = pBtn->GetCurItemId(); String aLangText( pMenu->GetItemText( nItem ) ); LanguageType nLang = SvtLanguageTable().GetType( aLangText ); - DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); - if (xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) - nLookUpLanguage = nLang; - SetWindowTitle( nLang ); + DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); + if (xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) + nLookUpLanguage = nLang; + SetWindowTitle( nLang ); UpdateVendorImage(); - LookUpHdl_Impl( NULL ); + LookUp_Impl(); } return 0; } -IMPL_LINK( SvxThesaurusDialog_Impl, LookUpHdl_Impl, Button *, EMPTYARG /*pBtn*/ ) +void SvxThesaurusDialog_Impl::LookUp_Impl() { String aText( aWordCB.GetText() ); @@ -379,19 +445,14 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LookUpHdl_Impl, Button *, EMPTYARG /*pBtn*/ (aLookUpHistory.size() == 0 || aLookUpText != aLookUpHistory.top())) aLookUpHistory.push( aLookUpText ); - UpdateAlternativesBox_Impl(); + m_bWordFound = UpdateAlternativesBox_Impl(); + m_pAlternativesCT->Enable( m_bWordFound ); if ( aWordCB.GetEntryPos( aText ) == LISTBOX_ENTRY_NOTFOUND ) aWordCB.InsertEntry( aText ); - aWordCB.SelectEntryPos( aWordCB.GetEntryPos( aText ) ); aReplaceEdit.SetText( String() ); - aOkBtn.Enable( FALSE ); - m_pAlternativesCT->GrabFocus(); - aLeftBtn.Enable( aLookUpHistory.size() > 1 ); - - return 0; } @@ -403,9 +464,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox ) String aStr( pBox->GetEntry( nPos ) ); GetReplaceEditString( aStr ); aWordCB.SetText( aStr ); - aOkBtn.Enable( aStr.Len() > 0 ); - - LookUpHdl_Impl( NULL ); + LookUp_Impl(); } return 0; @@ -425,7 +484,6 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox GetReplaceEditString( aStr ); } aReplaceEdit.SetText( aStr ); - aOkBtn.Enable( aStr.Len() > 0 ); } return 0; } @@ -443,11 +501,10 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis aStr = pData->GetText(); GetReplaceEditString( aStr ); } - aWordCB.SetText( aStr ); - aOkBtn.Enable( aStr.Len() > 0 ); + aWordCB.SetText( aStr ); if (aStr.Len() > 0) - LookUpHdl_Impl( NULL ); + LookUp_Impl(); } //! workaround to set the selection since calling SelectEntryPos within @@ -457,11 +514,11 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis } -IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) -{ - if (pBox && pBox->GetEntryCount() > 0) - pBox->SelectEntryPos( 0 ); - return 0; +IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) +{ + if (pBox && pBox->GetEntryCount() > 0) + pBox->SelectEntryPos( 0 ); + return 0; } //////////////////////////////////////////////////////////// @@ -628,7 +685,6 @@ IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialo &pThis->aLeftBtn, &pThis->aWordText, &pThis->aWordCB, - &pThis->aLookUpBtn, &pThis->m_aAlternativesText, pThis->m_pAlternativesCT.get(), &pThis->aReplaceText, @@ -636,7 +692,7 @@ IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialo &pThis->aFL, &pThis->aHelpBtn, &pThis->aLangMBtn, - &pThis->aOkBtn, + &pThis->aReplaceBtn, &pThis->aCancelBtn, 0 }; @@ -689,10 +745,10 @@ SvxThesaurusDialog::SvxThesaurusDialog( String aTmp2( aTmp ); m_pImpl->aReplaceEdit.SetText( aTmp2 ); m_pImpl->aWordCB.InsertEntry( aTmp2 ); - m_pImpl->aWordCB.SelectEntryPos( m_pImpl->aWordCB.GetEntryPos( aTmp2 ) ); m_pImpl->SetWindowTitle( nLanguage ); - m_pImpl->UpdateAlternativesBox_Impl(); + + m_pImpl->LookUp( aTmp2 ); m_pImpl->m_pAlternativesCT->GrabFocus(); m_pImpl->aLeftBtn.Enable( sal_False ); @@ -728,11 +784,11 @@ SvxThesaurusDialog::~SvxThesaurusDialog() { } - -String SvxThesaurusDialog::GetWord() -{ - return m_pImpl->aReplaceEdit.GetText(); -} + +String SvxThesaurusDialog::GetWord() +{ + return m_pImpl->aReplaceEdit.GetText(); +} sal_uInt16 SvxThesaurusDialog::GetLanguage() const diff --git a/svx/source/dialog/thesdlg.hrc b/svx/source/dialog/thesdlg.hrc index 2d776ca92d4f..18ceadad4831 100755 --- a/svx/source/dialog/thesdlg.hrc +++ b/svx/source/dialog/thesdlg.hrc @@ -37,7 +37,6 @@ #define BTN_THES_CANCEL 11 #define MB_LANGUAGE 12 #define BTN_THES_HELP 13 -#define BTN_LOOKUP 14 #define FT_WORD 15 #define CB_WORD 16 #define FT_REPL 21 @@ -49,7 +48,7 @@ #define IMG_DEFAULT_VENDOR 27 #define IMG_DEFAULT_VENDOR_HC 28 -#define STR_ERR_WORDNOTFOUND 101 +#define STR_ERR_TEXTNOTFOUND 101 #endif diff --git a/svx/source/dialog/thesdlg.src b/svx/source/dialog/thesdlg.src index 501b54964946..eec56a0c46c3 100755 --- a/svx/source/dialog/thesdlg.src +++ b/svx/source/dialog/thesdlg.src @@ -39,7 +39,7 @@ ModalDialog RID_SVXDLG_THESAURUS { HelpId = SID_THESAURUS ; OutputSize = TRUE ; - Size = MAP_APPFONT ( 265, 230 ) ; + Size = MAP_APPFONT ( 235, 230 ) ; Text [ en-US ] = "Thesaurus" ; SvLook = TRUE ; Moveable = TRUE ; @@ -47,7 +47,7 @@ ModalDialog RID_SVXDLG_THESAURUS FixedImage IMG_VENDOR { Pos = MAP_APPFONT ( 0, 0 ) ; - Size = MAP_APPFONT ( 265, 0 ) ; // correct size will be applied at runtime + Size = MAP_APPFONT ( 235, 0 ) ; // correct size will be applied at runtime Hide = TRUE; }; @@ -69,13 +69,13 @@ ModalDialog RID_SVXDLG_THESAURUS { DropDown = TRUE ; Pos = MAP_APPFONT ( 24 , 16 ) ; - Size = MAP_APPFONT ( 171 , 60 ) ; // have drop down space for several lines + Size = MAP_APPFONT ( 141 , 60 ) ; // have drop down space for several lines }; - PushButton BTN_LOOKUP + MenuButton MB_LANGUAGE { - Pos = MAP_APPFONT ( 200 , 16 ) ; + Pos = MAP_APPFONT ( 170 , 16 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "Look ~Up" ; + Text [ en-US ] = "~Language" ; }; FixedText FT_THES_ALTERNATIVES @@ -89,7 +89,7 @@ ModalDialog RID_SVXDLG_THESAURUS { HelpID = HID_CT_THES_ALTERNATIVES ; Pos = MAP_APPFONT ( 5 , 45 ) ; - Size = MAP_APPFONT ( 255 , 121 ) ; + Size = MAP_APPFONT ( 225 , 121 ) ; Border = TRUE; TabStop = TRUE ; }; @@ -105,13 +105,13 @@ ModalDialog RID_SVXDLG_THESAURUS { BORDER = TRUE ; Pos = MAP_APPFONT ( 5 , 184 ) ; - Size = MAP_APPFONT ( 255 , 12 ) ; + Size = MAP_APPFONT ( 225 , 12 ) ; LEFT = TRUE ; }; FixedLine FL_VAR { Pos = MAP_APPFONT ( 0 , 200 ) ; - Size = MAP_APPFONT ( 265 , 8 ) ; + Size = MAP_APPFONT ( 235 , 8 ) ; }; HelpButton BTN_THES_HELP @@ -119,28 +119,22 @@ ModalDialog RID_SVXDLG_THESAURUS Pos = MAP_APPFONT ( 5 , 210 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; }; - MenuButton MB_LANGUAGE - { - Pos = MAP_APPFONT ( 70 , 210 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "~Language" ; - }; OkButton BTN_THES_OK { - Pos = MAP_APPFONT ( 135 , 210 ) ; + Pos = MAP_APPFONT ( 105 , 210 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Replace" ; DefButton = TRUE ; }; CancelButton BTN_THES_CANCEL { - Pos = MAP_APPFONT ( 200 , 210 ) ; + Pos = MAP_APPFONT ( 170 , 210 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; }; - String STR_ERR_WORDNOTFOUND + String STR_ERR_TEXTNOTFOUND { - Text [ en-US ] = "Word not found in thesaurus" ; + Text [ en-US ] = "Text not found" ; }; Image IMG_DEFAULT_VENDOR diff --git a/svx/source/dialog/thesdlg_impl.hxx b/svx/source/dialog/thesdlg_impl.hxx index 848d86fca54b..354bc95c09db 100755 --- a/svx/source/dialog/thesdlg_impl.hxx +++ b/svx/source/dialog/thesdlg_impl.hxx @@ -34,15 +34,16 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include #include +#include #include #include @@ -54,24 +55,49 @@ using namespace ::com::sun::star; using ::rtl::OUString; -// class LookUpComboBox -------------------------------------------------- +// class LookUpComboBox_Impl -------------------------------------------------- -class LookUpComboBox : public ComboBox +class LookUpComboBox_Impl : public ComboBox { - Button * m_pBtn; + Timer m_aModifyTimer; + Selection m_aSelection; + Button * m_pBtn; + SvxThesaurusDialog_Impl & m_rDialogImpl; // disable copy c-tor and assignment operator - LookUpComboBox( const LookUpComboBox & ); - LookUpComboBox & operator = ( const LookUpComboBox & ); + LookUpComboBox_Impl( const LookUpComboBox_Impl & ); + LookUpComboBox_Impl & operator = ( const LookUpComboBox_Impl & ); public: - LookUpComboBox( Window *pParent, const ResId &rResId ); - virtual ~LookUpComboBox(); + LookUpComboBox_Impl( Window *pParent, const ResId &rResId, SvxThesaurusDialog_Impl &rImpl ); + virtual ~LookUpComboBox_Impl(); + + DECL_LINK( ModifyTimer_Hdl, Timer * ); void SetButton( Button *pBtn ) { m_pBtn = pBtn; } // ComboBox virtual void Modify(); +}; + +// class ReplaceEdit_Impl -------------------------------------------------- + +class ReplaceEdit_Impl : public Edit +{ + Button * m_pBtn; + + // disable copy c-tor and assignment operator + ReplaceEdit_Impl( const ReplaceEdit_Impl & ); + ReplaceEdit_Impl & operator = ( const ReplaceEdit_Impl & ); + +public: + ReplaceEdit_Impl( Window *pParent, const ResId &rResId ); + virtual ~ReplaceEdit_Impl(); + + void SetButton( Button *pBtn ) { m_pBtn = pBtn; } + + // Edit + virtual void Modify(); virtual void SetText( const XubString& rStr ); virtual void SetText( const XubString& rStr, const Selection& rNewSelection ); }; @@ -127,7 +153,8 @@ public: SvLBoxEntry * AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader ); void ClearUserData(); - virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void Paint( const Rectangle& rRect ); }; @@ -135,34 +162,34 @@ public: struct SvxThesaurusDialog_Impl { - Window* m_pParent; - - FixedImage aVendorImageFI; - ImageButton aLeftBtn; - FixedText aWordText; - LookUpComboBox aWordCB; - PushButton aLookUpBtn; - FixedText m_aAlternativesText; - boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT; - FixedText aReplaceText; - Edit aReplaceEdit; - FixedLine aFL; - HelpButton aHelpBtn; - MenuButton aLangMBtn; - OKButton aOkBtn; - CancelButton aCancelBtn; - - String aErrStr; + Window * m_pParent; + + FixedImage aVendorImageFI; + ImageButton aLeftBtn; + FixedText aWordText; + LookUpComboBox_Impl aWordCB; + FixedText m_aAlternativesText; + boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT; + FixedText aReplaceText; + ReplaceEdit_Impl aReplaceEdit; + FixedLine aFL; + HelpButton aHelpBtn; + MenuButton aLangMBtn; + OKButton aReplaceBtn; + CancelButton aCancelBtn; + + String aErrStr; Image aVendorDefaultImage; Image aVendorDefaultImageHC; - + uno::Reference< linguistic2::XThesaurus > xThesaurus; - OUString aLookUpText; - LanguageType nLookUpLanguage; + OUString aLookUpText; + LanguageType nLookUpLanguage; std::stack< OUString > aLookUpHistory; + bool m_bWordFound; SfxErrorContext* pErrContext; // error context while dfalog is opened - + // Handler DECL_LINK( LeftBtnHdl_Impl, Button * ); @@ -176,8 +203,8 @@ struct SvxThesaurusDialog_Impl DECL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl * ); - SvxThesaurusDialog_Impl( Window* pParent ); - ~SvxThesaurusDialog_Impl(); + SvxThesaurusDialog_Impl( Window* pParent ); + ~SvxThesaurusDialog_Impl(); uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL queryMeanings_Impl( ::rtl::OUString& rTerm, const lang::Locale& rLocale, const beans::PropertyValues& rProperties ) throw(lang::IllegalArgumentException, uno::RuntimeException); @@ -185,6 +212,8 @@ struct SvxThesaurusDialog_Impl bool UpdateAlternativesBox_Impl(); void UpdateVendorImage(); void SetWindowTitle( LanguageType nLanguage ); + void LookUp( const String &rText ); + void LookUp_Impl(); }; #endif -- cgit v1.2.3 From c5a9cb727bc21a36442f77aedc6ce007de82dd97 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 22 Feb 2010 13:55:03 +0100 Subject: #i107721# minor change for thesaurus dialog --- svx/source/dialog/thesdlg.cxx | 14 +++++++------- svx/source/dialog/thesdlg.src | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index 8d95cb0b542e..87272d3ae89b 100755 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -254,21 +254,21 @@ void ThesaurusAlternativesCtrl_Impl::Paint( const Rectangle& rRect ) { if (!m_rDialogImpl.m_bWordFound) { - Push( PUSH_FONT ); +/* Push( PUSH_FONT ); - Font aFont(GetFont() ); + Font aFont( GetFont() ); aFont.SetHeight( 2 * aFont.GetHeight() ); SetFont( aFont ); - +*/ Size aTextSize( GetTextWidth( m_rDialogImpl.aErrStr ), GetTextHeight() ); aTextSize = LogicToPixel( aTextSize ); - Point aPos = GetPosPixel(); - aPos.X() += GetSizePixel().Width() / 2 - aTextSize.Width() / 2; - aPos.Y() += /*GetSizePixel().Height() / 2 - */aTextSize.Height() / 2; + Point aPos; + aPos.X() += GetSizePixel().Width() / 2 - aTextSize.Width() / 2; + aPos.Y() += GetSizePixel().Height() / 2 /*- aTextSize.Height() / 2*/; aPos = PixelToLogic( aPos ); DrawText( aPos, m_rDialogImpl.aErrStr ); - Pop(); +// Pop(); } else SvxCheckListBox::Paint( rRect ); diff --git a/svx/source/dialog/thesdlg.src b/svx/source/dialog/thesdlg.src index eec56a0c46c3..7cad0bc196de 100755 --- a/svx/source/dialog/thesdlg.src +++ b/svx/source/dialog/thesdlg.src @@ -134,7 +134,7 @@ ModalDialog RID_SVXDLG_THESAURUS String STR_ERR_TEXTNOTFOUND { - Text [ en-US ] = "Text not found" ; + Text [ en-US ] = "No alternatives found." ; }; Image IMG_DEFAULT_VENDOR -- cgit v1.2.3 From 97d964702b7d8a9814a52b974505603ffba2e6c6 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 22 Feb 2010 15:23:01 +0100 Subject: cws tl74: warning free code --- svx/source/dialog/thesdlg.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx index 87272d3ae89b..c99dfc506195 100755 --- a/svx/source/dialog/thesdlg.cxx +++ b/svx/source/dialog/thesdlg.cxx @@ -159,7 +159,7 @@ void ReplaceEdit_Impl::SetText( const XubString& rStr ) void ReplaceEdit_Impl::SetText( const XubString& rStr, const Selection& rNewSelection ) { - Edit::SetText( rStr ); + Edit::SetText( rStr, rNewSelection ); Modify(); } @@ -228,7 +228,7 @@ SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const St AlternativesUserData_Impl* pUserData = new AlternativesUserData_Impl( rText, bIsHeader ); pEntry->SetUserData( pUserData ); - USHORT nPos = GetModel()->Insert( pEntry ); + GetModel()->Insert( pEntry ); if (bIsHeader) GetViewDataEntry( pEntry )->SetSelectable( false ); @@ -516,6 +516,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox *, pBox ) { + (void) pThis; if (pBox && pBox->GetEntryCount() > 0) pBox->SelectEntryPos( 0 ); return 0; -- cgit v1.2.3 From f6970be6edb55ee2167987f757a7d6e6224e4279 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 25 Feb 2010 11:08:48 +0100 Subject: cws tl74: merge --- .../global/required/includes/g_option.inc | 18 +++++++++--------- testautomation/global/sid/all.sid | 2 -- testautomation/global/sid/e_all.sid | 2 ++ testautomation/global/win/dial_p_s.win | 10 ---------- testautomation/global/win/edia_d_h.win | 12 ++++++++++++ .../graphics/optional/includes/global/g_tools.inc | 18 +++++++++--------- .../graphics/optional/includes/global/id_006.inc | 4 ++-- .../graphics/required/includes/global/id_006.inc | 4 ++-- .../required/includes/c_upd_toolsmenu.inc | 6 +++--- .../includes/hyphenation/w_hyphenation.inc | 20 ++++++++++---------- .../writer/optional/includes/regexp/search.inc | 4 ++-- testautomation/writer/required/includes/w_007_.inc | 22 +++++++++++----------- 12 files changed, 62 insertions(+), 60 deletions(-) mode change 100644 => 100755 testautomation/global/sid/all.sid mode change 100644 => 100755 testautomation/global/sid/e_all.sid diff --git a/testautomation/global/required/includes/g_option.inc b/testautomation/global/required/includes/g_option.inc index d590016bc8ba..0beb0b02a3ed 100755 --- a/testautomation/global/required/includes/g_option.inc +++ b/testautomation/global/required/includes/g_option.inc @@ -508,21 +508,21 @@ testcase tToolsOptionsLanguageSettings Optionen.TypeKeys "", 6 WaitSlot() ' similar effect as a NOOP OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel + Kontext "HyphenationOptions" + Call DialogTest ( HyphenationOptions ) + HyphenationOptions.Cancel Kontext "TabLinguistik" Optionen.TypeKeys "" OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel + Kontext "HyphenationOptions" + Call DialogTest ( HyphenationOptions ) + HyphenationOptions.Cancel Kontext "TabLinguistik" Optionen.TypeKeys "" OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel + Kontext "HyphenationOptions" + Call DialogTest ( HyphenationOptions ) + HyphenationOptions.Cancel endif case 3,5 : try diff --git a/testautomation/global/sid/all.sid b/testautomation/global/sid/all.sid old mode 100644 new mode 100755 index 7c8f6618b059..e7a1d94c7d58 --- a/testautomation/global/sid/all.sid +++ b/testautomation/global/sid/all.sid @@ -481,7 +481,6 @@ FormatAusrichtung SID_ALIGN ' **** ' **** Alle ExtrasRechtschreibungAutomatisch SID_AUTOSPELL_CHECK -ExtrasSilbentrennung FN_HYPHENATE_OPT_DLG ExtrasAutoKorrektur SID_AUTO_CORRECT_DLG ExtrasMakro SID_BASICCHOOSER ExtrasAnpassen SID_CONFIG @@ -527,7 +526,6 @@ ExtrasAutoEingabe FID_AUTOCOMPLETE ' **** Draw / Impress ExtrasThesaurusDraw SID_THESAURUS -ExtrasSilbentrennungDraw SID_HYPHENATION ExtrasPipette SID_BMPMASK ExtrasDiawechsel .uno:SlideChangeWindow ExtrasAnimation SID_ANIMATION_OBJECTS diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid old mode 100644 new mode 100755 index 82b161d7f51d..8083a6ebe727 --- a/testautomation/global/sid/e_all.sid +++ b/testautomation/global/sid/e_all.sid @@ -735,6 +735,7 @@ ToolsUpdateAllIndexes FN_UPDATE_TOX ToolsBibliographyDatabase SID_COMP_BIBLIOGRAPHY ToolsWordCount FN_WORDCOUNT_DIALOG TableTableProperties .uno:TableDialog +ToolsLanguageHyphenation FN_HYPHENATE_OPT_DLG ' **** WriterWeb ToolsPageFormatting FN_REPAGINATE @@ -767,6 +768,7 @@ ToolsGallery .uno:Gallery ToolsEyedropper SID_BMPMASK ToolsMediaPlayer .uno:AVMediaPlayer ToolsChineseTranslation .uno:ChineseConversion +ToolsLanguageHyphenationDraw SID_HYPHENATION ' **** Math ToolsSymbolsCatalog SID_SYMBOLS_CATALOGUE diff --git a/testautomation/global/win/dial_p_s.win b/testautomation/global/win/dial_p_s.win index 30e5ae62e6e4..f165ccd0d2dc 100755 --- a/testautomation/global/win/dial_p_s.win +++ b/testautomation/global/win/dial_p_s.win @@ -234,16 +234,6 @@ FormatRTF sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_RTF FormatStarWriter sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_SW Datenbankfeldliste sw:ListBox:DLG_MAILMERGE:LB_COLUMN -*Silbentrennung HID_HYPHENATE svx:ModalDialog:RID_SVXDLG_HYPHENATE -Wort svx:Edit:RID_SVXDLG_HYPHENATE:ED_WORD -Vor svx:ImageButton:RID_SVXDLG_HYPHENATE:BTN_LEFT -Zurueck svx:ImageButton:RID_SVXDLG_HYPHENATE:BTN_RIGHT -Weiter svx:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_CONTINUE -Entfernen svx:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_DELETE - -*SilbentrennungOptionen HID_LNGDLG_NUM_PREBREAK -ZeichenVorUmbruch cui:NumericField:RID_SVXDLG_LNG_ED_NUM_PREBREAK:ED_PREBREAK - *Sonderzeichen SID_CHARMAP Schrift cui:ListBox:RID_SVXDLG_CHARMAP:LB_FONT SchriftListe HID_CHARMAP_CTL_SHOWSET diff --git a/testautomation/global/win/edia_d_h.win b/testautomation/global/win/edia_d_h.win index de1b69ab4429..a95bf2b755d4 100755 --- a/testautomation/global/win/edia_d_h.win +++ b/testautomation/global/win/edia_d_h.win @@ -467,3 +467,15 @@ Suggestion3 cui:Edit:RID_SVX_MDLG_HANGULHANJA_EDIT:ED_3 Suggestion4 cui:Edit:RID_SVX_MDLG_HANGULHANJA_EDIT:ED_4 NewEntry cui:PushButton:RID_SVX_MDLG_HANGULHANJA_EDIT:PB_HHE_NEW DeleteEntry cui:PushButton:RID_SVX_MDLG_HANGULHANJA_EDIT:PB_HHE_DELETE + +*Hyphenation HID_HYPHENATE svx:ModalDialog:RID_SVXDLG_HYPHENATE +Wort svx:Edit:RID_SVXDLG_HYPHENATE:ED_WORD +Vor svx:ImageButton:RID_SVXDLG_HYPHENATE:BTN_LEFT +Zurueck svx:ImageButton:RID_SVXDLG_HYPHENATE:BTN_RIGHT +Weiter svx:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_CONTINUE +Entfernen svx:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_DELETE +HyphenateAll svx:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_ALL + +*HyphenationOptions HID_LNGDLG_NUM_PREBREAK +ZeichenVorUmbruch cui:NumericField:RID_SVXDLG_LNG_ED_NUM_PREBREAK:ED_PREBREAK + diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc index 7602dc98a9af..fb5689429a18 100755 --- a/testautomation/graphics/optional/includes/global/g_tools.inc +++ b/testautomation/graphics/optional/includes/global/g_tools.inc @@ -170,11 +170,11 @@ testcase tiToolsHyphenation1 printlog " - Hyphenation without any text" Call hNewDocument '/// New impress document ///' sleep 3 - ExtrasSilbentrennungDraw '/// Try Silbentrennung with empty document ///' - Kontext "Silbentrennung" - if Silbentrennung.Exists(1) = True Then + ToolsLanguageHyphenationDraw '/// Try with empty document ///' + Kontext "Hyphenation" + if Hyphenation.Exists(1) = True Then Warnlog " - Dialog ist da" - Silbentrennung.Cancel + Hyphenation.Cancel else Printlog " - Hyphenation activated" end if @@ -206,11 +206,11 @@ testcase tiToolsHyphenation1 endif end select hTypeKeys "" - ExtrasSilbentrennungDraw '/// Try Silbentrennung ///' - Kontext "Silbentrennung" - if Silbentrennung.Exists =True Then + ToolsLanguageHyphenationDraw '/// Try ///' + Kontext "Hyphenation" + if Hyphenation.Exists =True Then Warnlog "Dialog exists" - Silbentrennung.Cancel + Hyphenation.Cancel else Kontext "Active" if Active.Exists then Active.OK @@ -281,7 +281,7 @@ testcase tiToolsHyphenation2 EditCopy sDraw = GetClipboardText() EditSelectAll '/// Select whole text ///' - ExtrasSilbentrennungDraw '/// Run Hyphenation ///' + ToolsLanguageHyphenationDraw '/// Run Hyphenation ///' gMouseClick 50,50 hTypeKeys "" '/// Select part of text and compare it with original text at this place ///' sleep 3 diff --git a/testautomation/graphics/optional/includes/global/id_006.inc b/testautomation/graphics/optional/includes/global/id_006.inc index fb774c22acb2..f3d1f44ea190 100755 --- a/testautomation/graphics/optional/includes/global/id_006.inc +++ b/testautomation/graphics/optional/includes/global/id_006.inc @@ -152,9 +152,9 @@ endcase testcase tiToolsHyphenation Call hNewDocument - ExtrasSilbentrennungDraw + ToolsLanguageHyphenationDraw WaitSlot (2000) 'sleep 2 - ExtrasSilbentrennungDraw + ToolsLanguageHyphenationDraw Call hCloseDocument endcase diff --git a/testautomation/graphics/required/includes/global/id_006.inc b/testautomation/graphics/required/includes/global/id_006.inc index d7a3834f64b7..4c5921c5621d 100755 --- a/testautomation/graphics/required/includes/global/id_006.inc +++ b/testautomation/graphics/required/includes/global/id_006.inc @@ -178,10 +178,10 @@ testcase tiToolsHyphenation '/// open application ///' Call hNewDocument '/// Tools->Hyphenation ///' - ExtrasSilbentrennungDraw + ToolsLanguageHyphenationDraw WaitSlot (2000) 'sleep 2 '/// Tools->Hyphenation ///' - ExtrasSilbentrennungDraw + ToolsLanguageHyphenationDraw '/// close application ///' Call hCloseDocument endcase diff --git a/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc b/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc index 21816865681f..ef0a96c954a5 100755 --- a/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc +++ b/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc @@ -195,14 +195,14 @@ testcase tToolsSpellcheck '/// Click on 'Edit' – button printlog " Click on 'Edit' – button" OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) + Kontext "HyphenationOptions" + Call DialogTest ( HyphenationOptions ) '/// Decrease 'Minimal word length' printlog " Decrease 'Minimal word length'" ZeichenVorUmbruch.More '/// Close dialog with 'Cancel' printlog " Close dialog with 'Cancel'" - SilbentrennungOptionen.Cancel + HyphenationOptions.Cancel Kontext "TabLinguistik" '/// Close dialog with 'Cancel' printlog " Close dialog with 'Cancel'" diff --git a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc index 8b7296d1d5a4..d07f9983bdc9 100755 --- a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc +++ b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc @@ -179,9 +179,9 @@ testcase tHyphenation_3 printlog "Tools/Hyphenation" ToolsLanguageHyphenate - Kontext "Silbentrennung" + Kontext "Hyphenation" - if Not Silbentrennung.Exists then + if Not Hyphenation.Exists then Warnlog "Unable to bring up Dialog 'Hyphenation'!" Call hCloseDocument goto endsub @@ -190,21 +190,21 @@ testcase tHyphenation_3 printlog "check if get 'fol=low-ing'" if Wort.Gettext <> testWordInHyphenationDlg then Warnlog "Expected " & testWordInHyphenationDlg & " but found " & Wort.Gettext - Silbentrennung.Cancel + Hyphenation.Cancel Call hCloseDocument goto endsub end if if NOT Vor.IsEnabled then Warnlog "the 'Vor' button is Not enabled, or something wrong!" - Silbentrennung.Cancel + Hyphenation.Cancel Call hCloseDocument goto endsub end if printlog "add '-' between 'fol' and 'lowing' using left arrow key" Vor.Click - Silbentrennung.OK + Hyphenation.OK ' Messagebox 'Start hypheantion from the beginning ? Kontext "Active" @@ -291,9 +291,9 @@ testcase tHyphenation_4 printlog "Tools/Hyphenation" ToolsLanguageHyphenate - Kontext "Silbentrennung" + Kontext "Hyphenation" - if Not Silbentrennung.Exists then + if Not Hyphenation.Exists then Call hCloseDocument goto endsub end if @@ -301,7 +301,7 @@ testcase tHyphenation_4 printlog "check if get 'fol=low-ing'" if Wort.Gettext <> testWordInHyphenationDlg1 then Warnlog "Expected " & testWordInHyphenationDlg1 & " but found " & Wort.Gettext - Silbentrennung.Cancel + Hyphenation.Cancel Call hCloseDocument goto endsub end if @@ -309,7 +309,7 @@ testcase tHyphenation_4 printlog "click left arrow key" if NOT Vor.IsEnabled then Warnlog "the Vor button is Not enabled, or something wrong!" - Silbentrennung.Cancel + Hyphenation.Cancel Call hCloseDocument goto endsub end if @@ -340,7 +340,7 @@ testcase tHyphenation_4 Sleep 1 printlog "close all dialogs" - Silbentrennung.OK + Hyphenation.OK ' Messagebox 'Start hypheantion from the beginning ? Kontext "Active" diff --git a/testautomation/writer/optional/includes/regexp/search.inc b/testautomation/writer/optional/includes/regexp/search.inc index a450d6922742..a7cef4940f30 100755 --- a/testautomation/writer/optional/includes/regexp/search.inc +++ b/testautomation/writer/optional/includes/regexp/search.inc @@ -1190,7 +1190,7 @@ function wSelectAttributeName(aNumber as integer, AsianSupport as boolean, SetSt Case 31 Select Case iSprache - Case 49: aSelectIt = "Silbentrennung" + Case 49: aSelectIt = "Hyphenation" Case else: Warnlog "Language not supported. No test" exit function end select @@ -1469,7 +1469,7 @@ sub wCheckAttribute(aNumber as integer) Case 28 '"Schriftstellung asiatische Schrift" Case 29 '"Schusterjungen" Case 30 '"Seitenvorlage" - Case 31 '"Silbentrennung" + Case 31 '"Hyphenation" Case 32 '"Skalierung" Case 33 '"Sprache" Case 34 '"Sprache asiatische Schrift" diff --git a/testautomation/writer/required/includes/w_007_.inc b/testautomation/writer/required/includes/w_007_.inc index 056145bdbf37..3ca638fa16cf 100755 --- a/testautomation/writer/required/includes/w_007_.inc +++ b/testautomation/writer/required/includes/w_007_.inc @@ -161,9 +161,9 @@ testcase tToolsSpellcheck if OptionenBearbeiten.IsEnabled then OptionenBearbeiten.Click wait 500 - Kontext "SilbentrennungOptionen" - DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel + Kontext "HyphenationOptions" + DialogTest ( HyphenationOptions ) + HyphenationOptions.Cancel end if next i @@ -396,11 +396,11 @@ testcase tToolsHyphenation end if end if - Kontext "Silbentrennung" + Kontext "Hyphenation" printlog " Close upcoming 'Hyphenation' dialog" - if Silbentrennung.Exists then - Call DialogTest ( Silbentrennung ) - Silbentrennung.Cancel + if Hyphenation.Exists then + Call DialogTest ( Hyphenation ) + Hyphenation.Cancel else Warnlog "Dialog 'Hyphenation' not up!" Kontext "Active" @@ -1300,11 +1300,11 @@ testcase tMasterDocToolsHyphenation end if end if - Kontext "Silbentrennung" + Kontext "Hyphenation" printlog " Close upcoming 'Hyphenation' dialog" - if ( Silbentrennung.Exists( 2 ) ) then - Call DialogTest ( Silbentrennung ) - Silbentrennung.Cancel + if ( Hyphenation.Exists( 2 ) ) then + Call DialogTest ( Hyphenation ) + Hyphenation.Cancel else Warnlog "Dialog 'Hyphenation' not up!" Kontext "Active" -- cgit v1.2.3 From 3704620b259a35c75f400f3dce03a5d277a52639 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 26 Feb 2010 13:02:44 +0100 Subject: cws tl74: merge problem fixed --- editeng/inc/editeng/outliner.hxx | 4 ++-- editeng/source/outliner/outlvw.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index 34e1279c7036..a4efc98674fc 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -391,8 +391,8 @@ public: // some thesaurus functionality to avoid code duplication in different projects... -bool SVX_DLLPUBLIC GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView ); -void SVX_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText ); +bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView ); +void EDITENG_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText ); //#if 0 // _SOLAR__PRIVATE diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index d753cec0e027..e2a1fabea0ba 100755 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -1686,7 +1686,7 @@ Selection OutlinerView::GetSurroundingTextSelection() const // returns: true if a word for thesaurus look-up was found at the current cursor position. // The status string will be word + iso language string (e.g. "light#en-US") -bool SVX_DLLPUBLIC GetStatusValueForThesaurusFromContext( +bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView ) @@ -1714,7 +1714,7 @@ bool SVX_DLLPUBLIC GetStatusValueForThesaurusFromContext( } -void SVX_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText ) +void EDITENG_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText ) { // get selection to use ESelection aCurSel( rEditView.GetSelection() ); -- cgit v1.2.3 From f32e3142ecef67b782c87028cba151ab3a094b1c Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 1 Mar 2010 11:14:01 +0100 Subject: cws tl74: #i107721#, #i108358# fixing build problems after merge with DEV300_m72 --- editeng/inc/editeng/splwrap.hxx | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 editeng/inc/editeng/splwrap.hxx diff --git a/editeng/inc/editeng/splwrap.hxx b/editeng/inc/editeng/splwrap.hxx old mode 100644 new mode 100755 index 89eb0b53320b..5e46a96adb9f --- a/editeng/inc/editeng/splwrap.hxx +++ b/editeng/inc/editeng/splwrap.hxx @@ -56,6 +56,7 @@ class EDITENG_DLLPUBLIC SvxSpellWrapper { private: friend class SvxSpellCheckDialog; friend class SvxHyphenWordDialog; + friend class SvxHyphenWordDialog_Impl; Window* pWin; ::com::sun::star::uno::Reference< -- cgit v1.2.3 From 1ec7c5a40bbe34b1b1dbba8dea2c1364c492ece7 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 1 Mar 2010 11:14:01 +0100 Subject: cws tl74: #i107721#, #i108358# fixing build problems after merge with DEV300_m72 --- cui/source/dialogs/hyphen.cxx | 457 +++++++++++++++++++----------------- cui/source/dialogs/thesdlg.cxx | 80 +++---- cui/source/dialogs/thesdlg.src | 5 +- cui/source/dialogs/thesdlg_impl.hxx | 12 +- cui/source/inc/hyphen.hxx | 21 +- cui/source/inc/thesdlg.hxx | 1 + 6 files changed, 286 insertions(+), 290 deletions(-) diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index d99a640e20fa..5095593fd7fe 100755 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -28,21 +28,22 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_cui.hxx" -// include --------------------------------------------------------------- -#include -#include -#include -#include -#include "cuires.hrc" -#include "hyphen.hrc" -#include #include "hyphen.hxx" +#include "hyphen.hrc" +#include "cuires.hrc" +#include "dialmgr.hxx" + #include -#include -#include +#include #include #include -#include "dialmgr.hxx" +#include +#include +#include +#include +#include + +#include using namespace ::com::sun::star; @@ -64,7 +65,6 @@ SvxHyphenEdit::SvxHyphenEdit( Window* pParent, const ResId& rResId ) : { } -// ----------------------------------------------------------------------- void SvxHyphenEdit::KeyInput( const KeyEvent& rKEvt ) { @@ -96,6 +96,9 @@ void SvxHyphenEdit::KeyInput( const KeyEvent& rKEvt ) struct SvxHyphenWordDialog_Impl { + SvxHyphenWordDialog * m_pDialog; +// Window * m_pParent; + FixedText aWordFT; SvxHyphenEdit aWordEdit; ImageButton aLeftBtn; @@ -118,24 +121,54 @@ struct SvxHyphenWordDialog_Impl sal_uInt16 nOldPos; sal_Bool bBusy; - SvxHyphenWordDialog_Impl( Window* pParent ); + + void EnableLRBtn_Impl(); + String EraseUnusableHyphens_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 nMaxHyphenationPos ); + + void InitControls_Impl(); + void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 ); + sal_uInt16 GetHyphIndex_Impl(); + + DECL_LINK( Left_Impl, Button* ); + DECL_LINK( Right_Impl, Button* ); + DECL_LINK( CutHdl_Impl, Button* ); + DECL_LINK( ContinueHdl_Impl, Button* ); + DECL_LINK( DeleteHdl_Impl, Button* ); + DECL_LINK( HyphenateAllHdl_Impl, Button* ); + DECL_LINK( CancelHdl_Impl, Button* ); + DECL_LINK( GetFocusHdl_Impl, Edit* ); + + + SvxHyphenWordDialog_Impl( + SvxHyphenWordDialog * pDialog, + const String &rWord, + LanguageType nLang, + uno::Reference< linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ); ~SvxHyphenWordDialog_Impl(); }; -SvxHyphenWordDialog_Impl::SvxHyphenWordDialog_Impl( Window* pParent ) : - aWordFT ( pParent, SVX_RES( FT_WORD ) ), - aWordEdit ( pParent, SVX_RES( ED_WORD ) ), - aLeftBtn ( pParent, SVX_RES( BTN_LEFT ) ), - aRightBtn ( pParent, SVX_RES( BTN_RIGHT ) ), - aOkBtn ( pParent, SVX_RES( BTN_HYPH_CUT ) ), - aContBtn ( pParent, SVX_RES( BTN_HYPH_CONTINUE ) ), - aDelBtn ( pParent, SVX_RES( BTN_HYPH_DELETE ) ), - aFLBottom ( pParent, SVX_RES( FL_BOTTOM ) ), - aHelpBtn ( pParent, SVX_RES( BTN_HYPH_HELP ) ), - aHyphAll ( pParent, SVX_RES( BTN_HYPH_ALL ) ), - aCancelBtn ( pParent, SVX_RES( BTN_HYPH_CANCEL ) ), - aLabel ( ), +SvxHyphenWordDialog_Impl::SvxHyphenWordDialog_Impl( + SvxHyphenWordDialog * pDialog, + const String &rWord, + LanguageType nLang, + uno::Reference< linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ) : + + m_pDialog ( pDialog ), + aWordFT ( pDialog, SVX_RES( FT_WORD ) ), + aWordEdit ( pDialog, SVX_RES( ED_WORD ) ), + aLeftBtn ( pDialog, SVX_RES( BTN_LEFT ) ), + aRightBtn ( pDialog, SVX_RES( BTN_RIGHT ) ), + aOkBtn ( pDialog, SVX_RES( BTN_HYPH_CUT ) ), + aContBtn ( pDialog, SVX_RES( BTN_HYPH_CONTINUE ) ), + aDelBtn ( pDialog, SVX_RES( BTN_HYPH_DELETE ) ), + aFLBottom ( pDialog, SVX_RES( FL_BOTTOM ) ), + aHelpBtn ( pDialog, SVX_RES( BTN_HYPH_HELP ) ), + aHyphAll ( pDialog, SVX_RES( BTN_HYPH_ALL ) ), + aCancelBtn ( pDialog, SVX_RES( BTN_HYPH_CANCEL ) ), + aLabel ( pDialog->GetText() ), pHyphWrapper ( NULL ), xHyphenator ( NULL ), xPossHyph ( NULL ), @@ -146,6 +179,19 @@ SvxHyphenWordDialog_Impl::SvxHyphenWordDialog_Impl( Window* pParent ) : nOldPos ( 0 ), bBusy ( sal_False ) { + aActWord = rWord; + nActLanguage = nLang; + xHyphenator = xHyphen; + pHyphWrapper = pWrapper; + + aLeftBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, Left_Impl ) ); + aRightBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, Right_Impl ) ); + aOkBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, CutHdl_Impl ) ); + aContBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, ContinueHdl_Impl ) ); + aDelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, DeleteHdl_Impl ) ); + aHyphAll.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, HyphenateAllHdl_Impl ) ); + aCancelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, CancelHdl_Impl ) ); + aWordEdit.SetGetFocusHdl( LINK( this, SvxHyphenWordDialog_Impl, GetFocusHdl_Impl ) ); } @@ -153,148 +199,39 @@ SvxHyphenWordDialog_Impl::~SvxHyphenWordDialog_Impl() { } -// class SvxHyphenWordDialog --------------------------------------------- - -SvxHyphenWordDialog::SvxHyphenWordDialog( - const String &rWord, LanguageType nLang, - Window* pParent, - uno::Reference< linguistic2::XHyphenator > &xHyphen, - SvxSpellWrapper* pWrapper ) : - SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_HYPHENATE ) ) +void SvxHyphenWordDialog_Impl::EnableLRBtn_Impl() { - m_pImpl = boost::shared_ptr< SvxHyphenWordDialog_Impl >(new SvxHyphenWordDialog_Impl( this )); - - FreeResource(); - - m_pImpl->aLabel = GetText(); - m_pImpl->pHyphWrapper = pWrapper; - m_pImpl->xHyphenator = xHyphen; - m_pImpl->aActWord = rWord; - m_pImpl->nActLanguage = nLang; - - m_pImpl->aLeftBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Left_Impl ) ); - m_pImpl->aRightBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Right_Impl ) ); - m_pImpl->aOkBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, CutHdl_Impl ) ); - m_pImpl->aContBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, ContinueHdl_Impl ) ); - m_pImpl->aDelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, DeleteHdl_Impl ) ); - m_pImpl->aHyphAll.SetClickHdl( LINK( this, SvxHyphenWordDialog, HyphenateAllHdl_Impl ) ); - m_pImpl->aCancelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, CancelHdl_Impl ) ); - m_pImpl->aWordEdit.SetGetFocusHdl( LINK( this, SvxHyphenWordDialog, GetFocusHdl_Impl ) ); - - uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pWrapper ? - pWrapper->GetLast() : uno::Reference< uno::XInterface > () , uno::UNO_QUERY ); - DBG_ASSERT(xHyphWord.is(), "missing hyphenated word"); - m_pImpl->nMaxHyphenationPos = xHyphWord.is() ? xHyphWord->getHyphenationPos() : 0; - SetLabel_Impl( nLang ); - - InitControls_Impl(); - m_pImpl->aWordEdit.GrabFocus(); - - // disable controls if service is not available - if (!m_pImpl->xHyphenator.is()) - Enable( sal_False ); -} - -// ----------------------------------------------------------------------- - -void SvxHyphenWordDialog::SelLeft() -{ - String aTxt( m_pImpl->aWordEdit.GetText() ); - - for ( xub_StrLen i = m_pImpl->nOldPos + 1; i-- > 0 ; ) - { - DBG_ASSERT(i <= aTxt.Len(), "index out of range"); - if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) - { - aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); - - if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() ) - aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); - m_pImpl->nOldPos = i; - m_pImpl->aWordEdit.SetText( aTxt ); - m_pImpl->aWordEdit.GrabFocus(); - m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) ); - break; - } - } - m_pImpl->nHyphPos = GetHyphIndex_Impl(); - EnableLRBtn_Impl(); -} - -// ----------------------------------------------------------------------- - -void SvxHyphenWordDialog::SelRight() -{ - String aTxt( m_pImpl->aWordEdit.GetText() ); - - for ( xub_StrLen i = m_pImpl->nOldPos + 1; i < aTxt.Len(); ++i ) - { - if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) - { - aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); - - if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() ) - aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); - m_pImpl->nOldPos = i; - m_pImpl->aWordEdit.SetText( aTxt ); - m_pImpl->aWordEdit.GrabFocus(); - m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) ); - break; - } - } - m_pImpl->nHyphPos = GetHyphIndex_Impl(); - EnableLRBtn_Impl(); -} - -// ----------------------------------------------------------------------- - -void SvxHyphenWordDialog::EnableLRBtn_Impl() -{ - String aTxt( m_pImpl->aWordEdit.GetText() ); + String aTxt( aWordEdit.GetText() ); xub_StrLen nLen = aTxt.Len(); xub_StrLen i; - m_pImpl->aRightBtn.Disable(); - for ( i = m_pImpl->nOldPos + 2; i < nLen; ++i ) + aRightBtn.Disable(); + for ( i = nOldPos + 2; i < nLen; ++i ) { if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) { - m_pImpl->aRightBtn.Enable(); + aRightBtn.Enable(); break; } } - DBG_ASSERT(m_pImpl->nOldPos < aTxt.Len(), "m_pImpl->nOldPos out of range"); - if (m_pImpl->nOldPos >= aTxt.Len()) - m_pImpl->nOldPos = aTxt.Len() - 1; - m_pImpl->aLeftBtn.Disable(); - for ( i = m_pImpl->nOldPos; i-- > 0; ) + DBG_ASSERT(nOldPos < aTxt.Len(), "nOldPos out of range"); + if (nOldPos >= aTxt.Len()) + nOldPos = aTxt.Len() - 1; + aLeftBtn.Disable(); + for ( i = nOldPos; i-- > 0; ) { if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) { - m_pImpl->aLeftBtn.Enable(); + aLeftBtn.Enable(); break; } } } -// ----------------------------------------------------------------------- - - -void SvxHyphenWordDialog::SetLabel_Impl( LanguageType nLang ) -{ - String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) ); - String aTmp( m_pImpl->aLabel ); - aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ); - aTmp.Append( aLangStr ); - aTmp.Append( sal_Unicode( ')' ) ); - SetText( aTmp ); -} - -// ----------------------------------------------------------------------- -String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( +String SvxHyphenWordDialog_Impl::EraseUnusableHyphens_Impl( uno::Reference< linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 _nMaxHyphenationPos ) { @@ -349,39 +286,37 @@ String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( return aTxt; } -// ----------------------------------------------------------------------- -void SvxHyphenWordDialog::InitControls_Impl() +void SvxHyphenWordDialog_Impl::InitControls_Impl() { String aTxt; - m_pImpl->xPossHyph = NULL; - if (m_pImpl->xHyphenator.is()) + xPossHyph = NULL; + if (xHyphenator.is()) { - lang::Locale aLocale( SvxCreateLocale(m_pImpl->nActLanguage) ); - m_pImpl->xPossHyph = m_pImpl->xHyphenator->createPossibleHyphens( m_pImpl->aActWord, aLocale, + lang::Locale aLocale( SvxCreateLocale(nActLanguage) ); + xPossHyph = xHyphenator->createPossibleHyphens( aActWord, aLocale, uno::Sequence< beans::PropertyValue >() ); - if (m_pImpl->xPossHyph.is()) + if (xPossHyph.is()) { - aTxt = EraseUnusableHyphens_Impl( m_pImpl->xPossHyph, m_pImpl->nMaxHyphenationPos ); + aTxt = EraseUnusableHyphens_Impl( xPossHyph, nMaxHyphenationPos ); } - SetLabel_Impl( m_pImpl->nActLanguage ); + m_pDialog->SetWindowTitle( nActLanguage ); } - m_pImpl->aWordEdit.SetText( aTxt ); + aWordEdit.SetText( aTxt ); - m_pImpl->nOldPos = aTxt.Len(); - SelLeft(); + nOldPos = aTxt.Len(); + m_pDialog->SelLeft(); EnableLRBtn_Impl(); } -// ----------------------------------------------------------------------- -void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) +void SvxHyphenWordDialog_Impl::ContinueHyph_Impl( sal_uInt16 nInsPos ) { - if ( nInsPos != CONTINUE_HYPH && m_pImpl->xPossHyph.is()) + if ( nInsPos != CONTINUE_HYPH && xPossHyph.is()) { if (nInsPos) { - String aTmp( m_pImpl->aWordEdit.GetText() ); + String aTmp( aWordEdit.GetText() ); DBG_ASSERT(nInsPos <= aTmp.Len() - 2, "wrong hyphen position"); sal_uInt16 nIdxPos = 0; @@ -393,46 +328,45 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) nIdxPos++; } - uno::Sequence< sal_Int16 > aSeq = m_pImpl->xPossHyph->getHyphenationPositions(); + uno::Sequence< sal_Int16 > aSeq = xPossHyph->getHyphenationPositions(); sal_Int32 nLen = aSeq.getLength(); DBG_ASSERT(nLen, "empty sequence"); DBG_ASSERT(nIdxPos < nLen, "index out of range"); if (nLen && nIdxPos < nLen) { nInsPos = aSeq.getConstArray()[ nIdxPos ]; - m_pImpl->pHyphWrapper->InsertHyphen( nInsPos ); + pHyphWrapper->InsertHyphen( nInsPos ); } } else { //! calling with 0 as argument will remove hyphens! - m_pImpl->pHyphWrapper->InsertHyphen( nInsPos ); + pHyphWrapper->InsertHyphen( nInsPos ); } } - if ( m_pImpl->pHyphWrapper->FindSpellError() ) + if ( pHyphWrapper->FindSpellError() ) { - uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( m_pImpl->pHyphWrapper->GetLast(), uno::UNO_QUERY ); + uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pHyphWrapper->GetLast(), uno::UNO_QUERY ); // adapt actual word and language to new found hyphenation result if(xHyphWord.is()) { - m_pImpl->aActWord = String( xHyphWord->getWord() ); - m_pImpl->nActLanguage = SvxLocaleToLanguage( xHyphWord->getLocale() ); - m_pImpl->nMaxHyphenationPos = xHyphWord->getHyphenationPos(); + aActWord = String( xHyphWord->getWord() ); + nActLanguage = SvxLocaleToLanguage( xHyphWord->getLocale() ); + nMaxHyphenationPos = xHyphWord->getHyphenationPos(); InitControls_Impl(); } } else - EndDialog( RET_OK ); + m_pDialog->EndDialog( RET_OK ); } -// ----------------------------------------------------------------------- -sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl() +sal_uInt16 SvxHyphenWordDialog_Impl::GetHyphIndex_Impl() { sal_uInt16 nPos = 0; - String aTxt(m_pImpl->aWordEdit.GetText()); + String aTxt( aWordEdit.GetText() ); for ( sal_uInt16 i=0 ; i < aTxt.Len(); ++i ) { @@ -447,24 +381,22 @@ sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl() return nPos; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxHyphenWordDialog, CutHdl_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog_Impl, CutHdl_Impl, Button *, EMPTYARG ) { - if( !m_pImpl->bBusy ) + if( !bBusy ) { - m_pImpl->bBusy = sal_True; - ContinueHyph_Impl( m_pImpl->nHyphPos ); - m_pImpl->bBusy = sal_False; + bBusy = sal_True; + ContinueHyph_Impl( nHyphPos ); + bBusy = sal_False; } return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, EMPTYARG /*pButton*/ ) +IMPL_LINK( SvxHyphenWordDialog_Impl, HyphenateAllHdl_Impl, Button *, EMPTYARG /*pButton*/ ) { - if( !m_pImpl->bBusy ) + if( !bBusy ) { try { @@ -475,9 +407,9 @@ IMPL_LINK( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, EMPTYARG /*pButt aAny <<= sal_True; xProp->setPropertyValue( aName, aAny ); - m_pImpl->bBusy = sal_True; - ContinueHyph_Impl( m_pImpl->nHyphPos ); - m_pImpl->bBusy = sal_False; + bBusy = sal_True; + ContinueHyph_Impl( nHyphPos ); + bBusy = sal_False; aAny <<= sal_False; xProp->setPropertyValue( aName, aAny ); @@ -491,79 +423,166 @@ IMPL_LINK( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, EMPTYARG /*pButt return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxHyphenWordDialog, DeleteHdl_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog_Impl, DeleteHdl_Impl, Button *, EMPTYARG ) { - if( !m_pImpl->bBusy ) + if( !bBusy ) { - m_pImpl->bBusy = sal_True; + bBusy = sal_True; ContinueHyph_Impl(); - m_pImpl->bBusy = sal_False; + bBusy = sal_False; } return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxHyphenWordDialog, ContinueHdl_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog_Impl, ContinueHdl_Impl, Button *, EMPTYARG ) { - if( !m_pImpl->bBusy ) + if( !bBusy ) { - m_pImpl->bBusy = sal_True; + bBusy = sal_True; ContinueHyph_Impl( CONTINUE_HYPH ); - m_pImpl->bBusy = sal_False; + bBusy = sal_False; } return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxHyphenWordDialog, CancelHdl_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog_Impl, CancelHdl_Impl, Button *, EMPTYARG ) { - if( !m_pImpl->bBusy ) + if( !bBusy ) { - m_pImpl->bBusy = sal_True; - m_pImpl->pHyphWrapper->SpellEnd(); - EndDialog( RET_CANCEL ); - m_pImpl->bBusy = sal_False; + bBusy = sal_True; + pHyphWrapper->SpellEnd(); + m_pDialog->EndDialog( RET_CANCEL ); + bBusy = sal_False; } return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxHyphenWordDialog, Left_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog_Impl, Left_Impl, Button *, EMPTYARG ) { - if( !m_pImpl->bBusy ) + if( !bBusy ) { - m_pImpl->bBusy = sal_True; - SelLeft(); - m_pImpl->bBusy = sal_False; + bBusy = sal_True; + m_pDialog->SelLeft(); + bBusy = sal_False; } return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxHyphenWordDialog, Right_Impl, Button *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog_Impl, Right_Impl, Button *, EMPTYARG ) { - if( !m_pImpl->bBusy ) + if( !bBusy ) { - m_pImpl->bBusy = sal_True; - SelRight(); - m_pImpl->bBusy = sal_False; + bBusy = sal_True; + m_pDialog->SelRight(); + bBusy = sal_False; } return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( SvxHyphenWordDialog, GetFocusHdl_Impl, Edit *, EMPTYARG ) +IMPL_LINK( SvxHyphenWordDialog_Impl, GetFocusHdl_Impl, Edit *, EMPTYARG ) { - m_pImpl->aWordEdit.SetSelection( Selection( m_pImpl->nOldPos, m_pImpl->nOldPos + 1 ) ); + aWordEdit.SetSelection( Selection( nOldPos, nOldPos + 1 ) ); return 0; } +// class SvxHyphenWordDialog --------------------------------------------- + +SvxHyphenWordDialog::SvxHyphenWordDialog( + const String &rWord, LanguageType nLang, + Window* pParent, + uno::Reference< linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ) : + + SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_HYPHENATE ) ) +{ + m_pImpl = boost::shared_ptr< SvxHyphenWordDialog_Impl >( + new SvxHyphenWordDialog_Impl( this, rWord, nLang, xHyphen, pWrapper ) ); + + FreeResource(); + + uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pWrapper ? + pWrapper->GetLast() : uno::Reference< uno::XInterface > () , uno::UNO_QUERY ); + DBG_ASSERT( xHyphWord.is(), "missing hyphenated word" ); + m_pImpl->nMaxHyphenationPos = xHyphWord.is() ? xHyphWord->getHyphenationPos() : 0; + + m_pImpl->InitControls_Impl(); + m_pImpl->aWordEdit.GrabFocus(); + + SetWindowTitle( nLang ); + + // disable controls if service is not available + if (!m_pImpl->xHyphenator.is()) + Enable( sal_False ); +} + + +SvxHyphenWordDialog::~SvxHyphenWordDialog() +{ +} + + +void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang ) +{ + String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) ); + String aTmp( m_pImpl->aLabel ); + aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ); + aTmp.Append( aLangStr ); + aTmp.Append( sal_Unicode( ')' ) ); + SetText( aTmp ); +} + + +void SvxHyphenWordDialog::SelLeft() +{ + String aTxt( m_pImpl->aWordEdit.GetText() ); + for ( xub_StrLen i = m_pImpl->nOldPos + 1; i-- > 0 ; ) + { + DBG_ASSERT(i <= aTxt.Len(), "index out of range"); + if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) + { + aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); + + if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() ) + aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); + m_pImpl->nOldPos = i; + m_pImpl->aWordEdit.SetText( aTxt ); + m_pImpl->aWordEdit.GrabFocus(); + m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) ); + break; + } + } + m_pImpl->nHyphPos = m_pImpl->GetHyphIndex_Impl(); + m_pImpl->EnableLRBtn_Impl(); +} + + +void SvxHyphenWordDialog::SelRight() +{ + String aTxt( m_pImpl->aWordEdit.GetText() ); + for ( xub_StrLen i = m_pImpl->nOldPos + 1; i < aTxt.Len(); ++i ) + { + if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) + { + aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); + + if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() ) + aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); + m_pImpl->nOldPos = i; + m_pImpl->aWordEdit.SetText( aTxt ); + m_pImpl->aWordEdit.GrabFocus(); + m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) ); + break; + } + } + m_pImpl->nHyphPos = m_pImpl->GetHyphIndex_Impl(); + m_pImpl->EnableLRBtn_Impl(); +} + diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 0a730c4e97e5..f456832c6d16 100755 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -289,29 +289,28 @@ void ThesaurusAlternativesCtrl_Impl::Paint( const Rectangle& rRect ) // struct SvxThesaurusDialog_Impl ---------------------------------------- -SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : - m_pParent ( pParent ), - aVendorImageFI ( pParent , SVX_RES( IMG_VENDOR ) ), - aLeftBtn ( pParent, SVX_RES( BTN_LEFT ) ), - aWordText ( pParent, SVX_RES( FT_WORD ) ), - aWordCB ( pParent, SVX_RES( CB_WORD ), *this ), - m_aAlternativesText ( pParent, SVX_RES( FT_THES_ALTERNATIVES ) ), - m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( pParent, *this ) ), - aReplaceText ( pParent, SVX_RES( FT_REPL ) ), - aReplaceEdit ( pParent, SVX_RES( ED_REPL ) ), - aFL ( pParent, SVX_RES( FL_VAR ) ), - aHelpBtn ( pParent, SVX_RES( BTN_THES_HELP ) ), - aLangMBtn ( pParent, SVX_RES( MB_LANGUAGE ) ), - aReplaceBtn ( pParent, SVX_RES( BTN_THES_OK ) ), - aCancelBtn ( pParent, SVX_RES( BTN_THES_CANCEL ) ), +SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( SvxThesaurusDialog * pDialog ) : + m_pDialog ( pDialog ), + aVendorImageFI ( pDialog , SVX_RES( IMG_VENDOR ) ), + aLeftBtn ( pDialog, SVX_RES( BTN_LEFT ) ), + aWordText ( pDialog, SVX_RES( FT_WORD ) ), + aWordCB ( pDialog, SVX_RES( CB_WORD ), *this ), + m_aAlternativesText ( pDialog, SVX_RES( FT_THES_ALTERNATIVES ) ), + m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( pDialog, *this ) ), + aReplaceText ( pDialog, SVX_RES( FT_REPL ) ), + aReplaceEdit ( pDialog, SVX_RES( ED_REPL ) ), + aFL ( pDialog, SVX_RES( FL_VAR ) ), + aHelpBtn ( pDialog, SVX_RES( BTN_THES_HELP ) ), + aLangMBtn ( pDialog, SVX_RES( MB_LANGUAGE ) ), + aReplaceBtn ( pDialog, SVX_RES( BTN_THES_OK ) ), + aCancelBtn ( pDialog, SVX_RES( BTN_THES_CANCEL ) ), aErrStr ( SVX_RES( STR_ERR_TEXTNOTFOUND ) ), aVendorDefaultImage ( SVX_RES( IMG_DEFAULT_VENDOR ) ), aVendorDefaultImageHC ( SVX_RES( IMG_DEFAULT_VENDOR_HC ) ), xThesaurus ( NULL ), aLookUpText (), nLookUpLanguage ( LANGUAGE_NONE ), - m_bWordFound( false ), - pErrContext ( NULL ) + m_bWordFound( false ) { // note: FreeResource must only be called in the c-tor of SvxThesaurusDialog @@ -330,7 +329,6 @@ SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( Window* pParent ) : SvxThesaurusDialog_Impl::~SvxThesaurusDialog_Impl() { delete aLangMBtn.GetPopupMenu(); - delete pErrContext; } @@ -396,18 +394,6 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() } -void SvxThesaurusDialog_Impl::SetWindowTitle( LanguageType nLanguage ) -{ - // Sprache anpassen - String aStr( m_pParent->GetText() ); - aStr.Erase( aStr.Search( sal_Unicode( '(' ) ) - 1 ); - aStr.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ) ); - aStr += GetLanguageString( (LanguageType) nLanguage ); - aStr.Append( sal_Unicode( ')' ) ); - m_pParent->SetText( aStr ); // set window title -} - - void SvxThesaurusDialog_Impl::LookUp( const String &rText ) { if (rText != aWordCB.GetText()) // avoid moving of the cursor if the text is the same @@ -440,7 +426,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); if (xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) nLookUpLanguage = nLang; - SetWindowTitle( nLang ); + m_pDialog->SetWindowTitle( nLang ); UpdateVendorImage(); LookUp_Impl(); } @@ -588,7 +574,7 @@ static String lcl_GetThesImplName( const lang::Locale &rLocale ) void SvxThesaurusDialog_Impl::UpdateVendorImage() { - m_pParent->SetUpdateMode( sal_False ); + m_pDialog->SetUpdateMode( sal_False ); SvtLinguConfig aCfg; if (aCfg.HasVendorImages( "ThesaurusDialogImage" )) @@ -605,13 +591,13 @@ void SvxThesaurusDialog_Impl::UpdateVendorImage() aVendorImageFI.SetImage( aImage ); } - m_pParent->SetUpdateMode( sal_True ); + m_pDialog->SetUpdateMode( sal_True ); } IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl *, EMPTYARG ) { - pThis->m_pParent->SetUpdateMode( sal_False ); + pThis->m_pDialog->SetUpdateMode( sal_False ); SvtLinguConfig aCfg; if (aCfg.HasVendorImages( "ThesaurusDialogImage" )) @@ -656,14 +642,14 @@ IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialo aControls[nControl]->SetPosPixel(aPos); ++nControl; } - Size aDlgSize = pThis->m_pParent->GetSizePixel(); + Size aDlgSize = pThis->m_pDialog->GetSizePixel(); aDlgSize.Height() += nDiff; - pThis->m_pParent->SetSizePixel( aDlgSize ); - pThis->m_pParent->Invalidate(); + pThis->m_pDialog->SetSizePixel( aDlgSize ); + pThis->m_pDialog->Invalidate(); } pThis->UpdateVendorImage(); - pThis->m_pParent->SetUpdateMode( sal_True ); + pThis->m_pDialog->SetUpdateMode( sal_True ); return 0; }; @@ -686,8 +672,6 @@ SvxThesaurusDialog::SvxThesaurusDialog( m_pImpl->nLookUpLanguage = nLanguage; if (rWord.Len() > 0) m_pImpl->aLookUpHistory.push( rWord ); - m_pImpl->pErrContext = new SfxErrorContext( ERRCTX_SVX_LINGU_THESAURUS, String(), this, - RID_SVXERRCTX, &DIALOG_MGR() ); FreeResource(); @@ -698,8 +682,6 @@ SvxThesaurusDialog::SvxThesaurusDialog( m_pImpl->aReplaceEdit.SetText( aTmp2 ); m_pImpl->aWordCB.InsertEntry( aTmp2 ); - m_pImpl->SetWindowTitle( nLanguage ); - m_pImpl->LookUp( aTmp2 ); m_pImpl->m_pAlternativesCT->GrabFocus(); m_pImpl->aLeftBtn.Enable( sal_False ); @@ -726,6 +708,8 @@ SvxThesaurusDialog::SvxThesaurusDialog( pMenu->InsertItem( (USHORT)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0 m_pImpl->aLangMBtn.SetPopupMenu( pMenu ); + SetWindowTitle( nLanguage ); + // disable controls if service is missing if (!m_pImpl->xThesaurus.is()) Enable( sal_False ); @@ -737,6 +721,18 @@ SvxThesaurusDialog::~SvxThesaurusDialog() } +void SvxThesaurusDialog::SetWindowTitle( LanguageType nLanguage ) +{ + // Sprache anpassen + String aStr( GetText() ); + aStr.Erase( aStr.Search( sal_Unicode( '(' ) ) - 1 ); + aStr.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ) ); + aStr += SvtLanguageTable().GetLanguageString( nLanguage ); + aStr.Append( sal_Unicode( ')' ) ); + SetText( aStr ); // set window title +} + + String SvxThesaurusDialog::GetWord() { return m_pImpl->aReplaceEdit.GetText(); diff --git a/cui/source/dialogs/thesdlg.src b/cui/source/dialogs/thesdlg.src index bec4ef14c261..f821ab637fdc 100755 --- a/cui/source/dialogs/thesdlg.src +++ b/cui/source/dialogs/thesdlg.src @@ -24,13 +24,12 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - // include --------------------------------------------------------------- + #include "cuires.hrc" #include "thesdlg.hrc" #include "helpid.hrc" #include // SID_THESAURUS -// pragma ---------------------------------------------------------------- // RID_SVXDLG_THES ------------------------------------------------------- ModalDialog RID_SVXDLG_THESAURUS @@ -85,7 +84,7 @@ ModalDialog RID_SVXDLG_THESAURUS }; Control CT_THES_ALTERNATIVES { - HelpID = HID_CT_THES_ALTERNATIVES ; +// HelpID = HID_CT_THES_ALTERNATIVES ; Pos = MAP_APPFONT ( 5 , 45 ) ; Size = MAP_APPFONT ( 225 , 121 ) ; Border = TRUE; diff --git a/cui/source/dialogs/thesdlg_impl.hxx b/cui/source/dialogs/thesdlg_impl.hxx index 354bc95c09db..70ce91391456 100755 --- a/cui/source/dialogs/thesdlg_impl.hxx +++ b/cui/source/dialogs/thesdlg_impl.hxx @@ -31,9 +31,10 @@ #ifndef _SVX_THESDLG_IMPL_HXX #define _SVX_THESDLG_IMPL_HXX -#include -#include +#include "thesdlg.hxx" +#include +#include #include #include #include @@ -162,7 +163,7 @@ public: struct SvxThesaurusDialog_Impl { - Window * m_pParent; + SvxThesaurusDialog * m_pDialog; FixedImage aVendorImageFI; ImageButton aLeftBtn; @@ -188,8 +189,6 @@ struct SvxThesaurusDialog_Impl std::stack< OUString > aLookUpHistory; bool m_bWordFound; - SfxErrorContext* pErrContext; // error context while dfalog is opened - // Handler DECL_LINK( LeftBtnHdl_Impl, Button * ); @@ -203,7 +202,7 @@ struct SvxThesaurusDialog_Impl DECL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl * ); - SvxThesaurusDialog_Impl( Window* pParent ); + SvxThesaurusDialog_Impl( SvxThesaurusDialog * pDialog ); ~SvxThesaurusDialog_Impl(); uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL @@ -211,7 +210,6 @@ struct SvxThesaurusDialog_Impl bool UpdateAlternativesBox_Impl(); void UpdateVendorImage(); - void SetWindowTitle( LanguageType nLanguage ); void LookUp( const String &rText ); void LookUp_Impl(); }; diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx index a413467f32b2..48f4a31705d0 100755 --- a/cui/source/inc/hyphen.hxx +++ b/cui/source/inc/hyphen.hxx @@ -66,31 +66,14 @@ class SvxHyphenWordDialog : public SfxModalDialog { boost::shared_ptr< SvxHyphenWordDialog_Impl > m_pImpl; -#ifdef _SVX_HYPHEN_CXX - void EnableLRBtn_Impl(); - void SetLabel_Impl( LanguageType nLang ); - String EraseUnusableHyphens_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 nMaxHyphenationPos ); - - void InitControls_Impl(); - void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 ); - sal_uInt16 GetHyphIndex_Impl(); - - DECL_LINK( Left_Impl, Button* ); - DECL_LINK( Right_Impl, Button* ); - DECL_LINK( CutHdl_Impl, Button* ); - DECL_LINK( ContinueHdl_Impl, Button* ); - DECL_LINK( DeleteHdl_Impl, Button* ); - DECL_LINK( HyphenateAllHdl_Impl, Button* ); - DECL_LINK( CancelHdl_Impl, Button* ); - DECL_LINK( GetFocusHdl_Impl, Edit* ); -#endif - public: SvxHyphenWordDialog( const String &rWord, LanguageType nLang, Window* pParent, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper ); + virtual ~SvxHyphenWordDialog(); + void SetWindowTitle( LanguageType nLang ); void SelLeft(); void SelRight(); }; diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx index 9ab865072ce9..f5d0bd91b584 100755 --- a/cui/source/inc/thesdlg.hxx +++ b/cui/source/inc/thesdlg.hxx @@ -52,6 +52,7 @@ public: const String &rWord, LanguageType nLanguage ); ~SvxThesaurusDialog(); + void SetWindowTitle( LanguageType nLanguage ); String GetWord(); sal_uInt16 GetLanguage() const; }; -- cgit v1.2.3 From 40ce8f33c47d06fd1fd8dc2ba866e15e09cf6cf1 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 1 Mar 2010 12:00:01 +0100 Subject: cws tl74: include statements fixed --- sw/source/ui/shells/drwtxtex.cxx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 23a466b54208..c95ad7e64c1c 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -85,23 +85,23 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include -- cgit v1.2.3 From 4f4953cc81732f87959998cb6afd7ccede3ff803 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 5 Mar 2010 13:36:31 +0100 Subject: cws tl74: #i107721#, #i108358# fixed broken SVX_RES to CUI_RES after merging to m73 where those dialogs got moved to cui project --- cui/source/dialogs/hyphen.cxx | 26 ++++++++++++------------ cui/source/dialogs/thesdlg.cxx | 46 ++++++++++++++++++------------------------ cui/source/inc/hyphen.hxx | 4 ++-- cui/source/inc/thesdlg.hxx | 4 ++-- 4 files changed, 37 insertions(+), 43 deletions(-) diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 5095593fd7fe..08bb656fe82b 100755 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -157,17 +157,17 @@ SvxHyphenWordDialog_Impl::SvxHyphenWordDialog_Impl( SvxSpellWrapper* pWrapper ) : m_pDialog ( pDialog ), - aWordFT ( pDialog, SVX_RES( FT_WORD ) ), - aWordEdit ( pDialog, SVX_RES( ED_WORD ) ), - aLeftBtn ( pDialog, SVX_RES( BTN_LEFT ) ), - aRightBtn ( pDialog, SVX_RES( BTN_RIGHT ) ), - aOkBtn ( pDialog, SVX_RES( BTN_HYPH_CUT ) ), - aContBtn ( pDialog, SVX_RES( BTN_HYPH_CONTINUE ) ), - aDelBtn ( pDialog, SVX_RES( BTN_HYPH_DELETE ) ), - aFLBottom ( pDialog, SVX_RES( FL_BOTTOM ) ), - aHelpBtn ( pDialog, SVX_RES( BTN_HYPH_HELP ) ), - aHyphAll ( pDialog, SVX_RES( BTN_HYPH_ALL ) ), - aCancelBtn ( pDialog, SVX_RES( BTN_HYPH_CANCEL ) ), + aWordFT ( pDialog, CUI_RES( FT_WORD ) ), + aWordEdit ( pDialog, CUI_RES( ED_WORD ) ), + aLeftBtn ( pDialog, CUI_RES( BTN_LEFT ) ), + aRightBtn ( pDialog, CUI_RES( BTN_RIGHT ) ), + aOkBtn ( pDialog, CUI_RES( BTN_HYPH_CUT ) ), + aContBtn ( pDialog, CUI_RES( BTN_HYPH_CONTINUE ) ), + aDelBtn ( pDialog, CUI_RES( BTN_HYPH_DELETE ) ), + aFLBottom ( pDialog, CUI_RES( FL_BOTTOM ) ), + aHelpBtn ( pDialog, CUI_RES( BTN_HYPH_HELP ) ), + aHyphAll ( pDialog, CUI_RES( BTN_HYPH_ALL ) ), + aCancelBtn ( pDialog, CUI_RES( BTN_HYPH_CANCEL ) ), aLabel ( pDialog->GetText() ), pHyphWrapper ( NULL ), xHyphenator ( NULL ), @@ -500,9 +500,9 @@ SvxHyphenWordDialog::SvxHyphenWordDialog( uno::Reference< linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper ) : - SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_HYPHENATE ) ) + SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_HYPHENATE ) ) { - m_pImpl = boost::shared_ptr< SvxHyphenWordDialog_Impl >( + m_pImpl = std::auto_ptr< SvxHyphenWordDialog_Impl >( new SvxHyphenWordDialog_Impl( this, rWord, nLang, xHyphen, pWrapper ) ); FreeResource(); diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index f456832c6d16..bf617b126747 100755 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -29,17 +29,11 @@ #include "precompiled_cui.hxx" -#include "cuires.hrc" #include "thesdlg.hrc" #include "thesdlg.hxx" #include "thesdlg_impl.hxx" - -//#include -//#include -//#include -//#include -//#include -//#include +#include "cuires.hrc" +#include "dialmgr.hxx" #include #include @@ -203,7 +197,7 @@ void AlternativesString_Impl::Paint( ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl( Window* pParent, SvxThesaurusDialog_Impl &rImpl ) : - SvxCheckListBox( pParent, SVX_RES( CT_THES_ALTERNATIVES ) ), + SvxCheckListBox( pParent, CUI_RES( CT_THES_ALTERNATIVES ) ), m_rDialogImpl( rImpl ) { SetWindowBits( WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE ); @@ -291,22 +285,22 @@ void ThesaurusAlternativesCtrl_Impl::Paint( const Rectangle& rRect ) SvxThesaurusDialog_Impl::SvxThesaurusDialog_Impl( SvxThesaurusDialog * pDialog ) : m_pDialog ( pDialog ), - aVendorImageFI ( pDialog , SVX_RES( IMG_VENDOR ) ), - aLeftBtn ( pDialog, SVX_RES( BTN_LEFT ) ), - aWordText ( pDialog, SVX_RES( FT_WORD ) ), - aWordCB ( pDialog, SVX_RES( CB_WORD ), *this ), - m_aAlternativesText ( pDialog, SVX_RES( FT_THES_ALTERNATIVES ) ), + aVendorImageFI ( pDialog, CUI_RES( IMG_VENDOR ) ), + aLeftBtn ( pDialog, CUI_RES( BTN_LEFT ) ), + aWordText ( pDialog, CUI_RES( FT_WORD ) ), + aWordCB ( pDialog, CUI_RES( CB_WORD ), *this ), + m_aAlternativesText ( pDialog, CUI_RES( FT_THES_ALTERNATIVES ) ), m_pAlternativesCT ( new ThesaurusAlternativesCtrl_Impl( pDialog, *this ) ), - aReplaceText ( pDialog, SVX_RES( FT_REPL ) ), - aReplaceEdit ( pDialog, SVX_RES( ED_REPL ) ), - aFL ( pDialog, SVX_RES( FL_VAR ) ), - aHelpBtn ( pDialog, SVX_RES( BTN_THES_HELP ) ), - aLangMBtn ( pDialog, SVX_RES( MB_LANGUAGE ) ), - aReplaceBtn ( pDialog, SVX_RES( BTN_THES_OK ) ), - aCancelBtn ( pDialog, SVX_RES( BTN_THES_CANCEL ) ), - aErrStr ( SVX_RES( STR_ERR_TEXTNOTFOUND ) ), - aVendorDefaultImage ( SVX_RES( IMG_DEFAULT_VENDOR ) ), - aVendorDefaultImageHC ( SVX_RES( IMG_DEFAULT_VENDOR_HC ) ), + aReplaceText ( pDialog, CUI_RES( FT_REPL ) ), + aReplaceEdit ( pDialog, CUI_RES( ED_REPL ) ), + aFL ( pDialog, CUI_RES( FL_VAR ) ), + aHelpBtn ( pDialog, CUI_RES( BTN_THES_HELP ) ), + aLangMBtn ( pDialog, CUI_RES( MB_LANGUAGE ) ), + aReplaceBtn ( pDialog, CUI_RES( BTN_THES_OK ) ), + aCancelBtn ( pDialog, CUI_RES( BTN_THES_CANCEL ) ), + aErrStr ( CUI_RES( STR_ERR_TEXTNOTFOUND ) ), + aVendorDefaultImage ( CUI_RES( IMG_DEFAULT_VENDOR ) ), + aVendorDefaultImageHC ( CUI_RES( IMG_DEFAULT_VENDOR_HC ) ), xThesaurus ( NULL ), aLookUpText (), nLookUpLanguage ( LANGUAGE_NONE ), @@ -663,9 +657,9 @@ SvxThesaurusDialog::SvxThesaurusDialog( const String &rWord, LanguageType nLanguage ) : - SvxStandardDialog( pParent, SVX_RES( RID_SVXDLG_THESAURUS ) ) + SvxStandardDialog( pParent, CUI_RES( RID_SVXDLG_THESAURUS ) ) { - m_pImpl = boost::shared_ptr< SvxThesaurusDialog_Impl >(new SvxThesaurusDialog_Impl( this )); + m_pImpl = std::auto_ptr< SvxThesaurusDialog_Impl >(new SvxThesaurusDialog_Impl( this )); m_pImpl->xThesaurus = xThes; m_pImpl->aLookUpText = OUString( rWord ); diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx index 48f4a31705d0..e28150ea7e4a 100755 --- a/cui/source/inc/hyphen.hxx +++ b/cui/source/inc/hyphen.hxx @@ -29,7 +29,7 @@ // include --------------------------------------------------------------- -#include +#include #include #include @@ -64,7 +64,7 @@ struct SvxHyphenWordDialog_Impl; class SvxHyphenWordDialog : public SfxModalDialog { - boost::shared_ptr< SvxHyphenWordDialog_Impl > m_pImpl; + std::auto_ptr< SvxHyphenWordDialog_Impl > m_pImpl; public: SvxHyphenWordDialog( const String &rWord, LanguageType nLang, diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx index f5d0bd91b584..99b292b560a5 100755 --- a/cui/source/inc/thesdlg.hxx +++ b/cui/source/inc/thesdlg.hxx @@ -33,7 +33,7 @@ #include "svx/stddlg.hxx" #include "svx/svxdllapi.h" -#include +#include ///////////////////////////////////////////////////////////////// @@ -42,7 +42,7 @@ struct SvxThesaurusDialog_Impl; class SvxThesaurusDialog : public SvxStandardDialog { - boost::shared_ptr< SvxThesaurusDialog_Impl > m_pImpl; + std::auto_ptr< SvxThesaurusDialog_Impl > m_pImpl; SVX_DLLPRIVATE virtual void Apply(); -- cgit v1.2.3 From 22dd3c5a20d4816861f931cb0d12dd372f375ef5 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 5 Mar 2010 11:29:20 -0500 Subject: koheiextref01: Turned several functions const because they don't modify the states of the classes. --- sc/inc/document.hxx | 2 +- sc/inc/table.hxx | 2 +- sc/source/core/data/document.cxx | 7 +++---- sc/source/core/data/table1.cxx | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index cc575b529d73..e4782921ad63 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -869,7 +869,7 @@ public: bool ShrinkToDataArea(SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow) const; void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, - SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld ); + SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld ) const; SC_DLLPUBLIC BOOL GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; SC_DLLPUBLIC BOOL GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; SC_DLLPUBLIC BOOL GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index f400054d00b7..940d8c8d7c27 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -377,7 +377,7 @@ public: SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW nEndRow ); void GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, - BOOL bIncludeOld ); + BOOL bIncludeOld ) const; SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ); diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 3f6b50df29e6..00f3443d6d74 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -673,11 +673,10 @@ bool ScDocument::ShrinkToDataArea(SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow // zusammenhaengender Bereich void ScDocument::GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, - SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld ) + SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld ) const { - if (VALIDTAB(nTab)) - if (pTab[nTab]) - pTab[nTab]->GetDataArea( rStartCol, rStartRow, rEndCol, rEndRow, bIncludeOld ); + if (ValidTab(nTab) && pTab[nTab]) + pTab[nTab]->GetDataArea( rStartCol, rStartRow, rEndCol, rEndRow, bIncludeOld ); } diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 403377342661..d75bac9a0250 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -685,7 +685,7 @@ BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const } void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, - BOOL bIncludeOld ) + BOOL bIncludeOld ) const { BOOL bLeft = FALSE; BOOL bRight = FALSE; -- cgit v1.2.3 From 52e051137d21cb120458b3cb724d87cc4f82cd87 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 5 Mar 2010 18:23:10 -0500 Subject: koheiextref01: I forgot to initialize data members properly. --- sc/source/core/tool/queryparam.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index 47418ec85f4d..5b3b92f78ee4 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -171,7 +171,11 @@ ScQueryParamTable::~ScQueryParamTable() ScQueryParam::ScQueryParam() : ScQueryParamBase(), - ScQueryParamTable() + ScQueryParamTable(), + bDestPers(true), + nDestTab(0), + nDestCol(0), + nDestRow(0) { Clear(); } -- cgit v1.2.3 From 9d4941e4559e07f7aab2b7eacb95788ffeb4c94b Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 5 Mar 2010 19:43:26 -0500 Subject: koheiextref01: #i103739# #i109170# Breaking links permanently turn formula cells into static cells, to prevent the links from being generated again upon reload. Also simplified the mechanism of tracking formula cells containing external references. The new way works better, more reliable and less code. --- sc/inc/externalrefmgr.hxx | 85 +------- sc/source/core/data/cell.cxx | 4 + sc/source/core/data/cell2.cxx | 11 - sc/source/core/data/documen2.cxx | 8 - sc/source/core/data/document.cxx | 9 - sc/source/ui/docshell/externalrefmgr.cxx | 339 ++++++++----------------------- 6 files changed, 98 insertions(+), 358 deletions(-) diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index cb002753f6c3..db0366f37e53 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -43,6 +43,7 @@ #include #include #include +#include #include class ScDocument; @@ -56,6 +57,7 @@ class ScTokenArray; class String; class SfxObjectShellRef; class Window; +class ScFormulaCell; class ScExternalRefCache; @@ -351,58 +353,8 @@ class SC_DLLPUBLIC ScExternalRefManager : public formula::ExternalReferenceHelpe { public: - // SUNWS needs a forward declared friend, otherwise types and members - // of the outer class are not accessible. - class RefCells; - friend class ScExternalRefManager::RefCells; - - /** - * Collection of cell addresses that contain external references. This - * data is used for link updates. - */ - class RefCells - { - public: - RefCells(); - ~RefCells(); - - void insertCell(const ScAddress& rAddr); - void removeCell(const ScAddress& rAddr); - void moveTable(SCTAB nOldTab, SCTAB nNewTab, bool bCopy); - void insertTable(SCTAB nPos); - void removeTable(SCTAB nPos); - void refreshAllCells(ScExternalRefManager& rRefMgr); - private: - - typedef ::std::hash_set RowSet; - typedef ::std::hash_map ColSet; - - // SUNWS needs a forward declared friend, otherwise types and members - // of the outer class are not accessible. - struct TabItem; - friend struct ScExternalRefManager::RefCells::TabItem; - - struct TabItem - { - SCTAB mnIndex; - ColSet maCols; - explicit TabItem(SCTAB nIndex); - explicit TabItem(const TabItem& r); - }; - typedef ::boost::shared_ptr TabItemRef; - - /** - * Return the position that points either to the specified table - * position or to the position where a new table would be inserted in - * case the specified table is not present. - * - * @param nTab index of the desired table - */ - ::std::list::iterator getTabPos(SCTAB nTab); - - // This list must be sorted by the table index at all times. - ::std::list maTables; - }; + typedef ::std::set RefCellSet; + typedef ::std::hash_map RefCellMap; enum LinkUpdateType { LINK_MODIFIED, LINK_BROKEN }; @@ -438,7 +390,6 @@ private: typedef ::std::hash_map DocShellMap; typedef ::std::hash_map LinkedDocMap; - typedef ::std::hash_map RefCellMap; typedef ::std::hash_map NumFmtMap; @@ -665,32 +616,12 @@ public: void resetSrcFileData(const String& rBaseFileUrl); /** - * Update a single referencing cell position. + * Stop tracking a specific formula cell. * - * @param rOldPos old position - * @param rNewPos new position + * @param pCell pointer to cell that formerly contained external + * reference. */ - void updateRefCell(const ScAddress& rOldPos, const ScAddress& rNewPos, bool bCopy); - - /** - * Update referencing cells affected by sheet movement. - * - * @param nOldTab old sheet position - * @param nNewTab new sheet position - * @param bCopy whether this is a sheet move (false) or sheet copy (true) - */ - void updateRefMoveTable(SCTAB nOldTab, SCTAB nNewTab, bool bCopy); - - /** - * Update referencing cells affected by sheet insertion. - * - * @param nPos sheet insertion position. All sheets to the right - * including the one at the insertion poistion shift to the - * right by one. - */ - void updateRefInsertTable(SCTAB nPos); - - void updateRefDeleteTable(SCTAB nPos); + void removeRefCell(ScFormulaCell* pCell); /** * Register a new link listener to a specified external document. Note diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index 56be361f6d38..a70a9b86e186 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -819,6 +819,10 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons ScFormulaCell::~ScFormulaCell() { pDocument->RemoveFromFormulaTree( this ); + + if (pDocument->HasExternalRefManager()) + pDocument->GetExternalRefManager()->removeRefCell(this); + delete pCode; #ifdef DBG_UTIL eCellType = CELLTYPE_DESTROYED; diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx index 9a3670d2a9e0..fea255cf185c 100644 --- a/sc/source/core/data/cell2.cxx +++ b/sc/source/core/data/cell2.cxx @@ -1036,17 +1036,6 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode, delete pOld; } - - pCode->Reset(); - for ( formula::FormulaToken* t = pCode->GetNextReferenceOrName(); t; t = pCode->GetNextReferenceOrName() ) - { - StackVar sv = t->GetType(); - if (sv == svExternalSingleRef || sv == svExternalDoubleRef || sv == svExternalName) - { - pDocument->GetExternalRefManager()->updateRefCell(aOldPos, aPos, eUpdateRefMode == URM_COPY); - break; - } - } } void ScFormulaCell::UpdateInsertTab(SCTAB nTable) diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index c08fb7a10228..2b5dd03703c0 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -803,10 +803,6 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos ) if (pDrawLayer) DrawMovePage( static_cast(nOldPos), static_cast(nNewPos) ); - // Update cells containing external references. - if (pExternalRefMgr.get()) - pExternalRefMgr->updateRefMoveTable(nOldPos, nNewPos, false); - bValid = TRUE; } } @@ -924,10 +920,6 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM pTab[nNewPos]->SetPageStyle( pTab[nOldPos]->GetPageStyle() ); pTab[nNewPos]->SetPendingRowHeights( pTab[nOldPos]->IsPendingRowHeights() ); - - // Update cells containing external references. - if (pExternalRefMgr.get()) - pExternalRefMgr->updateRefMoveTable(nOldPos, nNewPos, true); } else SetAutoCalc( bOldAutoCalc ); diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 7ed87ee2d74c..ade881b77671 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -374,10 +374,6 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName, if ( pChartListenerCollection ) pChartListenerCollection->UpdateScheduledSeriesRanges(); - // Update cells containing external references. - if (pExternalRefMgr.get()) - pExternalRefMgr->updateRefInsertTable(nPos); - SetDirty(); bValid = TRUE; } @@ -466,11 +462,6 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc ) // #81844# sheet names of references are not valid until sheet is deleted pChartListenerCollection->UpdateScheduledSeriesRanges(); - - // Update cells containing external references. - if (pExternalRefMgr.get()) - pExternalRefMgr->updateRefDeleteTable(nTab); - SetAutoCalc( bOldAutoCalc ); bValid = TRUE; } diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 85b7c73bd649..c062593beea9 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -137,6 +137,71 @@ private: ScExternalRefManager::LinkUpdateType meType; }; +struct UpdateFormulaCell : public unary_function +{ + void operator() (ScFormulaCell* pCell) const + { + // Check to make sure the cell really contains ocExternalRef. + // External names, external cell and range references all have a + // ocExternalRef token. + const ScTokenArray* pCode = pCell->GetCode(); + if (!pCode->HasOpCode( ocExternalRef)) + return; + + ScTokenArray* pArray = pCell->GetCode(); + if (pArray) + // Clear the error code, or a cell with error won't get re-compiled. + pArray->SetCodeError(0); + + pCell->SetCompile(true); + pCell->CompileTokenArray(); + pCell->SetDirty(); + } +}; + +class RemoveFormulaCell : public unary_function, void> +{ +public: + explicit RemoveFormulaCell(ScFormulaCell* p) : mpCell(p) {} + void operator() (pair& r) const + { + r.second.erase(mpCell); + } +private: + ScFormulaCell* mpCell; +}; + +class ConvertFormulaToStatic : public unary_function +{ +public: + explicit ConvertFormulaToStatic(ScDocument* pDoc) : mpDoc(pDoc) {} + void operator() (ScFormulaCell* pCell) const + { + String aStr; + pCell->aPos.Format(aStr, SCA_VALID); + ScAddress aPos = pCell->aPos; + + // We don't check for empty cells because empty external cells are + // treated as having a value of 0. + + if (pCell->IsValue()) + { + // Turn this into value cell. + double fVal = pCell->GetValue(); + mpDoc->PutCell(aPos, new ScValueCell(fVal)); + } + else + { + // string cell otherwise. + String aVal; + pCell->GetString(aVal); + mpDoc->PutCell(aPos, new ScStringCell(aVal)); + } + } +private: + ScDocument* mpDoc; +}; + } // ============================================================================ @@ -1414,230 +1479,6 @@ ScExternalRefCache::TableTypeRef ScExternalRefManager::getCacheTable(sal_uInt16 // ============================================================================ -ScExternalRefManager::RefCells::TabItem::TabItem(SCTAB nIndex) : - mnIndex(nIndex) -{ -} - -ScExternalRefManager::RefCells::TabItem::TabItem(const TabItem& r) : - mnIndex(r.mnIndex), - maCols(r.maCols) -{ -} - -ScExternalRefManager::RefCells::RefCells() -{ -} - -ScExternalRefManager::RefCells::~RefCells() -{ -} - -list::iterator ScExternalRefManager::RefCells::getTabPos(SCTAB nTab) -{ - list::iterator itr = maTables.begin(), itrEnd = maTables.end(); - for (; itr != itrEnd; ++itr) - if ((*itr)->mnIndex >= nTab) - return itr; - // Not found. return the end position. - return itrEnd; -} - -void ScExternalRefManager::RefCells::insertCell(const ScAddress& rAddr) -{ - SCTAB nTab = rAddr.Tab(); - SCCOL nCol = rAddr.Col(); - SCROW nRow = rAddr.Row(); - - // Search by table index. - list::iterator itrTab = getTabPos(nTab); - TabItemRef xTabRef; - if (itrTab == maTables.end()) - { - // All previous tables come before the specificed table. - xTabRef.reset(new TabItem(nTab)); - maTables.push_back(xTabRef); - } - else if ((*itrTab)->mnIndex > nTab) - { - // Insert at the current iterator position. - xTabRef.reset(new TabItem(nTab)); - maTables.insert(itrTab, xTabRef); - } - else if ((*itrTab)->mnIndex == nTab) - { - // The table found. - xTabRef = *itrTab; - } - ColSet& rCols = xTabRef->maCols; - - // Then by column index. - ColSet::iterator itrCol = rCols.find(nCol); - if (itrCol == rCols.end()) - { - RowSet aRows; - pair r = rCols.insert(ColSet::value_type(nCol, aRows)); - if (!r.second) - // column insertion failed. - return; - itrCol = r.first; - } - RowSet& rRows = itrCol->second; - - // Finally, insert the row index. - rRows.insert(nRow); -} - -void ScExternalRefManager::RefCells::removeCell(const ScAddress& rAddr) -{ - SCTAB nTab = rAddr.Tab(); - SCCOL nCol = rAddr.Col(); - SCROW nRow = rAddr.Row(); - - // Search by table index. - list::iterator itrTab = getTabPos(nTab); - if (itrTab == maTables.end() || (*itrTab)->mnIndex != nTab) - // No such table. - return; - - ColSet& rCols = (*itrTab)->maCols; - - // Then by column index. - ColSet::iterator itrCol = rCols.find(nCol); - if (itrCol == rCols.end()) - // No such column - return; - - RowSet& rRows = itrCol->second; - rRows.erase(nRow); -} - -void ScExternalRefManager::RefCells::moveTable(SCTAB nOldTab, SCTAB nNewTab, bool bCopy) -{ - if (nOldTab == nNewTab) - // Nothing to do here. - return; - - list::iterator itrOld = getTabPos(nOldTab); - if (itrOld == maTables.end() || (*itrOld)->mnIndex != nOldTab) - // No table to move or copy. - return; - - list::iterator itrNew = getTabPos(nNewTab); - if (bCopy) - { - // Simply make a duplicate of the original table, insert it at the - // new tab position, and increment the table index for all tables - // that come after that inserted table. - - TabItemRef xNewTab(new TabItem(*(*itrOld))); - xNewTab->mnIndex = nNewTab; - maTables.insert(itrNew, xNewTab); - list::iterator itr = itrNew, itrEnd = maTables.end(); - if (itr != itrEnd) // #i99807# check that itr is not at end already - for (++itr; itr != itrEnd; ++itr) - (*itr)->mnIndex += 1; - } - else - { - if (itrOld == itrNew) - { - // No need to move the table. Just update the table index. - (*itrOld)->mnIndex = nNewTab; - return; - } - - if (nOldTab < nNewTab) - { - // Iterate from the old tab position to the new tab position (not - // inclusive of the old tab itself), and decrement their tab - // index by one. - list::iterator itr = itrOld; - for (++itr; itr != itrNew; ++itr) - (*itr)->mnIndex -= 1; - - // Insert a duplicate of the original table. This does not - // invalidate the iterators. - (*itrOld)->mnIndex = nNewTab - 1; - if (itrNew == maTables.end()) - maTables.push_back(*itrOld); - else - maTables.insert(itrNew, *itrOld); - - // Remove the original table. - maTables.erase(itrOld); - } - else - { - // nNewTab < nOldTab - - // Iterate from the new tab position to the one before the old tab - // position, and increment their tab index by one. - list::iterator itr = itrNew; - for (++itr; itr != itrOld; ++itr) - (*itr)->mnIndex += 1; - - (*itrOld)->mnIndex = nNewTab; - maTables.insert(itrNew, *itrOld); - - // Remove the original table. - maTables.erase(itrOld); - } - } -} - -void ScExternalRefManager::RefCells::insertTable(SCTAB nPos) -{ - TabItemRef xNewTab(new TabItem(nPos)); - list::iterator itr = getTabPos(nPos); - if (itr == maTables.end()) - maTables.push_back(xNewTab); - else - maTables.insert(itr, xNewTab); -} - -void ScExternalRefManager::RefCells::removeTable(SCTAB nPos) -{ - list::iterator itr = getTabPos(nPos); - if (itr == maTables.end()) - // nothing to remove. - return; - - maTables.erase(itr); -} - -void ScExternalRefManager::RefCells::refreshAllCells(ScExternalRefManager& rRefMgr) -{ - // Get ALL the cell positions for re-compilation. - for (list::iterator itrTab = maTables.begin(), itrTabEnd = maTables.end(); - itrTab != itrTabEnd; ++itrTab) - { - SCTAB nTab = (*itrTab)->mnIndex; - ColSet& rCols = (*itrTab)->maCols; - for (ColSet::iterator itrCol = rCols.begin(), itrColEnd = rCols.end(); - itrCol != itrColEnd; ++itrCol) - { - SCCOL nCol = itrCol->first; - RowSet& rRows = itrCol->second; - RowSet aNewRows; - for (RowSet::iterator itrRow = rRows.begin(), itrRowEnd = rRows.end(); - itrRow != itrRowEnd; ++itrRow) - { - SCROW nRow = *itrRow; - ScAddress aCell(nCol, nRow, nTab); - if (rRefMgr.compileTokensByCell(aCell)) - // This cell still contains an external refernce. - aNewRows.insert(nRow); - } - // Update the rows so that cells with no external references are - // no longer tracked. - rRows.swap(aNewRows); - } - } -} - -// ---------------------------------------------------------------------------- - ScExternalRefManager::LinkListener::LinkListener() { } @@ -1982,8 +1823,8 @@ void ScExternalRefManager::refreshAllRefCells(sal_uInt16 nFileId) if (itrFile == maRefCells.end()) return; - RefCells& rRefCells = itrFile->second; - rRefCells.refreshAllCells(*this); + RefCellSet& rRefCells = itrFile->second; + for_each(rRefCells.begin(), rRefCells.end(), UpdateFormulaCell()); ScViewData* pViewData = ScDocShell::GetViewData(); if (!pViewData) @@ -2004,7 +1845,7 @@ void ScExternalRefManager::insertRefCell(sal_uInt16 nFileId, const ScAddress& rC RefCellMap::iterator itr = maRefCells.find(nFileId); if (itr == maRefCells.end()) { - RefCells aRefCells; + RefCellSet aRefCells; pair r = maRefCells.insert( RefCellMap::value_type(nFileId, aRefCells)); if (!r.second) @@ -2013,7 +1854,10 @@ void ScExternalRefManager::insertRefCell(sal_uInt16 nFileId, const ScAddress& rC itr = r.first; } - itr->second.insertCell(rCell); + + ScBaseCell* pCell = mpDoc->GetCell(rCell); + if (pCell && pCell->GetCellType() == CELLTYPE_FORMULA) + itr->second.insert(static_cast(pCell)); } ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId) @@ -2349,6 +2193,18 @@ void ScExternalRefManager::refreshNames(sal_uInt16 nFileId) void ScExternalRefManager::breakLink(sal_uInt16 nFileId) { + // Turn all formula cells referencing this external document into static + // cells. + RefCellMap::iterator itrRefs = maRefCells.find(nFileId); + if (itrRefs != maRefCells.end()) + { + // Make a copy because removing the formula cells below will modify + // the original container. + RefCellSet aSet = itrRefs->second; + for_each(aSet.begin(), aSet.end(), ConvertFormulaToStatic(mpDoc)); + maRefCells.erase(nFileId); + } + lcl_removeByFileId(nFileId, maDocShells); if (maDocShells.empty()) @@ -2420,32 +2276,9 @@ void ScExternalRefManager::resetSrcFileData(const String& rBaseFileUrl) } } -void ScExternalRefManager::updateRefCell(const ScAddress& rOldPos, const ScAddress& rNewPos, bool bCopy) -{ - for (RefCellMap::iterator itr = maRefCells.begin(), itrEnd = maRefCells.end(); itr != itrEnd; ++itr) - { - if (!bCopy) - itr->second.removeCell(rOldPos); - itr->second.insertCell(rNewPos); - } -} - -void ScExternalRefManager::updateRefMoveTable(SCTAB nOldTab, SCTAB nNewTab, bool bCopy) -{ - for (RefCellMap::iterator itr = maRefCells.begin(), itrEnd = maRefCells.end(); itr != itrEnd; ++itr) - itr->second.moveTable(nOldTab, nNewTab, bCopy); -} - -void ScExternalRefManager::updateRefInsertTable(SCTAB nPos) -{ - for (RefCellMap::iterator itr = maRefCells.begin(), itrEnd = maRefCells.end(); itr != itrEnd; ++itr) - itr->second.insertTable(nPos); -} - -void ScExternalRefManager::updateRefDeleteTable(SCTAB nPos) +void ScExternalRefManager::removeRefCell(ScFormulaCell* pCell) { - for (RefCellMap::iterator itr = maRefCells.begin(), itrEnd = maRefCells.end(); itr != itrEnd; ++itr) - itr->second.removeTable(nPos); + for_each(maRefCells.begin(), maRefCells.end(), RemoveFormulaCell(pCell)); } void ScExternalRefManager::addLinkListener(sal_uInt16 nFileId, LinkListener* pListener) -- cgit v1.2.3 From f7a926483bb0609672f2a22b65a463aa7cdb2293 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Sat, 6 Mar 2010 00:25:36 -0500 Subject: koheiextref01: Forgot to remove debug code. --- sc/source/ui/docshell/externalrefmgr.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index c062593beea9..9ab6f427737f 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -177,8 +177,6 @@ public: explicit ConvertFormulaToStatic(ScDocument* pDoc) : mpDoc(pDoc) {} void operator() (ScFormulaCell* pCell) const { - String aStr; - pCell->aPos.Format(aStr, SCA_VALID); ScAddress aPos = pCell->aPos; // We don't check for empty cells because empty external cells are -- cgit v1.2.3 From b7450350c117ec6d4e3f5edee10a2a9dbb3b2b99 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Sun, 7 Mar 2010 14:50:39 -0500 Subject: koheiextref01: Forgot to remove this unused method. --- sc/inc/externalrefmgr.hxx | 2 -- sc/source/ui/docshell/externalrefmgr.cxx | 29 ----------------------------- 2 files changed, 31 deletions(-) diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index db0366f37e53..198c139e28ae 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -673,8 +673,6 @@ private: */ void maybeCreateRealFileName(sal_uInt16 nFileId); - bool compileTokensByCell(const ScAddress& rCell); - /** * Purge those source document instances that have not been accessed for * the specified duration. diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 9ab6f427737f..c067083c4017 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2051,35 +2051,6 @@ void ScExternalRefManager::maybeCreateRealFileName(sal_uInt16 nFileId) maSrcFiles[nFileId].maybeCreateRealFileName(getOwnDocumentName()); } -bool ScExternalRefManager::compileTokensByCell(const ScAddress& rCell) -{ - ScBaseCell* pCell; - mpDoc->GetCell(rCell.Col(), rCell.Row(), rCell.Tab(), pCell); - - if (!pCell || pCell->GetCellType() != CELLTYPE_FORMULA) - return false; - - ScFormulaCell* pFC = static_cast(pCell); - - // Check to make sure the cell really contains ocExternalRef. - // External names, external cell and range references all have a - // ocExternalRef token. - const ScTokenArray* pCode = pFC->GetCode(); - if (!pCode->HasOpCode( ocExternalRef)) - return false; - - ScTokenArray* pArray = pFC->GetCode(); - if (pArray) - // Clear the error code, or a cell with error won't get re-compiled. - pArray->SetCodeError(0); - - pFC->SetCompile(true); - pFC->CompileTokenArray(); - pFC->SetDirty(); - - return true; -} - const String& ScExternalRefManager::getOwnDocumentName() const { SfxObjectShell* pShell = mpDoc->GetDocumentShell(); -- cgit v1.2.3 From 3387f0a6dd7c2cc78e1b7c134d49f5bcb2b0870a Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 10:38:03 -0500 Subject: koheiextref01: i#109170# Iterate through the formula cell list in the external ref mgr to mark used references. The old code scanned *all* formula cells in the entire document, to see if any external references exist in the document. Now that the external ref mgr tracks formula cells with external references better, let's use that list, to be more efficient. --- sc/inc/column.hxx | 1 - sc/inc/externalrefmgr.hxx | 2 ++ sc/inc/table.hxx | 1 - sc/source/core/data/column.cxx | 16 ---------------- sc/source/core/data/documen3.cxx | 7 ++----- sc/source/core/data/table2.cxx | 11 ----------- sc/source/ui/docshell/externalrefmgr.cxx | 18 ++++++++++++++++++ 7 files changed, 22 insertions(+), 34 deletions(-) diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 08f3d1f7b1e3..3386b3ebec67 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -273,7 +273,6 @@ public: void CalcAfterLoad(); void CompileAll(); void CompileXML( ScProgress& rProgress ); - bool MarkUsedExternalReferences(); void ResetChanged( SCROW nStartRow, SCROW nEndRow ); diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 198c139e28ae..10020a8380d8 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -486,6 +486,8 @@ public: */ bool markUsedByLinkListeners(); + bool markUsedExternalRefCells(); + /** * Set all tables of a document as referenced, used only during * store-to-file. diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index b7d6721e4344..46e8f133c274 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -416,7 +416,6 @@ public: void CalcAfterLoad(); void CompileAll(); void CompileXML( ScProgress& rProgress ); - bool MarkUsedExternalReferences(); void UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 49ae4a98b1c6..d68994354af4 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2100,22 +2100,6 @@ void ScColumn::CalcAfterLoad() } -bool ScColumn::MarkUsedExternalReferences() -{ - bool bAllMarked = false; - if (pItems) - { - for (SCSIZE i = 0; i < nCount && !bAllMarked; ++i) - { - ScBaseCell* pCell = pItems[i].pCell; - if ( pCell->GetCellType() == CELLTYPE_FORMULA ) - bAllMarked = ((ScFormulaCell*)pCell)->MarkUsedExternalReferences(); - } - } - return bAllMarked; -} - - void ScColumn::ResetChanged( SCROW nStartRow, SCROW nEndRow ) { if (pItems) diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index cc06d7ac6b32..683f5ea55eb6 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -460,11 +460,8 @@ void ScDocument::MarkUsedExternalReferences() // Charts. bool bAllMarked = pExternalRefMgr->markUsedByLinkListeners(); // Formula cells. - for (SCTAB nTab = 0; !bAllMarked && nTab < nMaxTableNumber; ++nTab) - { - if (pTab[nTab]) - bAllMarked = pTab[nTab]->MarkUsedExternalReferences(); - } + bAllMarked = pExternalRefMgr->markUsedExternalRefCells(); + /* NOTE: Conditional formats and validation objects are marked when * collecting them during export. */ } diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 5b3f6078d489..b6aaa08a7db3 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1125,17 +1125,6 @@ void ScTable::CalcAfterLoad() } -bool ScTable::MarkUsedExternalReferences() -{ - bool bAllMarked = false; - for (SCCOL i=0; i <= MAXCOL && !bAllMarked; ++i) - { - bAllMarked = aCol[i].MarkUsedExternalReferences(); - } - return bAllMarked; -} - - void ScTable::ResetChanged( const ScRange& rRange ) { SCCOL nStartCol = rRange.aStart.Col(); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index c067083c4017..ed929e986b2f 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1532,6 +1532,24 @@ bool ScExternalRefManager::markUsedByLinkListeners() return bAllMarked; } +bool ScExternalRefManager::markUsedExternalRefCells() +{ + RefCellMap::iterator itr = maRefCells.begin(), itrEnd = maRefCells.end(); + for (; itr != itrEnd; ++itr) + { + RefCellSet::iterator itrCell = itr->second.begin(), itrCellEnd = itr->second.end(); + for (; itrCell != itrCellEnd; ++itrCell) + { + ScFormulaCell* pCell = *itrCell; + bool bUsed = pCell->MarkUsedExternalReferences(); + if (bUsed) + // Return true even only one cell references external documents. + return true; + } + } + return false; +} + bool ScExternalRefManager::setCacheDocReferenced( sal_uInt16 nFileId ) { return maRefCache.setCacheDocReferenced( nFileId); -- cgit v1.2.3 From d329fd4fa6747353e2d4b2cf529af69cd7ae85d7 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 11:20:10 -0500 Subject: koheiextref01: removed unused method. --- sc/inc/externalrefmgr.hxx | 13 ++++--------- sc/source/ui/docshell/externalrefmgr.cxx | 5 ----- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 10020a8380d8..f6e7b1792f60 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -488,13 +488,6 @@ public: bool markUsedExternalRefCells(); - /** - * Set all tables of a document as referenced, used only during - * store-to-file. - * @returns if ALL tables of ALL external documents are marked. - */ - bool setCacheDocReferenced( sal_uInt16 nFileId ); - /** * Set a table as referenced, used only during store-to-file. * @returns if ALL tables of ALL external documents are marked. @@ -533,7 +526,8 @@ public: * @return shared_ptr to a token array instance. The caller must not * delete the instance returned by this method. */ - ScExternalRefCache::TokenArrayRef getDoubleRefTokens(sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange, const ScAddress* pCurPos); + ScExternalRefCache::TokenArrayRef getDoubleRefTokens( + sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange, const ScAddress* pCurPos); /** * Get an array of tokens corresponding with a specified name in a @@ -546,7 +540,8 @@ public: * * @return shared_ptr to array of tokens composing the name */ - ScExternalRefCache::TokenArrayRef getRangeNameTokens(sal_uInt16 nFileId, const String& rName, const ScAddress* pCurPos = NULL); + ScExternalRefCache::TokenArrayRef getRangeNameTokens( + sal_uInt16 nFileId, const String& rName, const ScAddress* pCurPos = NULL); const String& getOwnDocumentName() const; bool isOwnDocument(const String& rFile) const; diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index ed929e986b2f..1c2835c614f5 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1550,11 +1550,6 @@ bool ScExternalRefManager::markUsedExternalRefCells() return false; } -bool ScExternalRefManager::setCacheDocReferenced( sal_uInt16 nFileId ) -{ - return maRefCache.setCacheDocReferenced( nFileId); -} - bool ScExternalRefManager::setCacheTableReferenced( sal_uInt16 nFileId, const String& rTabName, size_t nSheets ) { return maRefCache.setCacheTableReferenced( nFileId, rTabName, nSheets, false); -- cgit v1.2.3 From 979c7f272b9eac09329dd63ef07a8fcaadfa163b Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 11:32:11 -0500 Subject: koheiextref01: inline comment change. --- sc/source/ui/docshell/externalrefmgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 1c2835c614f5..aa7918bc69d7 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1543,7 +1543,7 @@ bool ScExternalRefManager::markUsedExternalRefCells() ScFormulaCell* pCell = *itrCell; bool bUsed = pCell->MarkUsedExternalReferences(); if (bUsed) - // Return true even only one cell references external documents. + // Return true when at least one cell references external docs. return true; } } -- cgit v1.2.3 From 9285f618025b95c50e052c93cb220082e568f955 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 13:01:30 -0500 Subject: koheiextref01: #i109101# Fixed external ref URL parser to pick up sheet names with '#' correctly. --- sc/source/filter/xml/xmltabi.cxx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index 721b2e3dc2bc..5cbfa11684d2 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -98,20 +98,24 @@ static bool lcl_isExternalRefCache(const rtl::OUString& rName, rtl::OUString& rU const sal_Unicode c = p[i]; if (i <= 7) { + // Checking the prefix 'file://'. if (c != aPrefix[i]) return false; } - else if (c == '#') + else if (bInUrl) { - if (cPrev != '\'') - return false; + if (c == '#') + { + if (cPrev != '\'') + return false; - rUrl = aUrlBuf.makeStringAndClear(); - rUrl = rUrl.copy(0, rUrl.getLength()-1); // remove the trailing single-quote. - bInUrl = false; + rUrl = aUrlBuf.makeStringAndClear(); + rUrl = rUrl.copy(0, rUrl.getLength()-1); // remove the trailing single-quote. + bInUrl = false; + } + else + aUrlBuf.append(c); } - else if (bInUrl) - aUrlBuf.append(c); else aTabNameBuf.append(c); -- cgit v1.2.3 From 78036c811676c318c05883f6033dff867f80da6f Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 13:04:19 -0500 Subject: koheiextref01: added comments. --- sc/source/filter/xml/xmltabi.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index 5cbfa11684d2..095b6ee6d450 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -104,6 +104,7 @@ static bool lcl_isExternalRefCache(const rtl::OUString& rName, rtl::OUString& rU } else if (bInUrl) { + // parsing file URL if (c == '#') { if (cPrev != '\'') @@ -117,6 +118,7 @@ static bool lcl_isExternalRefCache(const rtl::OUString& rName, rtl::OUString& rU aUrlBuf.append(c); } else + // parsing sheet name. aTabNameBuf.append(c); cPrev = c; -- cgit v1.2.3 From 24f9819c52b59822a8935ead4381fff3d884fad1 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 13:44:37 -0500 Subject: koheiextref01: #i109101# Fixed incorrect parsing of cached string cell values. The xml parser tends to break text into multiple pieces in presence of '#'. The original code only picked up the last piece of the set, which truncated the stored cache value. We should pick up all the fragments during the import. --- sc/inc/externalrefmgr.hxx | 7 +++++++ sc/source/filter/xml/xmlexternaltabi.cxx | 15 +++++++++++---- sc/source/filter/xml/xmlexternaltabi.hxx | 9 +++++++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index f6e7b1792f60..f251875b35ea 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -152,6 +152,13 @@ public: Table(); ~Table(); + /** + * Add cell value to the cache. + * + * @param bSetCacheRange if true, mark this cell 'cached'. This is + * false _only when_ adding a range of cell + * values, for performance reasons. + */ SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 nFmtIndex = 0, bool bSetCacheRange = true); TokenRef getCell(SCCOL nCol, SCROW nRow, sal_uInt32* pnFmtIndex = NULL) const; bool hasRow( SCROW nRow ) const; diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx index ce1f58f5d912..083a73d81872 100644 --- a/sc/source/filter/xml/xmlexternaltabi.cxx +++ b/sc/source/filter/xml/xmlexternaltabi.cxx @@ -370,7 +370,7 @@ SvXMLImportContext* ScXMLExternalRefCellContext::CreateChildContext( const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowCellElemTokenMap(); sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName); if (nToken == XML_TOK_TABLE_ROW_CELL_P) - return new ScXMLExternalRefCellTextContext(mrScImport, nPrefix, rLocalName, xAttrList, maCellString); + return new ScXMLExternalRefCellTextContext(mrScImport, nPrefix, rLocalName, xAttrList, *this); return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); } @@ -399,14 +399,20 @@ void ScXMLExternalRefCellContext::EndElement() } } +void ScXMLExternalRefCellContext::SetCellString(const OUString& rStr) +{ + maCellString = rStr; +} + // ============================================================================ ScXMLExternalRefCellTextContext::ScXMLExternalRefCellTextContext( ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, - const Reference& /*xAttrList*/, OUString& rCellString ) : + const Reference& /*xAttrList*/, + ScXMLExternalRefCellContext& rParent ) : SvXMLImportContext( rImport, nPrefix, rLName ), mrScImport(rImport), - mrCellString(rCellString) + mrParent(rParent) { } @@ -422,9 +428,10 @@ SvXMLImportContext* ScXMLExternalRefCellTextContext::CreateChildContext( void ScXMLExternalRefCellTextContext::Characters(const OUString& rChar) { - mrCellString = rChar; + maCellStrBuf.append(rChar); } void ScXMLExternalRefCellTextContext::EndElement() { + mrParent.SetCellString(maCellStrBuf.makeStringAndClear()); } diff --git a/sc/source/filter/xml/xmlexternaltabi.hxx b/sc/source/filter/xml/xmlexternaltabi.hxx index 0007a8b29702..6aaff181315e 100644 --- a/sc/source/filter/xml/xmlexternaltabi.hxx +++ b/sc/source/filter/xml/xmlexternaltabi.hxx @@ -29,6 +29,7 @@ #define SC_XMLEXTERNALTABI_HXX #include +#include "rtl/ustrbuf.hxx" class ScXMLImport; struct ScXMLExternalTabData; @@ -129,6 +130,8 @@ public: virtual void EndElement(); + void SetCellString(const ::rtl::OUString& rStr); + private: ScXMLImport& mrScImport; ScXMLExternalTabData& mrExternalRefInfo; @@ -150,7 +153,7 @@ public: const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, - ::rtl::OUString& rCellString ); + ScXMLExternalRefCellContext& rParent ); virtual ~ScXMLExternalRefCellTextContext(); @@ -165,7 +168,9 @@ public: private: ScXMLImport& mrScImport; - ::rtl::OUString& mrCellString; + ScXMLExternalRefCellContext& mrParent; + + ::rtl::OUStringBuffer maCellStrBuf; }; #endif -- cgit v1.2.3 From 030559eee3b23064d3822480989822e106a46923 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 14:11:04 -0500 Subject: koheiextref01: #i108404# Use interaction handler during loading of external document. We need to enable interaction handler during loading of external documents, in order to allow loading of encrypted documents, which require password input from the user. --- sc/source/ui/docshell/externalrefmgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index aa7918bc69d7..d94f0ab18100 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1978,7 +1978,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri if (pMedium->GetError() != ERRCODE_NONE) return NULL; - pMedium->UseInteractionHandler(false); + pMedium->UseInteractionHandler(true); ScDocShell* pNewShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL); SfxObjectShellRef aRef = pNewShell; -- cgit v1.2.3 From 63b84538a566b918e3e6d81d7180879bc9ad01e0 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 14:16:05 -0500 Subject: koheiextref01: added inline comment. --- sc/source/ui/docshell/externalrefmgr.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index d94f0ab18100..d20a3d20e8bb 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1978,6 +1978,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri if (pMedium->GetError() != ERRCODE_NONE) return NULL; + // We need this to load encrypted documents with password. pMedium->UseInteractionHandler(true); ScDocShell* pNewShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL); -- cgit v1.2.3 From f67657e49ce4efb4bb2bd83c313b387a3e12e0d7 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 16:58:31 -0500 Subject: koheiextref01: #i109168# Allow creation of static sheet cache via UNO API for external references. This is to keep the sheet cache 'static' during import of xlsx documents. The same trick is performed during import of xls and ods documents. --- sc/inc/linkuno.hxx | 2 +- sc/source/ui/unoobj/linkuno.cxx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sc/inc/linkuno.hxx b/sc/inc/linkuno.hxx index 50b33c692752..284d851a45da 100644 --- a/sc/inc/linkuno.hxx +++ b/sc/inc/linkuno.hxx @@ -543,7 +543,7 @@ public: // XExternalDocLink virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XExternalSheetCache > - SAL_CALL addSheetCache( const ::rtl::OUString& aSheetName ) + SAL_CALL addSheetCache( const ::rtl::OUString& aSheetName, sal_Bool bDynamicCache ) throw (::com::sun::star::uno::RuntimeException); // XNameAccess diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index 6d9fcd1d23e4..a119eda13a32 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -1605,12 +1605,16 @@ ScExternalDocLinkObj::~ScExternalDocLinkObj() } Reference< sheet::XExternalSheetCache > SAL_CALL ScExternalDocLinkObj::addSheetCache( - const OUString& aSheetName ) + const OUString& aSheetName, sal_Bool bDynamicCache ) throw (RuntimeException) { ScUnoGuard aGuard; size_t nIndex = 0; ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aSheetName, true, &nIndex); + if (!bDynamicCache) + // Set the whole table cached to prevent access to the source document. + pTable->setWholeTableCached(); + Reference< sheet::XExternalSheetCache > aSheetCache(new ScExternalSheetCacheObj(pTable, nIndex)); return aSheetCache; } -- cgit v1.2.3 From 6556a0ea1128ceb83c0eea954ca8aa52cf43ffb7 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 16:58:31 -0500 Subject: koheiextref01: #i109168# Allow creation of static sheet cache via UNO API for external references. This is to keep the sheet cache 'static' during import of xlsx documents. The same trick is performed during import of xls and ods documents. --- offapi/com/sun/star/sheet/XExternalDocLink.idl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/sheet/XExternalDocLink.idl b/offapi/com/sun/star/sheet/XExternalDocLink.idl index 19d1f0ff08d7..1a9662dbeed7 100644 --- a/offapi/com/sun/star/sheet/XExternalDocLink.idl +++ b/offapi/com/sun/star/sheet/XExternalDocLink.idl @@ -60,9 +60,16 @@ interface XExternalDocLink @param aSheetName sheet name + @param DynamicCache specify whether or not the cache can grow when + non-cached regions are queried. If , querying a non-cached + cell in this sheet cache will allow Calc to try to access the source + document to fetch the value in first access. If , the source + document will not be accessed, and the non-cached regions are treated + as empty cells. + @return com::sun::star::sheet::XExternalSheetCache sheet cache instance */ - com::sun::star::sheet::XExternalSheetCache addSheetCache( [in] string aSheetName ); + com::sun::star::sheet::XExternalSheetCache addSheetCache( [in] string aSheetName, [in] boolean DynamicCache ); //------------------------------------------------------------------------- -- cgit v1.2.3 From 2dcb22229e212b1ea4004c87b9319f20357e3aad Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 16:58:31 -0500 Subject: koheiextref01: #i109168# Allow creation of static sheet cache via UNO API for external references. This is to keep the sheet cache 'static' during import of xlsx documents. The same trick is performed during import of xls and ods documents. --- oox/source/xls/externallinkbuffer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oox/source/xls/externallinkbuffer.cxx b/oox/source/xls/externallinkbuffer.cxx index a4c0731b19ed..04fcd2f84648 100644 --- a/oox/source/xls/externallinkbuffer.cxx +++ b/oox/source/xls/externallinkbuffer.cxx @@ -909,7 +909,7 @@ void ExternalLink::insertExternalSheet( const OUString& rSheetName ) OSL_ENSURE( rSheetName.getLength() > 0, "ExternalLink::insertExternalSheet - empty sheet name" ); if( mxDocLink.is() ) { - Reference< XExternalSheetCache > xSheetCache = mxDocLink->addSheetCache( rSheetName ); + Reference< XExternalSheetCache > xSheetCache = mxDocLink->addSheetCache( rSheetName, false ); sal_Int32 nCacheIdx = xSheetCache.is() ? xSheetCache->getTokenIndex() : -1; maSheetCaches.push_back( nCacheIdx ); } -- cgit v1.2.3 From cd425d305a06482b3cca96485bd979ef82467559 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 17:24:08 -0500 Subject: koheiextref01: Reverted the change in dmake. --- dmake/getinp.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/dmake/getinp.c b/dmake/getinp.c index 1ac312a53b59..5445193d1a90 100644 --- a/dmake/getinp.c +++ b/dmake/getinp.c @@ -88,23 +88,17 @@ FILE *fil; /* Reading the internal rule table. Set rule_ind to zero after the * last entry so that ReadEnvironment() works as expected every time. */ - while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) ) { + while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) ) /* The last test in this if *p != '~', handles the environment * passing conventions used by MKS to pass arguments. We want to * skip those environment entries. Also CYGWIN likes to export '!' - * prefixed environment variables that cause severe pain, axe them too. - * And finally it is possible to do "env 'GGG HHH'='some value' bash" - * which causes that there are env variables with spaces in the name - * defined which causes dmake to malfunction too */ - char *equal = strchr(p,'='); - char *space = strchr(p,' '); - if( !Readenv || (Readenv && (equal != NIL(char)) && (space == NIL(char) || space > equal) && *p!='~' && *p!='!')){ + * prefixed environment variables that cause severe pain, axe them too */ + if( !Readenv || (Readenv && (strchr(p,'=') != NIL(char)) && *p!='~' && *p!='!')){ strcpy( buf, p ); DB_PRINT( "io", ("Returning [%s]", buf) ); DB_RETURN( FALSE ); } - } rule_ind = 0; -- cgit v1.2.3 From ae6f4b5f20abc753f6d065e007c56a80b4925f6b Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 8 Mar 2010 18:27:34 -0500 Subject: koheiextref01: #i108064# Disable things that are not necessary in external doc cache. Doing that also prevents circular access of external references, which would cause a pretty bad hang. --- sc/source/filter/excel/read.cxx | 4 +++- sc/source/ui/docshell/externalrefmgr.cxx | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx index 91b749030dd7..2f09f02f41a1 100644 --- a/sc/source/filter/excel/read.cxx +++ b/sc/source/filter/excel/read.cxx @@ -1208,7 +1208,9 @@ FltError ImportExcel8::Read( void ) pProgress.reset(); - AdjustRowHeight(); + if (pD->IsAdjustHeightEnabled()) + AdjustRowHeight(); + PostDocLoad(); pD->CalcAfterLoad(); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index d20a3d20e8bb..b071cdb3a6a6 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1988,6 +1988,10 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri ScExtDocOptions* pExtOpt = mpDoc->GetExtDocOptions(); sal_uInt32 nLinkCount = pExtOpt ? pExtOpt->GetDocSettings().mnLinkCnt : 0; ScDocument* pSrcDoc = pNewShell->GetDocument(); + pSrcDoc->EnableExecuteLink(false); // to prevent circular access of external references. + pSrcDoc->EnableUndo(false); + pSrcDoc->EnableAdjustHeight(false); + ScExtDocOptions* pExtOptNew = pSrcDoc->GetExtDocOptions(); if (!pExtOptNew) { -- cgit v1.2.3 From 8de5feec5db5a41770e2ebe3055efa3bf6360055 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 9 Mar 2010 14:22:30 +0100 Subject: cws tl74: #i109418# fixed an issue with the hyphenation dialog --- cui/source/dialogs/hyphen.cxx | 251 +++++++++++++++++++++++++++--------------- cui/source/inc/hyphen.hxx | 11 -- 2 files changed, 160 insertions(+), 102 deletions(-) diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 08bb656fe82b..33a17d05ab0e 100755 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -48,25 +48,31 @@ using namespace ::com::sun::star; -// define ---------------------------------------------------------------- - -#define HYPHHERE '-' +#define HYPH_POS_CHAR '=' #define CONTINUE_HYPH USHRT_MAX -// Dies ist nur ein Hack, weil an dieser Stelle das extern char aus hmwrap -// nicht bekannt ist, wird demnaechst in hmwrap durch ein define ersetzt. -#define SW_SOFT_HYPHEN '=' +#define CUR_HYPH_POS_CHAR '-' + -// class SvxHyphenEdit --------------------------------------------------- +// class HyphenEdit_Impl ------------------------------------------------------- -SvxHyphenEdit::SvxHyphenEdit( Window* pParent, const ResId& rResId ) : +class HyphenEdit_Impl : public Edit +{ +public: + HyphenEdit_Impl( Window* pParent, const ResId& rResId ); +protected: + virtual void KeyInput( const KeyEvent &rKEvt ); +}; + + +HyphenEdit_Impl::HyphenEdit_Impl( Window* pParent, const ResId& rResId ) : Edit( pParent, rResId ) { } -void SvxHyphenEdit::KeyInput( const KeyEvent& rKEvt ) +void HyphenEdit_Impl::KeyInput( const KeyEvent& rKEvt ) { // sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier(); sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); @@ -92,6 +98,7 @@ void SvxHyphenEdit::KeyInput( const KeyEvent& rKEvt ) } } + // struct SvxHyphenWordDialog_Impl --------------------------------------------- struct SvxHyphenWordDialog_Impl @@ -100,7 +107,7 @@ struct SvxHyphenWordDialog_Impl // Window * m_pParent; FixedText aWordFT; - SvxHyphenEdit aWordEdit; + HyphenEdit_Impl aWordEdit; ImageButton aLeftBtn; ImageButton aRightBtn; OKButton aOkBtn; @@ -114,11 +121,13 @@ struct SvxHyphenWordDialog_Impl SvxSpellWrapper* pHyphWrapper; uno::Reference< linguistic2::XHyphenator > xHyphenator; uno::Reference< linguistic2::XPossibleHyphens > xPossHyph; - String aActWord; // actual (to be displayed) word - LanguageType nActLanguage; // and language + String aEditWord; // aEditWord and aWordEdit.GetText() differ only by the character for the current selected hyphenation position + String aActWord; // actual word to be hyphenated + LanguageType nActLanguage; // and its language sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos sal_uInt16 nHyphPos; sal_uInt16 nOldPos; + sal_Int32 nHyphenationPositionsOffset; sal_Bool bBusy; @@ -128,6 +137,8 @@ struct SvxHyphenWordDialog_Impl void InitControls_Impl(); void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 ); sal_uInt16 GetHyphIndex_Impl(); + void SelLeft_Impl(); + void SelRight_Impl(); DECL_LINK( Left_Impl, Button* ); DECL_LINK( Right_Impl, Button* ); @@ -177,6 +188,7 @@ SvxHyphenWordDialog_Impl::SvxHyphenWordDialog_Impl( nMaxHyphenationPos ( 0 ), nHyphPos ( 0 ), nOldPos ( 0 ), + nHyphenationPositionsOffset( 0 ), bBusy ( sal_False ) { aActWord = rWord; @@ -184,6 +196,19 @@ SvxHyphenWordDialog_Impl::SvxHyphenWordDialog_Impl( xHyphenator = xHyphen; pHyphWrapper = pWrapper; + uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pHyphWrapper ? + pHyphWrapper->GetLast() : NULL, uno::UNO_QUERY ); + DBG_ASSERT( xHyphWord.is(), "hyphenation result missing" ); + if (xHyphWord.is()) + { + DBG_ASSERT( aActWord == String( xHyphWord->getWord() ), "word mismatch" ); + DBG_ASSERT( nActLanguage == SvxLocaleToLanguage( xHyphWord->getLocale() ), "language mismatch" ); + nMaxHyphenationPos = xHyphWord->getHyphenationPos(); + } + + InitControls_Impl(); + aWordEdit.GrabFocus(); + aLeftBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, Left_Impl ) ); aRightBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, Right_Impl ) ); aOkBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog_Impl, CutHdl_Impl ) ); @@ -202,14 +227,14 @@ SvxHyphenWordDialog_Impl::~SvxHyphenWordDialog_Impl() void SvxHyphenWordDialog_Impl::EnableLRBtn_Impl() { - String aTxt( aWordEdit.GetText() ); + String aTxt( aEditWord ); xub_StrLen nLen = aTxt.Len(); xub_StrLen i; aRightBtn.Disable(); for ( i = nOldPos + 2; i < nLen; ++i ) { - if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) + if ( aTxt.GetChar( i ) == sal_Unicode( HYPH_POS_CHAR ) ) { aRightBtn.Enable(); break; @@ -222,7 +247,7 @@ void SvxHyphenWordDialog_Impl::EnableLRBtn_Impl() aLeftBtn.Disable(); for ( i = nOldPos; i-- > 0; ) { - if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) + if ( aTxt.GetChar( i ) == sal_Unicode( HYPH_POS_CHAR ) ) { aLeftBtn.Enable(); break; @@ -237,21 +262,48 @@ String SvxHyphenWordDialog_Impl::EraseUnusableHyphens_Impl( { // returns a String showing only those hyphen positions which will result // in a line break if hyphenation is done there + // 1) we will need to discard all hyphenation positions at th end that + // will not result in a line break where the text to the left still fits + // on the line. + // 2) since as from OOo 3.2 '-' are part of a word an thus text like + // 'multi-line-editor' is regarded as single word we also need to discard those + // hyphenation positions to the left of the rightmost '-' that is still left of + // the rightmost valid hyphenation position according to 1) + // + // Example: + // If the possible hyphenation position in 'multi-line-editor' are to eb marked + // by '=' then the text will look like this 'mul=ti-line-ed=it=or'. + // If now the first line is only large enough for 'multi-line-edi' we need to discard + // the last possible hyphnation point because of 1). The the right most valid + // hyphenation position is "ed=itor". The first '-' left of this position is + // "line-ed", thus because of 2) we now need to discard all possible hyphneation + // positions to the left of that as well. Thus in the end leaving us with just + // 'multi-line-ed=itor' as return value for this function. (Just one valid hyphenation + // position for the user too choose from. However ALL the '-' characters in the word + // will ALWAYS be valid implicit hyphenation positions for the core to choose from! + // And thus even if this word is skipped in the hyphenation dialog it will still be broken + // right after 'multi-line-' (actually it might already be broken up that way before + // the hyphenation dialog is called!). + // Thus rule 2) just eliminates those positions which will not be used by the core at all + // even if the user were to select one of them. String aTxt; DBG_ASSERT(rxPossHyph.is(), "missing possible hyphens"); if (rxPossHyph.is()) { + DBG_ASSERT( aActWord == rxPossHyph->getWord(), "word mismatch" ); + aTxt = String( rxPossHyph->getPossibleHyphens() ); + nHyphenationPositionsOffset = 0; uno::Sequence< sal_Int16 > aHyphenationPositions( rxPossHyph->getHyphenationPositions() ); sal_Int32 nLen = aHyphenationPositions.getLength(); const sal_Int16 *pHyphenationPos = aHyphenationPositions.getConstArray(); // find position nIdx after which all hyphen positions are unusable - xub_StrLen nIdx = STRING_NOTFOUND, - nPos; + xub_StrLen nIdx = STRING_NOTFOUND; + xub_StrLen nPos = 0, nPos1 = 0, nPos2 = 0; if (nLen) { xub_StrLen nStart = 0; @@ -262,7 +314,7 @@ String SvxHyphenWordDialog_Impl::EraseUnusableHyphens_Impl( else { // find corresponding hyphen pos in string - nPos = aTxt.Search( sal_Unicode( SW_SOFT_HYPHEN ), nStart ); + nPos = aTxt.Search( sal_Unicode( HYPH_POS_CHAR ), nStart ); if (nStart == STRING_NOTFOUND) break; @@ -276,12 +328,29 @@ String SvxHyphenWordDialog_Impl::EraseUnusableHyphens_Impl( } DBG_ASSERT(nIdx != STRING_NOTFOUND, "no usable hyphenation position"); - // remove not usable hyphens from string + // 1) remove all not usable hyphenation positions from the end of the string nPos = nIdx == STRING_NOTFOUND ? 0 : nIdx + 1; - String aTmp( sal_Unicode( SW_SOFT_HYPHEN ) ), - aEmpty; + nPos1 = nPos; //save for later use in 2) below + const String aTmp( sal_Unicode( HYPH_POS_CHAR ) ); + const String aEmpty; while (nPos != STRING_NOTFOUND) nPos = aTxt.SearchAndReplace( aTmp, aEmpty, nPos + 1 ); + + // 2) remove all hyphenation positions from the start that are not considered by the core + const String aSearchRange( aTxt.Copy( 0, nPos1 ) ); + nPos2 = aSearchRange.SearchBackward( '-' ); // the '-' position the core will use by default + if (nPos2 != STRING_NOTFOUND) + { + String aLeft( aSearchRange.Copy( 0, nPos2 ) ); + nPos = 0; + while (nPos != STRING_NOTFOUND) + { + nPos = aLeft.SearchAndReplace( aTmp, aEmpty, nPos + 1 ); + if (nPos != STRING_NOTFOUND) + ++nHyphenationPositionsOffset; + } + aTxt.Replace( 0, nPos2, aLeft ); + } } return aTxt; } @@ -289,7 +358,6 @@ String SvxHyphenWordDialog_Impl::EraseUnusableHyphens_Impl( void SvxHyphenWordDialog_Impl::InitControls_Impl() { - String aTxt; xPossHyph = NULL; if (xHyphenator.is()) { @@ -297,15 +365,12 @@ void SvxHyphenWordDialog_Impl::InitControls_Impl() xPossHyph = xHyphenator->createPossibleHyphens( aActWord, aLocale, uno::Sequence< beans::PropertyValue >() ); if (xPossHyph.is()) - { - aTxt = EraseUnusableHyphens_Impl( xPossHyph, nMaxHyphenationPos ); - } - m_pDialog->SetWindowTitle( nActLanguage ); + aEditWord = EraseUnusableHyphens_Impl( xPossHyph, nMaxHyphenationPos ); } - aWordEdit.SetText( aTxt ); + aWordEdit.SetText( aEditWord ); - nOldPos = aTxt.Len(); - m_pDialog->SelLeft(); + nOldPos = aEditWord.Len(); + SelLeft_Impl(); EnableLRBtn_Impl(); } @@ -316,23 +381,24 @@ void SvxHyphenWordDialog_Impl::ContinueHyph_Impl( sal_uInt16 nInsPos ) { if (nInsPos) { - String aTmp( aWordEdit.GetText() ); + String aTmp( aEditWord ); DBG_ASSERT(nInsPos <= aTmp.Len() - 2, "wrong hyphen position"); - sal_uInt16 nIdxPos = 0; - sal_uInt16 i = 0; - sal_Unicode c; - while (i < aTmp.Len() && HYPHHERE != (c = aTmp.GetChar(i++)) ) + sal_Int16 nIdxPos = -1; + for (sal_uInt16 i = 0; i <= nInsPos; ++i) { - if (SW_SOFT_HYPHEN == c) + if (HYPH_POS_CHAR == aTmp.GetChar( i )) nIdxPos++; } + // take the possible hyphenation positions that got removed from the + // start of the wor dinot account: + nIdxPos += nHyphenationPositionsOffset; uno::Sequence< sal_Int16 > aSeq = xPossHyph->getHyphenationPositions(); sal_Int32 nLen = aSeq.getLength(); DBG_ASSERT(nLen, "empty sequence"); - DBG_ASSERT(nIdxPos < nLen, "index out of range"); - if (nLen && nIdxPos < nLen) + DBG_ASSERT(0 <= nIdxPos && nIdxPos < nLen, "index out of range"); + if (nLen && 0 <= nIdxPos && nIdxPos < nLen) { nInsPos = aSeq.getConstArray()[ nIdxPos ]; pHyphWrapper->InsertHyphen( nInsPos ); @@ -356,6 +422,7 @@ void SvxHyphenWordDialog_Impl::ContinueHyph_Impl( sal_uInt16 nInsPos ) nActLanguage = SvxLocaleToLanguage( xHyphWord->getLocale() ); nMaxHyphenationPos = xHyphWord->getHyphenationPos(); InitControls_Impl(); + m_pDialog->SetWindowTitle( nActLanguage ); } } else @@ -370,24 +437,69 @@ sal_uInt16 SvxHyphenWordDialog_Impl::GetHyphIndex_Impl() for ( sal_uInt16 i=0 ; i < aTxt.Len(); ++i ) { - sal_Unicode nChar = aTxt.GetChar( i ); - - if ( nChar == HYPHHERE ) + sal_Unicode cChar = aTxt.GetChar( i ); + if ( cChar == CUR_HYPH_POS_CHAR ) break; - - if ( nChar != SW_SOFT_HYPHEN ) + if ( cChar != HYPH_POS_CHAR ) nPos++; } return nPos; } +void SvxHyphenWordDialog_Impl::SelLeft_Impl() +{ + DBG_ASSERT( nOldPos > 0, "invalid hyphenation position" ); + if (nOldPos > 0) + { + String aTxt( aEditWord ); + for ( xub_StrLen i = nOldPos - 1; i > 0; --i) + { + DBG_ASSERT(i <= aTxt.Len(), "index out of range"); + if (aTxt.GetChar( i ) == sal_Unicode( HYPH_POS_CHAR )) + { + aTxt.SetChar( i, sal_Unicode( CUR_HYPH_POS_CHAR ) ); + + nOldPos = i; + aWordEdit.SetText( aTxt ); + aWordEdit.GrabFocus(); + aWordEdit.SetSelection( Selection( i, i + 1 ) ); + break; + } + } + nHyphPos = GetHyphIndex_Impl(); + EnableLRBtn_Impl(); + } +} + + +void SvxHyphenWordDialog_Impl::SelRight_Impl() +{ + String aTxt( aEditWord ); + for ( xub_StrLen i = nOldPos + 1; i < aTxt.Len(); ++i ) + { + if (aTxt.GetChar( i ) == sal_Unicode( HYPH_POS_CHAR )) + { + aTxt.SetChar( i, sal_Unicode( CUR_HYPH_POS_CHAR ) ); + + nOldPos = i; + aWordEdit.SetText( aTxt ); + aWordEdit.GrabFocus(); + aWordEdit.SetSelection( Selection( i, i + 1 ) ); + break; + } + } + nHyphPos = GetHyphIndex_Impl(); + EnableLRBtn_Impl(); +} + + IMPL_LINK( SvxHyphenWordDialog_Impl, CutHdl_Impl, Button *, EMPTYARG ) { if( !bBusy ) { bBusy = sal_True; - ContinueHyph_Impl( nHyphPos ); + ContinueHyph_Impl( /*nHyphPos*/nOldPos ); bBusy = sal_False; } return 0; @@ -408,7 +520,7 @@ IMPL_LINK( SvxHyphenWordDialog_Impl, HyphenateAllHdl_Impl, Button *, EMPTYARG /* xProp->setPropertyValue( aName, aAny ); bBusy = sal_True; - ContinueHyph_Impl( nHyphPos ); + ContinueHyph_Impl( /*nHyphPos*/nOldPos ); bBusy = sal_False; aAny <<= sal_False; @@ -466,7 +578,7 @@ IMPL_LINK( SvxHyphenWordDialog_Impl, Left_Impl, Button *, EMPTYARG ) if( !bBusy ) { bBusy = sal_True; - m_pDialog->SelLeft(); + SelLeft_Impl(); bBusy = sal_False; } return 0; @@ -478,7 +590,7 @@ IMPL_LINK( SvxHyphenWordDialog_Impl, Right_Impl, Button *, EMPTYARG ) if( !bBusy ) { bBusy = sal_True; - m_pDialog->SelRight(); + SelRight_Impl(); bBusy = sal_False; } return 0; @@ -507,14 +619,6 @@ SvxHyphenWordDialog::SvxHyphenWordDialog( FreeResource(); - uno::Reference< linguistic2::XHyphenatedWord > xHyphWord( pWrapper ? - pWrapper->GetLast() : uno::Reference< uno::XInterface > () , uno::UNO_QUERY ); - DBG_ASSERT( xHyphWord.is(), "missing hyphenated word" ); - m_pImpl->nMaxHyphenationPos = xHyphWord.is() ? xHyphWord->getHyphenationPos() : 0; - - m_pImpl->InitControls_Impl(); - m_pImpl->aWordEdit.GrabFocus(); - SetWindowTitle( nLang ); // disable controls if service is not available @@ -541,48 +645,13 @@ void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang ) void SvxHyphenWordDialog::SelLeft() { - String aTxt( m_pImpl->aWordEdit.GetText() ); - for ( xub_StrLen i = m_pImpl->nOldPos + 1; i-- > 0 ; ) - { - DBG_ASSERT(i <= aTxt.Len(), "index out of range"); - if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) - { - aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); - - if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() ) - aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); - m_pImpl->nOldPos = i; - m_pImpl->aWordEdit.SetText( aTxt ); - m_pImpl->aWordEdit.GrabFocus(); - m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) ); - break; - } - } - m_pImpl->nHyphPos = m_pImpl->GetHyphIndex_Impl(); - m_pImpl->EnableLRBtn_Impl(); + m_pImpl->SelRight_Impl(); } void SvxHyphenWordDialog::SelRight() { - String aTxt( m_pImpl->aWordEdit.GetText() ); - for ( xub_StrLen i = m_pImpl->nOldPos + 1; i < aTxt.Len(); ++i ) - { - if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) - { - aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); - - if ( m_pImpl->nOldPos != 0 && m_pImpl->nOldPos != aTxt.Len() ) - aTxt.SetChar( m_pImpl->nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); - m_pImpl->nOldPos = i; - m_pImpl->aWordEdit.SetText( aTxt ); - m_pImpl->aWordEdit.GrabFocus(); - m_pImpl->aWordEdit.SetSelection( Selection( i, i + 1 ) ); - break; - } - } - m_pImpl->nHyphPos = m_pImpl->GetHyphIndex_Impl(); - m_pImpl->EnableLRBtn_Impl(); + m_pImpl->SelLeft_Impl(); } diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx index e28150ea7e4a..502b212c8a91 100755 --- a/cui/source/inc/hyphen.hxx +++ b/cui/source/inc/hyphen.hxx @@ -47,17 +47,6 @@ namespace linguistic2{ class SvxSpellWrapper; -// class SvxHyphenEdit --------------------------------------------------- - -class SvxHyphenEdit : public Edit -{ -public: - SvxHyphenEdit( Window* pParent, const ResId& rResId ); - -protected: - virtual void KeyInput( const KeyEvent &rKEvt ); -}; - // class SvxHyphenWordDialog --------------------------------------------- struct SvxHyphenWordDialog_Impl; -- cgit v1.2.3 From 5f94a5e44621da1ca3cf59df7d6cbace46606995 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 9 Mar 2010 14:51:15 -0500 Subject: koheiextref01: #i108404# Disable interaction handler when interpreting formula strings via UNO API. --- sc/inc/externalrefmgr.hxx | 25 +++++++++++++++++++++++-- sc/source/ui/docshell/docfunc.cxx | 9 +++++++++ sc/source/ui/docshell/externalrefmgr.cxx | 25 +++++++++++++++++++++---- sc/source/ui/unoobj/cellsuno.cxx | 3 +++ sc/source/ui/unoobj/tokenuno.cxx | 5 ++++- 5 files changed, 60 insertions(+), 7 deletions(-) diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index f251875b35ea..3f368d9a3189 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -386,6 +386,21 @@ public: }; }; + /** + * Use this guard when performing something from the API that might query + * values from external references. Interpreting formula strings is one + * such example. + */ + class ApiGuard + { + public: + ApiGuard(ScExternalRefManager* pMgr); + ~ApiGuard(); + private: + ScExternalRefManager* mpMgr; + bool mbOldInteractionEnabled; + }; + private: /** Shell instance for a source document. */ struct SrcShell @@ -512,7 +527,7 @@ public: * @returns if setAllCacheTableReferencedStati(false) was called, * if setAllCacheTableReferencedStati(true) was called. */ - bool isInReferenceMarking() const { return bInReferenceMarking; } + bool isInReferenceMarking() const { return mbInReferenceMarking; } void storeRangeNameTokens(sal_uInt16 nFileId, const String& rName, const ScTokenArray& rArray); @@ -716,7 +731,13 @@ private: ::std::vector maSrcFiles; /** Status whether in reference marking state. See isInReferenceMarking(). */ - bool bInReferenceMarking; + bool mbInReferenceMarking:1; + + /** + * Controls whether or not to allow user interaction. We don't want any + * user interaction when calling from the API. + */ + bool mbUserInteractionEnabled:1; AutoTimer maSrcDocTimer; DECL_LINK(TimeOutHdl, AutoTimer*); diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index cd28daa99401..176ce4b2694a 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -92,8 +92,10 @@ #include "scui_def.hxx" //CHINA001 #include "tabprotection.hxx" #include "clipparam.hxx" +#include "externalrefmgr.hxx" #include +#include using namespace com::sun::star; using ::com::sun::star::uno::Sequence; @@ -1035,6 +1037,13 @@ BOOL ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText, { if ( bEnglish ) { + ::boost::scoped_ptr pExtRefGuard; + if (bApi) + { + ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); + pExtRefGuard.reset(new ScExternalRefManager::ApiGuard(pRefMgr)); + } + // code moved to own method InterpretEnglishString because it is also used in // ScCellRangeObj::setFormulaArray diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index b071cdb3a6a6..2a96561bb303 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1449,7 +1449,8 @@ static ScTokenArray* lcl_fillEmptyMatrix(const ScRange& rRange) ScExternalRefManager::ScExternalRefManager(ScDocument* pDoc) : mpDoc(pDoc), - bInReferenceMarking(false) + mbInReferenceMarking(false), + mbUserInteractionEnabled(true) { maSrcDocTimer.SetTimeoutHdl( LINK(this, ScExternalRefManager, TimeOutHdl) ); maSrcDocTimer.SetTimeout(SRCDOC_SCAN_INTERVAL); @@ -1487,6 +1488,22 @@ ScExternalRefManager::LinkListener::~LinkListener() // ---------------------------------------------------------------------------- +ScExternalRefManager::ApiGuard::ApiGuard(ScExternalRefManager* pMgr) : + mpMgr(pMgr), + mbOldInteractionEnabled(pMgr->mbUserInteractionEnabled) +{ + // We don't want user interaction handled in the API. + mpMgr->mbUserInteractionEnabled = false; +} + +ScExternalRefManager::ApiGuard::~ApiGuard() +{ + // Restore old value. + mpMgr->mbUserInteractionEnabled = mbOldInteractionEnabled; +} + +// ---------------------------------------------------------------------------- + void ScExternalRefManager::getAllCachedTableNames(sal_uInt16 nFileId, vector& rTabNames) const { maRefCache.getAllTableNames(nFileId, rTabNames); @@ -1567,7 +1584,7 @@ void ScExternalRefManager::setCacheTableReferencedPermanently( sal_uInt16 nFileI void ScExternalRefManager::setAllCacheTableReferencedStati( bool bReferenced ) { - bInReferenceMarking = !bReferenced; + mbInReferenceMarking = !bReferenced; maRefCache.setAllCacheTableReferencedStati( bReferenced ); } @@ -1978,8 +1995,8 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri if (pMedium->GetError() != ERRCODE_NONE) return NULL; - // We need this to load encrypted documents with password. - pMedium->UseInteractionHandler(true); + // To load encrypted documents with password, user interaction needs to be enabled. + pMedium->UseInteractionHandler(mbUserInteractionEnabled); ScDocShell* pNewShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL); SfxObjectShellRef aRef = pNewShell; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index c61a6443af99..34718880a9b4 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5264,6 +5264,9 @@ void SAL_CALL ScCellRangeObj::setFormulaArray( ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { + ScExternalRefManager* pRefMgr = pDocSh->GetDocument()->GetExternalRefManager(); + ScExternalRefManager::ApiGuard aExtRefGuard(pRefMgr); + // GRAM_PODF_A1 for API compatibility. bDone = lcl_PutFormulaArray( *pDocSh, aRange, aArray, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); } diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index fc14b53a6372..6c2f00c809f0 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -140,9 +140,12 @@ uno::Sequence SAL_CALL ScFormulaParserObj::parseFormula( if (mpDocShell) { + ScDocument* pDoc = mpDocShell->GetDocument(); + ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); + ScExternalRefManager::ApiGuard aExtRefGuard(pRefMgr); + ScAddress aRefPos( ScAddress::UNINITIALIZED ); ScUnoConversion::FillScAddress( aRefPos, rReferencePos ); - ScDocument* pDoc = mpDocShell->GetDocument(); ScCompiler aCompiler( pDoc, aRefPos); aCompiler.SetGrammar(pDoc->GetGrammar()); SetCompilerFlags( aCompiler ); -- cgit v1.2.3 From 3d56bc6855cf3f2ddff213b59ecb55c16ee63786 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 10 Mar 2010 09:34:01 +0100 Subject: #i109999# added missing help id for automatic testing --- cui/source/dialogs/thesdlg.src | 2 +- cui/source/inc/helpid.hrc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 cui/source/inc/helpid.hrc diff --git a/cui/source/dialogs/thesdlg.src b/cui/source/dialogs/thesdlg.src index f821ab637fdc..16d724473d20 100755 --- a/cui/source/dialogs/thesdlg.src +++ b/cui/source/dialogs/thesdlg.src @@ -84,7 +84,7 @@ ModalDialog RID_SVXDLG_THESAURUS }; Control CT_THES_ALTERNATIVES { -// HelpID = HID_CT_THES_ALTERNATIVES ; + HelpID = HID_CT_THES_ALTERNATIVES ; // also needed for automatic testing to find the control Pos = MAP_APPFONT ( 5 , 45 ) ; Size = MAP_APPFONT ( 225 , 121 ) ; Border = TRUE; diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc old mode 100644 new mode 100755 index 1d98daa179e1..c4a50ec1bf62 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -373,14 +373,15 @@ #define HID_THES_LANGUAGE (HID_CUI_START + 338) #define HID_OFAPAGE_QUOTE_SW_CLB (HID_CUI_START + 339) #define HID_OFAPAGE_QUOTE_CLB (HID_CUI_START + 340) +#define HID_CT_THES_ALTERNATIVES (HID_CUI_START + 341) -// please adjust ACT_SVX_HID_END2 below if you add entries here! +// please adjust ACT_CUI_HID_END below if you add entries here! // ----------------------------------------------------------------------- // Overrun check --------------------------------------------------------- // ----------------------------------------------------------------------- -#define ACT_CUI_HID_END HID_CUI_START + 340 +#define ACT_CUI_HID_END HID_CUI_START + 341 #if ACT_CUI_HID_END > HID_CUI_END #error Resource-Ueberlauf in #line, #file -- cgit v1.2.3 From 9c16e9c69126ac6347154049d264606541bd853d Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Wed, 10 Mar 2010 10:22:55 +0100 Subject: tl74:#i108360#Adaptions to have greenstate for Cat0 --- testautomation/global/sid/all.sid | 1 - testautomation/global/win/dial_p_s.win | 3 --- testautomation/global/win/dial_t_z.win | 8 +++----- testautomation/global/win/edia_d_h.win | 12 ++++++------ testautomation/writer/required/includes/w_007_.inc | 7 ------- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/testautomation/global/sid/all.sid b/testautomation/global/sid/all.sid index e7a1d94c7d58..9e013175a93e 100755 --- a/testautomation/global/sid/all.sid +++ b/testautomation/global/sid/all.sid @@ -487,7 +487,6 @@ ExtrasAnpassen SID_CONFIG ExtrasOptionen SID_OPTIONS_TREEDIALOG ' **** Writer -ExtrasThesaurusWriter FN_THESAURUS_DLG ExtrasKapitelnumerierung FN_NUMBERING_OUTLINE_DLG ExtrasZeilennumerierung FN_LINE_NUMBERING_DLG ExtrasSeitennummer FN_CHANGE_PAGENUM diff --git a/testautomation/global/win/dial_p_s.win b/testautomation/global/win/dial_p_s.win index 7ba153a434b0..accef3714a3b 100755 --- a/testautomation/global/win/dial_p_s.win +++ b/testautomation/global/win/dial_p_s.win @@ -331,9 +331,6 @@ Zusaetze sc:MoreButton:RID_SCDLG_SPEC_FILTER:BTN_MORE FilterkriterienMin sc:ImageButton:RID_SCDLG_SPEC_FILTER:RB_CRITERIA_AREA FilterergebnisMin sc:ImageButton:RID_SCDLG_SPEC_FILTER:RB_COPY_AREA -*SpracheAuswaehlen HID_THES_LANGUAGE -Auswahl cui:ListBox:RID_SVXDLG_THES_LANGUAGE:LB_THES_LANGUAGE - *StandardFilter SID_FILTER FeldName1 sc:ListBox:RID_SCDLG_FILTER:LB_FIELD1 Feldname2 sc:ListBox:RID_SCDLG_FILTER:LB_FIELD2 diff --git a/testautomation/global/win/dial_t_z.win b/testautomation/global/win/dial_t_z.win index e660fdaeaf96..ada6c79efacb 100755 --- a/testautomation/global/win/dial_t_z.win +++ b/testautomation/global/win/dial_t_z.win @@ -142,12 +142,10 @@ Textmarken sw:ComboBox:DLG_INSERT_BOOKMARK:CB_BOOKMARK Loeschen sw:PushButton:DLG_INSERT_BOOKMARK:BT_DELETE *Thesaurus SID_THESAURUS -Wort cui:ListBox:RID_SVXDLG_THESAURUS:LB_WORD Ersetzen cui:Edit:RID_SVXDLG_THESAURUS:ED_REPL -Bedeutung cui:ListBox:RID_SVXDLG_THESAURUS:LB_MEAN -Synonym cui:ListBox:RID_SVXDLG_THESAURUS:LB_SYNON -Nachschlagen cui:PushButton:RID_SVXDLG_THESAURUS:BTN_LOOKUP -Sprache cui:PushButton:RID_SVXDLG_THESAURUS:BTN_LANGUAGE +RecallCurrentWord cui:ImageButton:RID_SVXDLG_THESAURUS:BTN_LEFT +Wort cui:ComboBox:RID_SVXDLG_THESAURUS:CB_WORD +Sprache cui:MenuButton:RID_SVXDLG_THESAURUS:MB_LANGUAGE *Ueberblenden SID_POLYGON_MORPHING Attributierung sd:CheckBox:DLG_MORPH:CBX_ATTRIBUTES diff --git a/testautomation/global/win/edia_d_h.win b/testautomation/global/win/edia_d_h.win index a95bf2b755d4..815beca5591b 100755 --- a/testautomation/global/win/edia_d_h.win +++ b/testautomation/global/win/edia_d_h.win @@ -469,12 +469,12 @@ NewEntry cui:PushButton:RID_SVX_MDLG_HANGULHANJA_EDIT:PB_HHE_NEW DeleteEntry cui:PushButton:RID_SVX_MDLG_HANGULHANJA_EDIT:PB_HHE_DELETE *Hyphenation HID_HYPHENATE svx:ModalDialog:RID_SVXDLG_HYPHENATE -Wort svx:Edit:RID_SVXDLG_HYPHENATE:ED_WORD -Vor svx:ImageButton:RID_SVXDLG_HYPHENATE:BTN_LEFT -Zurueck svx:ImageButton:RID_SVXDLG_HYPHENATE:BTN_RIGHT -Weiter svx:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_CONTINUE -Entfernen svx:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_DELETE -HyphenateAll svx:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_ALL +Wort cui:Edit:RID_SVXDLG_HYPHENATE:ED_WORD +Vor cui:ImageButton:RID_SVXDLG_HYPHENATE:BTN_LEFT +Zurueck cui:ImageButton:RID_SVXDLG_HYPHENATE:BTN_RIGHT +Weiter cui:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_CONTINUE +Entfernen cui:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_DELETE +HyphenateAll cui:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_ALL *HyphenationOptions HID_LNGDLG_NUM_PREBREAK ZeichenVorUmbruch cui:NumericField:RID_SVXDLG_LNG_ED_NUM_PREBREAK:ED_PREBREAK diff --git a/testautomation/writer/required/includes/w_007_.inc b/testautomation/writer/required/includes/w_007_.inc index 17633575812a..9b9a19ca8676 100644 --- a/testautomation/writer/required/includes/w_007_.inc +++ b/testautomation/writer/required/includes/w_007_.inc @@ -289,13 +289,6 @@ testcase tToolsThesaurus Kontext "Thesaurus" DialogTest ( Thesaurus ) - printlog " In 'Thesaurus' dialog click 'Language'" - Sprache.Click - Kontext "SpracheAuswaehlen" - DialogTest ( SpracheAuswaehlen ) - printlog " Close 'Language' dialog" - SpracheAuswaehlen.Cancel - Kontext "Thesaurus" printlog " Close 'Thesaurus' dialog" Thesaurus.Cancel PrintLog "Close active documents" -- cgit v1.2.3 From 99e81a072b0a4b60c695d1ddc1a063cb0abd88a4 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 10 Mar 2010 09:37:43 -0500 Subject: koheiextref01: Have ScExternalRefManager::ApiGuard take ScDocument pointer, to make its declaration one-liner. --- sc/inc/externalrefmgr.hxx | 2 +- sc/source/ui/docshell/docfunc.cxx | 5 +---- sc/source/ui/docshell/externalrefmgr.cxx | 6 +++--- sc/source/ui/unoobj/cellsuno.cxx | 3 +-- sc/source/ui/unoobj/tokenuno.cxx | 3 +-- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 3f368d9a3189..06704942a8aa 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -394,7 +394,7 @@ public: class ApiGuard { public: - ApiGuard(ScExternalRefManager* pMgr); + ApiGuard(ScDocument* pDoc); ~ApiGuard(); private: ScExternalRefManager* mpMgr; diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 176ce4b2694a..1c457f1760b8 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1039,10 +1039,7 @@ BOOL ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText, { ::boost::scoped_ptr pExtRefGuard; if (bApi) - { - ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); - pExtRefGuard.reset(new ScExternalRefManager::ApiGuard(pRefMgr)); - } + pExtRefGuard.reset(new ScExternalRefManager::ApiGuard(pDoc)); // code moved to own method InterpretEnglishString because it is also used in // ScCellRangeObj::setFormulaArray diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 2a96561bb303..8ce3c621c09d 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1488,9 +1488,9 @@ ScExternalRefManager::LinkListener::~LinkListener() // ---------------------------------------------------------------------------- -ScExternalRefManager::ApiGuard::ApiGuard(ScExternalRefManager* pMgr) : - mpMgr(pMgr), - mbOldInteractionEnabled(pMgr->mbUserInteractionEnabled) +ScExternalRefManager::ApiGuard::ApiGuard(ScDocument* pDoc) : + mpMgr(pDoc->GetExternalRefManager()), + mbOldInteractionEnabled(mpMgr->mbUserInteractionEnabled) { // We don't want user interaction handled in the API. mpMgr->mbUserInteractionEnabled = false; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 34718880a9b4..fb7625f4cd0b 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5264,8 +5264,7 @@ void SAL_CALL ScCellRangeObj::setFormulaArray( ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { - ScExternalRefManager* pRefMgr = pDocSh->GetDocument()->GetExternalRefManager(); - ScExternalRefManager::ApiGuard aExtRefGuard(pRefMgr); + ScExternalRefManager::ApiGuard aExtRefGuard(pDocSh->GetDocument()); // GRAM_PODF_A1 for API compatibility. bDone = lcl_PutFormulaArray( *pDocSh, aRange, aArray, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index 6c2f00c809f0..5e3b3102e14a 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -141,8 +141,7 @@ uno::Sequence SAL_CALL ScFormulaParserObj::parseFormula( if (mpDocShell) { ScDocument* pDoc = mpDocShell->GetDocument(); - ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); - ScExternalRefManager::ApiGuard aExtRefGuard(pRefMgr); + ScExternalRefManager::ApiGuard aExtRefGuard(pDoc); ScAddress aRefPos( ScAddress::UNINITIALIZED ); ScUnoConversion::FillScAddress( aRefPos, rReferencePos ); -- cgit v1.2.3 From 456166f4efbe08ec4253e6ca627b24e4076e016f Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Mon, 15 Mar 2010 14:35:41 +0100 Subject: tl74#i105514#Autotests adapted for new thesaurus dialogs --- testautomation/global/win/dial_t_z.win | 6 - testautomation/global/win/edia_t_z.win | 7 + .../graphics/optional/includes/global/g_tools.inc | 47 ++--- .../optional/includes/spellcheck/w_spellcheck.inc | 228 ++++++--------------- 4 files changed, 94 insertions(+), 194 deletions(-) diff --git a/testautomation/global/win/dial_t_z.win b/testautomation/global/win/dial_t_z.win index ada6c79efacb..9efeef3dd197 100755 --- a/testautomation/global/win/dial_t_z.win +++ b/testautomation/global/win/dial_t_z.win @@ -141,12 +141,6 @@ Umrandung sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_BORDER Textmarken sw:ComboBox:DLG_INSERT_BOOKMARK:CB_BOOKMARK Loeschen sw:PushButton:DLG_INSERT_BOOKMARK:BT_DELETE -*Thesaurus SID_THESAURUS -Ersetzen cui:Edit:RID_SVXDLG_THESAURUS:ED_REPL -RecallCurrentWord cui:ImageButton:RID_SVXDLG_THESAURUS:BTN_LEFT -Wort cui:ComboBox:RID_SVXDLG_THESAURUS:CB_WORD -Sprache cui:MenuButton:RID_SVXDLG_THESAURUS:MB_LANGUAGE - *Ueberblenden SID_POLYGON_MORPHING Attributierung sd:CheckBox:DLG_MORPH:CBX_ATTRIBUTES GleicheOrientierung sd:CheckBox:DLG_MORPH:CBX_ORIENTATION diff --git a/testautomation/global/win/edia_t_z.win b/testautomation/global/win/edia_t_z.win index 67465a360f91..77fb020d48a1 100755 --- a/testautomation/global/win/edia_t_z.win +++ b/testautomation/global/win/edia_t_z.win @@ -128,6 +128,13 @@ RecentFile HID_XML_FILTER_TEST_IMPORT_RECENT FixedRecentFile HID_XML_FILTER_TEST_IMPORT_RECENT_FILE CloseBtn HID_XML_FILTER_TEST_CLOSE +*Thesaurus SID_THESAURUS +CurrentWord cui:ComboBox:RID_SVXDLG_THESAURUS:CB_WORD +RecallCurrentWord cui:ImageButton:RID_SVXDLG_THESAURUS:BTN_LEFT +Alternatives HID_CT_THES_ALTERNATIVES +ReplaceWith cui:Edit:RID_SVXDLG_THESAURUS:ED_REPL +Language cui:MenuButton:RID_SVXDLG_THESAURUS:MB_LANGUAGE + *UnsatisfiedDependencies desktop:ModalDialog:RID_DLG_DEPENDENCIES UnsatisfiedDependencyList desktop:ListBox:RID_DLG_DEPENDENCIES:RID_DLG_DEPENDENCIES_LIST diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc index 3fe80cd9f189..3de5d8b39a98 100644 --- a/testautomation/graphics/optional/includes/global/g_tools.inc +++ b/testautomation/graphics/optional/includes/global/g_tools.inc @@ -40,7 +40,7 @@ '------------------------------------------------------------------------------- testcase tiToolsThesaurus - Dim DasWort$ + Dim DasWort as string Dim ZaehlerBedeutung '/// for normal text, the thesaurus is enabled, if the format->character->language of the word has a thesaurus///' @@ -57,32 +57,32 @@ testcase tiToolsThesaurus endif select case iSprache - case 01 : DasWort$ = "Hello" - case 03 : DasWort$ = "Alo" + case 01 : DasWort = "Hello" + case 03 : DasWort = "Alo" case 07 : printlog "- No Thesaur for Russian available" goto endsub case 30 : Printlog "- No Thesaurus available !" goto endsub - case 31 : DasWort$ = "Guiten" - case 33 : DasWort$ = "Bonjour" - case 34 : DasWort$ = "Hola" + case 31 : DasWort = "Guiten" + case 33 : DasWort = "Bonjour" + case 34 : DasWort = "Hola" case 35 : Printlog "- No Thesaurus available !" goto endsub case 36 : Printlog "- No Thesaurus available !" goto endsub case 37 : Printlog "- No Thesaurus available !" goto endsub - case 39 : DasWort$ = "Ciao" + case 39 : DasWort = "Ciao" case 42 : Printlog "- No Thesaurus available !" goto endsub - case 45 : DasWort$ = "Hej" - case 46 : DasWort$ = "Välkommen" + case 45 : DasWort = "Hej" + case 46 : DasWort = "Välkommen" case 47 : Printlog "- No Thesaurus available !" goto endsub case 48 : Printlog "- No Thesaurus in Polish!" goto endsub - case 49 : DasWort$ = "Hallo" - case 50 : DasWort$ = "Prosojnica" + case 49 : DasWort = "Hallo" + case 50 : DasWort = "Prosojnica" case 51 : Printlog "- No Thesaurus available !" goto endsub case 55 : Printlog "- No Thesaurus in Brazilian!" @@ -92,10 +92,10 @@ testcase tiToolsThesaurus case else : if bAsianLan then hSetSpellHypLanguage - DasWort$ = "Hello" + DasWort = "Hello" else Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" - DasWort$ = "Hello" + DasWort = "Hello" endif end select @@ -110,9 +110,9 @@ testcase tiToolsThesaurus PrintLog " No Thesaurus available" endcatch - PrintLog " Thesaurus with 1 word: " + DasWort$ + PrintLog " Thesaurus with 1 word: " + DasWort - Call hTextrahmenErstellen (DasWort$,20,20,50,30) + Call hTextrahmenErstellen (DasWort,20,20,50,30) sleep 1 hTypeKeys "" @@ -129,23 +129,23 @@ sleep 1 ExtrasThesaurusDraw '/// Thesaurus with only 1 word ///' Kontext "Thesaurus" if Thesaurus.Exists(3) then - if Wort.GetSelText <> DasWort$ Then WarnLog "marked word should be:" + DasWort$ + " but it is:" + Wort.GetSelText - if Wort.GetSelText = DasWort$ Then PrintLog " Marked word is correctly changed" '/// Control if word has changed ///' - ZaehlerBedeutung=Bedeutung.GetItemCount - if Bedeutung.GetItemCount = 0 Then + if CurrentWord.GetSelText <> DasWort Then WarnLog "marked word should be:" + DasWort + " but it is:" + CurrentWord.GetSelText + if CurrentWord.GetSelText = DasWort Then PrintLog " Marked word is correctly changed" '/// Control if word has changed ///' + ZaehlerBedeutung=Alternatives.GetItemCount + if Alternatives.GetItemCount = 0 Then PrintLog " There are no suggestions for this word" sleep 1 else if ZaehlerBedeutung=1 Then - Bedeutung.Select ZaehlerBedeutung + Alternatives.Select ZaehlerBedeutung else - Bedeutung.Select (ZaehlerBedeutung - 1) + Alternatives.Select (ZaehlerBedeutung - 1) end if sleep 1 Synonym.Select 1 '/// Select synonym 1///' sleep 1 if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field" - if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Bedeutung.GetSelText + "' but it is '" + Ersetzen.GetText+"'" + if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Alternatives.GetSelText + "' but it is '" + Ersetzen.GetText+"'" endif Thesaurus.Cancel else @@ -219,7 +219,8 @@ testcase tiToolsHyphenation2 dim iWaitIndex as integer dim sExt as string - Dim i : Dim DasWort : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7 + Dim i : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7 + Dim DasWort as string dim sDraw as string dim sFile as string PrintLog "- Tools/Hyphenation2" diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc index e4818c34029f..894e60cd1bdc 100644 --- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc +++ b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc @@ -1228,7 +1228,7 @@ endcase testcase tToolsThesaurus Dim sWordInitial as string - Dim sLanguageToBeSelected as string + Dim sLanguageToBeSelected as integer Dim sWordToBeFound as string Dim sWordReplacedWith as string Dim i as integer @@ -1283,19 +1283,13 @@ testcase tToolsThesaurus '/// Call Thesaurus without a written word /// ToolsLanguageThesaurus Kontext "Thesaurus" - if Ersetzen.GetText <> "" then Warnlog "- Though no word has been selected there is a replacetext in the textfield!" - printlog "- enter one word and search" - Ersetzen.SetText sWordInitial - Nachschlagen.Click - Kontext "Active" - if Active.Exists then - Warnlog Active.Gettext - Active.ok - end if - Kontext "Thesaurus" - if Bedeutung.GetSelText(1) = "" then Warnlog "No meaning text" - if Ersetzen.Gettext = "" then Ersetzen.SetText = sWordInitial - sWordToBeFound = Ersetzen.GetText + if CurrentWord.GetSelText <> "" then Warnlog "- Though no word has been selected Current Word textfield is filled !" + if ReplaceWith.GetText <> "" then Warnlog "- Though no word has been selected there is a replacetext in the textfield!" + printlog "Set language dependent word in textfield Current Word" + CurrentWord.Settext sWordInitial + if Alternatives.GetSelText(1) = "" then Warnlog "No alternatives text" + if ReplaceWith.Gettext <> Alternatives.GetSelText(1) then Warnlog "Replace with textfield was not filled with word from alternative" + sWordToBeFound = ReplaceWith.GetText Thesaurus.OK Call wTypeKeys "" wait 200 @@ -1310,166 +1304,70 @@ testcase tToolsThesaurus printlog " Open new preformatted-document where the formatting is set to the language we wish to test." call hFileOpen (TheFile,false) - Call sMakeReadOnlyDocumentEditable - - printlog "- check the language" - Call wTypeKeys sWordInitial + "" - '/// Check language in Thesaurus /// - ToolsLanguageThesaurus - Kontext "Thesaurus" - - Sprache.Click - Kontext "SpracheAuswaehlen" - select case iSprache ' iSystemSprache - case 01 : sLanguageToBeSelected = "English (USA)" - case 07 : sLanguageToBeSelected = "РуÑÑкий" - case 03 : sLanguageToBeSelected = "Português" - case 31 : sLanguageToBeSelected = "Nederlands (NL)" - case 33 : sLanguageToBeSelected = "Français (France)" - case 34 : sLanguageToBeSelected = "Español (España)" - case 36 : sLanguageToBeSelected = "Madyar" - case 39 : sLanguageToBeSelected = "Italiano (Italia)" - case 45 : sLanguageToBeSelected = "Dansk" - case 46 : sLanguageToBeSelected = "svenska (Sverige)" - case 48 : sLanguageToBeSelected = "Polski" - case 49 : sLanguageToBeSelected = "Deutsch (Deutschland)" - end select - SpracheAuswaehlen.OK - Sleep 5 - - Kontext "Thesaurus" - printlog "- Search for a Synonym" - '/// Search for a synonym /// - Synonym.Select 1 - wait 500 - sWordToBeFound = Synonym.GetSelText - if Ersetzen.GetText <> sWordToBeFound then Warnlog "Synonym has not been taken over" - Nachschlagen.Click - wait 500 - if Wort.GetSelText <> sWordToBeFound then Warnlog "Synonym has not been added to the word listand activated" - - printlog "- Search for a meaning" - '/// Search for a meaning /// - wait 500 - Bedeutung.Select 1 - wait 500 - Nachschlagen.Click - Sleep 1 - Kontext "Active" - if Active.Exists then - printlog "- " + Active.Gettext - Active.Ok - Kontext "Thesaurus" - else ' Nur wenn Wort auch enthalten ist - Kontext "Thesaurus" - for i = 1 to 100 - if Bedeutung.GetSeltext <> "" then i = 101 - Sleep 1 - next i - sWordToBeFound = Bedeutung.GetSelText - if Instr ( Ersetzen.GetText, sWordToBeFound ) <> 0 then - Warnlog "Meaning has not been overtaken" - end if - end if - - printlog "- Replace unchecked ( Cursor in front of words 1. character )" - '/// replace unchecked /// - sWordReplacedWith = Ersetzen.GetText - Thesaurus.OK - Call wTypeKeys "" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText - - Call wTypeKeys "" + sWordInitial + Call sMakeReadOnlyDocumentEditable + + Call wTypeKeys sWordInitial Call wTypeKeys "" - printlog "- Replace unchecked ( Cursor in word )" + printlog "- Replace ( select alternative with cursor within word )" ToolsLanguageThesaurus Kontext "Thesaurus" wait 500 - if Synonym.GetItemCount >0 then - Synonym.Select 1 - sWordReplacedWith = Ersetzen.GetText - Thesaurus.OK - Call wTypeKeys "" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText - else - Warnlog "- No Synonym when cursor is in word!" - Thesaurus.Ok - end if - - Call wTypeKeys "" - Call wTypeKeys sWordInitial + "" + if CurrentWord.GetSeltext = sWordInitial then + sWordToBeFound = ReplaceWith.Gettext + if Alternatives.GetItemCount > 0 then + printlog "Select last entry in alternatives list" + Alternatives.Select Alternatives.GetItemCount + Alternatives.TypeKeys "" + if ReplaceWith.Gettext = sWordToBeFound then + Warnlog "Though alternative was selected replace with was not changed" + else + sWordToBeFound = ReplaceWith.Gettext + end if + Thesaurus.OK + Call wTypeKeys "" + wait 200 + EditCopy + if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText + else + Warnlog "- No Alternative for current word" + Thesaurus.Ok + end if + else + Warnlog "Current word is not selected word !" + end if + Call wTypeKeys "" + Call wTypeKeys sWordInitial + printlog "- Replace unchecked ( Cursor at words end )" ToolsLanguageThesaurus Kontext "Thesaurus" - if Synonym.GetItemCount >0 then - Synonym.Select 1 - sWordReplacedWith = Ersetzen.GetText - Thesaurus.OK - Call wTypeKeys "" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + Trim$(GetClipboardText) - else - Warnlog "- No sysnonym when cursor pointed to words end!" - Thesaurus.Ok - end if - - Call wTypeKeys "" - Call wTypeKeys sWordInitial + "" - - printlog "- Replace checked ( back to front )" - '/// replace checked /// - ToolsLanguageThesaurus - Kontext "Thesaurus" - if Synonym.GetItemCount >0 then - Synonym.Select 1 - sWordReplacedWith = Ersetzen.GetText - Thesaurus.Ok - Call wTypeKeys "" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText - else - Nachschlagen.Click - Kontext "Active" - if Active.Exists then - Active.Ok - Kontext "Thesaurus" - Thesaurus.OK - end if - end if - - Call wTypeKeys "" - Call wTypeKeys sWordInitial + "" - printlog "- Replace checked ( front to back )" - ToolsLanguageThesaurus - Kontext "Thesaurus" - if Synonym.GetItemCount >0 then - Synonym.Select 1 - sWordReplacedWith = Ersetzen.GetText - Thesaurus.Ok - Call wTypeKeys "" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText - else - Warnlog "- No sysnonym when word is marked!" - Thesaurus.Ok - end if - - Call wTypeKeys "" - Call wTypeKeys sWordInitial + "" - - printlog "- Part of Replace checked ( back to front ) - no checking anymore" - ToolsLanguageThesaurus - Kontext "Thesaurus" - Thesaurus.OK + wait 500 + if CurrentWord.GetSeltext = sWordInitial then + sWordToBeFound = ReplaceWith.Gettext + if Alternatives.GetItemCount > 0 then + printlog "Select last entry in alternatives list" + Alternatives.Select Alternatives.GetItemCount + Alternatives.TypeKeys "" + if ReplaceWith.Gettext = sWordToBeFound then + Warnlog "Though alternative was selected replace with was not changed" + else + sWordToBeFound = ReplaceWith.Gettext + end if + Thesaurus.OK + Call wTypeKeys "" + wait 200 + EditCopy + if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText + else + Warnlog "- No Alternative for current word" + Thesaurus.Ok + end if + else + Warnlog "Current word is not selected word !" + end if + '/// Close thesaurus and writerdocument /// Call hCloseDocument endcase -- cgit v1.2.3 From dbb03cb9bb4d922340ae08725032ad2f870eccd0 Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Wed, 17 Mar 2010 08:32:18 +0100 Subject: tl74#i108360#Adaptions for new thesaurus dialog --- .../writer/optional/includes/spellcheck/w_spellcheck.inc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc index 894e60cd1bdc..018411859667 100644 --- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc +++ b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc @@ -1287,8 +1287,14 @@ testcase tToolsThesaurus if ReplaceWith.GetText <> "" then Warnlog "- Though no word has been selected there is a replacetext in the textfield!" printlog "Set language dependent word in textfield Current Word" CurrentWord.Settext sWordInitial - if Alternatives.GetSelText(1) = "" then Warnlog "No alternatives text" - if ReplaceWith.Gettext <> Alternatives.GetSelText(1) then Warnlog "Replace with textfield was not filled with word from alternative" + wait 500 + if Alternatives.GetItemCount > 0 then + Warnlog "No alternatives text" + else + if ReplaceWith.Gettext <> Alternatives.GetSelText(1) then + Warnlog "Replace with textfield was not filled with word from alternative" + endif + endif sWordToBeFound = ReplaceWith.GetText Thesaurus.OK Call wTypeKeys "" @@ -1315,7 +1321,7 @@ testcase tToolsThesaurus wait 500 if CurrentWord.GetSeltext = sWordInitial then sWordToBeFound = ReplaceWith.Gettext - if Alternatives.GetItemCount > 0 then + if Alternatives.GetItemCount = 0 then printlog "Select last entry in alternatives list" Alternatives.Select Alternatives.GetItemCount Alternatives.TypeKeys "" @@ -1328,7 +1334,7 @@ testcase tToolsThesaurus Call wTypeKeys "" wait 200 EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText + if GetClipboardText <> sWordToBeFound then Warnlog "Text has not been correctly replaced, not => " + sWordToBeFound + " but => " + GetClipboardText else Warnlog "- No Alternative for current word" Thesaurus.Ok @@ -1359,7 +1365,7 @@ testcase tToolsThesaurus Call wTypeKeys "" wait 200 EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText + if GetClipboardText <> sWordToBeFound then Warnlog "Text has not been correctly replaced, not => " + sWordToBeFound + " but => " + GetClipboardText else Warnlog "- No Alternative for current word" Thesaurus.Ok -- cgit v1.2.3 From a4ae1e9adf533d36cfbedf2eb4a1b2c0f7942025 Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Wed, 17 Mar 2010 08:51:07 +0100 Subject: tl74#i108360#Adaptions for new thesaurus dialog --- testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc index 018411859667..c208ae271609 100644 --- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc +++ b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc @@ -1288,7 +1288,7 @@ testcase tToolsThesaurus printlog "Set language dependent word in textfield Current Word" CurrentWord.Settext sWordInitial wait 500 - if Alternatives.GetItemCount > 0 then + if Alternatives.GetItemCount = 0 then Warnlog "No alternatives text" else if ReplaceWith.Gettext <> Alternatives.GetSelText(1) then @@ -1321,7 +1321,7 @@ testcase tToolsThesaurus wait 500 if CurrentWord.GetSeltext = sWordInitial then sWordToBeFound = ReplaceWith.Gettext - if Alternatives.GetItemCount = 0 then + if Alternatives.GetItemCount > 0 then printlog "Select last entry in alternatives list" Alternatives.Select Alternatives.GetItemCount Alternatives.TypeKeys "" -- cgit v1.2.3 From 64fbe820a6063d1347397457f8aff6eb91183fd4 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 17 Mar 2010 12:15:04 +0100 Subject: cws tl74: #i107768# fix for thesaurus crash --- hunspell/hunspell-1.2.8-thesfix.patch | 28 ++++++++++++++++++++++++++++ hunspell/makefile.mk | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 hunspell/hunspell-1.2.8-thesfix.patch diff --git a/hunspell/hunspell-1.2.8-thesfix.patch b/hunspell/hunspell-1.2.8-thesfix.patch new file mode 100644 index 000000000000..c41fde45050f --- /dev/null +++ b/hunspell/hunspell-1.2.8-thesfix.patch @@ -0,0 +1,28 @@ +--- misc/hunspell-1.2.8/src/hunspell/hunspell.cxx 2010-03-16 14:37:36.998879385 +0100 ++++ misc/build/hunspell-1.2.8/src/hunspell/hunspell.cxx 2010-03-16 14:37:10.416222464 +0100 +@@ -1666,7 +1666,7 @@ + if (!q2) return 0; // bad XML input + if (check_xml_par(q, "type=", "analyze")) { + int n = 0, s = 0; +- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) n = analyze(slst, cw); ++ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) n = analyze(slst, cw); + if (n == 0) return 0; + // convert the result to ana1ana2 format + for (int i = 0; i < n; i++) s+= strlen((*slst)[i]); +@@ -1687,13 +1687,13 @@ + (*slst)[0] = r; + return 1; + } else if (check_xml_par(q, "type=", "stem")) { +- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) return stem(slst, cw); ++ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) return stem(slst, cw); + } else if (check_xml_par(q, "type=", "generate")) { +- int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN); ++ int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1); + if (n == 0) return 0; + char * q3 = strstr(q2 + 1, "'), MAXWORDUTF8LEN)) { ++ if (get_xml_par(cw2, strchr(q3, '>'), MAXWORDUTF8LEN - 1)) { + return generate(slst, cw, cw2); + } + } else { diff --git a/hunspell/makefile.mk b/hunspell/makefile.mk index b20e8d135887..db6eb1029d98 100644 --- a/hunspell/makefile.mk +++ b/hunspell/makefile.mk @@ -43,7 +43,8 @@ TARFILE_ROOTDIR=hunspell-1.2.8 PATCH_FILES=\ hunspell-1.2.8.patch \ - hunspell-consts-1.2.8.patch # hunspell#2064983 + hunspell-consts-1.2.8.patch # hunspell#2064983 \ + hunspell-1.2.8-thesfix.patch # hunspell #i107768 .IF "$(GUI)"=="UNX" #CONFIGURE_DIR=$(BUILD_DIR) -- cgit v1.2.3 From 76bf13636f12f7b56b6b48775183cd255b50cd56 Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Wed, 17 Mar 2010 13:12:40 +0100 Subject: tl74#i108360#Adaptions for new thesaurus dialog --- testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc index c208ae271609..e96c205cf79c 100644 --- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc +++ b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc @@ -1232,6 +1232,7 @@ testcase tToolsThesaurus Dim sWordToBeFound as string Dim sWordReplacedWith as string Dim i as integer + Dim j as integer Dim TheFile as String PrintLog "- Tools / Thesaurus" @@ -1287,11 +1288,12 @@ testcase tToolsThesaurus if ReplaceWith.GetText <> "" then Warnlog "- Though no word has been selected there is a replacetext in the textfield!" printlog "Set language dependent word in textfield Current Word" CurrentWord.Settext sWordInitial + wait 500 if Alternatives.GetItemCount = 0 then Warnlog "No alternatives text" else - if ReplaceWith.Gettext <> Alternatives.GetSelText(1) then + if ReplaceWith.Gettext <> Alternatives.GetText(Alternatives.GetSelIndex) then Warnlog "Replace with textfield was not filled with word from alternative" endif endif -- cgit v1.2.3 From 6c0d5a5b1cc02b72931d0f2ff57607ead6fb0a0a Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Wed, 17 Mar 2010 15:02:10 +0100 Subject: tl74#i1601#Added slots Toggle case, First Letter Capitalized and Sentence case --- testautomation/global/sid/e_all.sid | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid index 8083a6ebe727..3ae2ed4e8417 100755 --- a/testautomation/global/sid/e_all.sid +++ b/testautomation/global/sid/e_all.sid @@ -415,6 +415,9 @@ FormatStylesLoad SID_TEMPLATE_LOAD FormatStylist SID_STYLE_DESIGNER FormatControl SID_FM_CTL_PROPERTIES FormatForm SID_FM_PROPERTIES +FormatChangeCaseToSentence .uno:ChangeCaseToSentenceCase +FormatChangeCaseCapitalizeEveryWord .uno:ChangeCaseToTitleCase +FormatChangeCaseToggleCase .uno:ChangeCaseToToggleCase FormatChangeCaseUpper .uno:ChangeCaseToUpper FormatChangeCaseLower .uno:ChangeCaseToLower FormatChangeCaseHalfWidth .uno:ChangeCaseToHalfWidth -- cgit v1.2.3 From f119d919823f94c1c73e4d77f485c91a077b1035 Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Wed, 17 Mar 2010 15:30:54 +0100 Subject: tl74#i1601#Added slots Toggle case, First Letter Capitalized and Sentence case --- testautomation/writer/required/includes/w_005_.inc | 43 +++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/testautomation/writer/required/includes/w_005_.inc b/testautomation/writer/required/includes/w_005_.inc index 830ce39adc24..93fe9ac0237b 100644 --- a/testautomation/writer/required/includes/w_005_.inc +++ b/testautomation/writer/required/includes/w_005_.inc @@ -232,14 +232,55 @@ testcase tFormatChangeCase printlog " Open new document" Call hNewDocument printlog " Insert some text in document and select text" - Call wTypeKeys ("Hello World!") + Call wTypeKeys ("call him now ! please") Call wTypeKeys ("") printlog " Format / Case Characters / Upper" hUseAsyncSlot( "FormatChangeCaseUpper" ) + EditCopy + if GetClipboardtext() <> "CALL HIM NOW ! PLEASE" then + Warnlog "Sentence not 'CALL HIM NOW ! PLEASE' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif printlog " Format / Case Characters / Lower" hUseAsyncSlot( "FormatChangeCaseLower" ) + EditCopy + if GetClipboardtext() <> "call him now ! please" then + Warnlog "Sentence not 'call him now ! please' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif + + printlog " Format / Case Characters / Sentence Case" + FormatChangeCaseToSentence + EditCopy + if GetClipboardtext() <> "Call him now ! Please" then + Warnlog "Sentence not 'Call him now ! Please' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif + + printlog " Format / Case Characters / Capitalize every word" + FormatChangeCaseCapitalizeEveryWord + EditCopy + if GetClipboardtext() <> "Call Him Now ! Please" then + Warnlog "Sentence not 'Call Him Now ! Please' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif + + + printlog " Format / Case Characters / tOGGLE cASE" + FormatChangeCaseToggleCase + EditCopy + if GetClipboardtext() <> "cALL hIM nOW ! pLEASE" then + Warnlog "Sentence not 'cALL hIM nOW ! pLEASE' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif + if ( gAsianSup ) then try -- cgit v1.2.3 From 517fb6fdb13d6e008f2141193a9296cba626a0d8 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Thu, 18 Mar 2010 13:09:36 +0100 Subject: tl74: #108360# fixed for new thesaurus and refactoring --- testautomation/graphics/optional/g_tools.bas | 2 + .../graphics/optional/includes/global/g_tools.inc | 212 +++++++++++++-------- testautomation/graphics/required/d_updt.bas | 2 +- testautomation/graphics/required/i_updt_1.bas | 2 +- .../graphics/required/includes/global/id_006.inc | 206 +++++++++++--------- testautomation/graphics/tools/id_tools_2.inc | 18 -- 6 files changed, 246 insertions(+), 196 deletions(-) diff --git a/testautomation/graphics/optional/g_tools.bas b/testautomation/graphics/optional/g_tools.bas index bb890f970722..bb65e6b27d43 100755 --- a/testautomation/graphics/optional/g_tools.bas +++ b/testautomation/graphics/optional/g_tools.bas @@ -43,6 +43,7 @@ sub main PrintLog "-------------------------" + gApplication + "-------------------" Call tiToolsThesaurus + Call tiToolsThesaurusWithoutText Call tiToolsHyphenation1 Call tiToolsHyphenation2 Call tToolsMacro @@ -50,6 +51,7 @@ sub main gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" Call tiToolsThesaurus + Call tiToolsThesaurusWithoutText Call tiToolsHyphenation1 Call tiToolsHyphenation2 Call tToolsMacro diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc index 3de5d8b39a98..dcfe8707d6d6 100644 --- a/testautomation/graphics/optional/includes/global/g_tools.inc +++ b/testautomation/graphics/optional/includes/global/g_tools.inc @@ -40,49 +40,54 @@ '------------------------------------------------------------------------------- testcase tiToolsThesaurus - Dim DasWort as string - Dim ZaehlerBedeutung - -'/// for normal text, the thesaurus is enabled, if the format->character->language of the word has a thesaurus///' -'///+ unfortunately in textboxes this doesn't work, you can give the word a langauge, but this is been ignored by///' -'///+ our thesaurus :-(((///' -'/// so especially for asian languages you have to set a default language in the options, to be able to use///' -'///+ the thesaurus there - fallback to englisch, because there is no ? thesaurus for cjk languages ??///' - - '/// First we make sure we test a language where Thesa - ' As long as OOo has no modules for that, disabled - if gOOO = True then - printlog "No spellchecking in OOo" - goto endsub - endif + Dim sWord as string + Dim sChangedWord as string + Dim sReplaceWord as string + Dim sExt as string + Dim ZaehlerBedeutung + 'for normal text, the thesaurus is enabled, + 'if the format->character->language of the word has a thesaurus + 'unfortunately in textboxes this doesn't work, you can give the word a langauge, + 'but this is been ignored by our thesaurus + 'so especially for asian languages you have to set a default language in the options, + 'to be able to use the thesaurus there - fallback to englisch, + 'because there is no thesaurus for cjk languages + + 'As long as OOo has no modules for that, disabled + if gOOO = True then + printlog "No spellchecking in OOo" + goto endsub + endif + + 'First we make sure we test a language where Thesaurus select case iSprache - case 01 : DasWort = "Hello" - case 03 : DasWort = "Alo" + case 01 : sWord = "Hello" + case 03 : sWord = "Alo" case 07 : printlog "- No Thesaur for Russian available" goto endsub case 30 : Printlog "- No Thesaurus available !" goto endsub - case 31 : DasWort = "Guiten" - case 33 : DasWort = "Bonjour" - case 34 : DasWort = "Hola" + case 31 : sWord = "Guiten" + case 33 : sWord = "Bonjour" + case 34 : sWord = "Hola" case 35 : Printlog "- No Thesaurus available !" goto endsub case 36 : Printlog "- No Thesaurus available !" goto endsub case 37 : Printlog "- No Thesaurus available !" goto endsub - case 39 : DasWort = "Ciao" + case 39 : sWord = "Ciao" case 42 : Printlog "- No Thesaurus available !" goto endsub - case 45 : DasWort = "Hej" - case 46 : DasWort = "Välkommen" + case 45 : sWord = "Hej" + case 46 : sWord = "Välkommen" case 47 : Printlog "- No Thesaurus available !" goto endsub case 48 : Printlog "- No Thesaurus in Polish!" goto endsub - case 49 : DasWort = "Hallo" - case 50 : DasWort = "Prosojnica" + case 49 : sWord = "Hallo" + case 50 : sWord = "Prosojnica" case 51 : Printlog "- No Thesaurus available !" goto endsub case 55 : Printlog "- No Thesaurus in Brazilian!" @@ -92,72 +97,113 @@ testcase tiToolsThesaurus case else : if bAsianLan then hSetSpellHypLanguage - DasWort = "Hello" + sWord = "Hello" else Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" - DasWort = "Hello" + sWord = "Hello" endif end select + + PrintLog "Thesaurus with 1 word: " + sWord + + if( Ucase(gApplication) = "DRAW" ) then + sExt = ".odg" + elseif( Ucase(gApplication) = "IMPRESS" ) then + sExt = ".odp" + endif + + Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) + + Call hTextrahmenErstellen (sWord,20,20,50,30) + sleep 1 + + printlog "select the word" + hTypeKeys "" + + try + ExtrasThesaurusDraw + catch + warnlog "No Thesaurus available." + hCloseDocument() + goto endsub + endcatch + + Kontext "Thesaurus" + if Thesaurus.Exists(3) then + + if CurrentWord.GetSelText <> sWord Then + WarnLog "marked word should be:" + sWord + " but it is:" + CurrentWord.GetSelText + else + PrintLog "Marked word is correctly changed" + endif - printlog " Thesaurus without any word in the document" - Call hNewDocument '/// New document ///' - try - ExtrasThesaurusDraw '/// try thesaurus in empty document ///' - Kontext "Thesaurus" - Thesaurus.Cancel - WarnLog " If no word is in the document, Thesaurus shouldn't be available" - catch - PrintLog " No Thesaurus available" - endcatch - - PrintLog " Thesaurus with 1 word: " + DasWort - - Call hTextrahmenErstellen (DasWort,20,20,50,30) - sleep 1 - - hTypeKeys "" - '------------------------ -ToolsOptions -Kontext "ExtrasOptionenDlg" -hToolsOptions("LANGUAGESETTINGS","Languages") -Westlich.Select 34 -Kontext "ExtrasOptionenDlg" -ExtrasOptionenDlg.OK -sleep 1 - '------------------------ - try - ExtrasThesaurusDraw '/// Thesaurus with only 1 word ///' - Kontext "Thesaurus" - if Thesaurus.Exists(3) then - if CurrentWord.GetSelText <> DasWort Then WarnLog "marked word should be:" + DasWort + " but it is:" + CurrentWord.GetSelText - if CurrentWord.GetSelText = DasWort Then PrintLog " Marked word is correctly changed" '/// Control if word has changed ///' - ZaehlerBedeutung=Alternatives.GetItemCount if Alternatives.GetItemCount = 0 Then - PrintLog " There are no suggestions for this word" - sleep 1 + warnlog "There are no alternative for this word" + sleep 1 else - if ZaehlerBedeutung=1 Then - Alternatives.Select ZaehlerBedeutung - else - Alternatives.Select (ZaehlerBedeutung - 1) - end if - sleep 1 - Synonym.Select 1 '/// Select synonym 1///' - sleep 1 - if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field" - if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Alternatives.GetSelText + "' but it is '" + Ersetzen.GetText+"'" - endif - Thesaurus.Cancel - else - warnlog " thesaurus didn't come up, that's bad :-(" - end if - catch - warnLog " No Thesaurus available ??! check if options western has smth selected !! !TL!" - endcatch - Call hCloseDocument '/// Close document ///' - -endcase 'tiToolsThesaurus + printlog "select the first alternative" + Alternatives.Select 1 + + printlog "check if the selected alternative apprear in the ReplaceWith field." + if ( ReplaceWith.getText() <> Alternatives.getSeltext(1,3) ) then + warnlog "the text is no transfered to the ReplaceWith field." + else + printlog "the text is transfered to the ReplaceWith field." + endif + + sReplaceWord = ReplaceWith.getText() + sleep 1 + endif + Thesaurus.OK + + if(Ucase(gApplication) = "DRAW") then + Kontext "Draw" + elseif(Ucase(gApplication) = "IMPRESS") then + Kontext "Impress" + else ' fallback + warnlog "gApplication is wrong" + goto endsub + endif + + hTypeKeys "" + EditCopy + sChangedWord = getClipboard() + printlog "sChangedWord = " + sChangedWord + if(sChangedWord <> sReplaceWord) then + warnlog "the text was not replaced" + else + printlog "the text was successfull replaced" + endif + else + warnlog "thesaurus didn't come up." + end if + + Call hCloseDocument + +endcase +'------------------------------------------------------------------------------- +testcase tiToolsThesaurusWithoutText + + printlog "Thesaurus without any word in the document" + Call hNewDocument + try + ExtrasThesaurusDraw + catch + PrintLog "the Thesaurus is correctly not available" + call hCloseDocument + goto endsub + endcatch + + WarnLog "If no word is in the document, Thesaurus shouldn't be available" + Kontext "Thesaurus" + if Thesaurus.Exists then + Thesaurus.Cancel + endif + + Call hCloseDocument + +endcase '------------------------------------------------------------------------------- testcase tiToolsHyphenation1 diff --git a/testautomation/graphics/required/d_updt.bas b/testautomation/graphics/required/d_updt.bas index 9d56a2c87fed..d191f2adea1c 100755 --- a/testautomation/graphics/required/d_updt.bas +++ b/testautomation/graphics/required/d_updt.bas @@ -63,7 +63,7 @@ sub main call id_004 Call D_005_ call id_005 - call id_006 + call id_Tools call d_007 call id_007 call id_008 diff --git a/testautomation/graphics/required/i_updt_1.bas b/testautomation/graphics/required/i_updt_1.bas index 1d9b28f2aea9..141b261e3ee9 100755 --- a/testautomation/graphics/required/i_updt_1.bas +++ b/testautomation/graphics/required/i_updt_1.bas @@ -58,7 +58,7 @@ sub main Call im_004_ call id_004 call id_005 - call id_006 + call id_Tools Call hStatusOut end sub diff --git a/testautomation/graphics/required/includes/global/id_006.inc b/testautomation/graphics/required/includes/global/id_006.inc index 948cab1c4a04..a2a435735268 100644 --- a/testautomation/graphics/required/includes/global/id_006.inc +++ b/testautomation/graphics/required/includes/global/id_006.inc @@ -42,7 +42,21 @@ ' #1 tiToolsOptions '\********************************************************************************** - +'------------------------------------------------------------------------------ +sub id_Tools + printLog "--------- id_006 ----------" + call tiToolsSpellchecking + call tiToolsSpellcheckingAutomatic + call tiToolsThesaurus + call tiToolsHyphenation + call tiToolsAutoCorrect + call tChineseTranslation + call tiToolsMacro + call tiToolsGallery + call tiToolsEyedropper + call tToolsOptionsTest ' global one +end sub +'------------------------------------------------------------------------------- testcase tiToolsSpellchecking if not gOOO then ' Spellcheck doesn't work in OOo builds. @@ -86,9 +100,7 @@ testcase tiToolsSpellchecking else goto endsub endif endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tiToolsSpellcheckingAutomatic '/// open application ///' Call hNewDocument @@ -102,72 +114,104 @@ testcase tiToolsSpellcheckingAutomatic '/// close application ///' Call hCloseDocument endcase +'------------------------------------------------------------------------------- +testcase tiToolsThesaurus -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Dim sWord as string + Dim sExt as string -testcase tiToolsThesaurus - qaerrorlog "#i93133#: Thesaurus not active in loaded bugdoc" - goto endsub - if not gOOO then ' Thesaurus doesn't work in OOo builds. + 'for normal text, the thesaurus is enabled, + 'if the format->character->language of the word has a thesaurus + 'unfortunately in textboxes this doesn't work, you can give the word a langauge, + 'but this is been ignored by our thesaurus + 'so especially for asian languages you have to set a default language in the options, + 'to be able to use the thesaurus there - fallback to englisch, + 'because there is no thesaurus for cjk languages - dim sFileName as String - - '/// call subroutine 'hSetSpellHypLanguage' for setting the default language in the options, to enable it for languages, which don't provide a dictionary (usually asian ones) ///' - call hSetSpellHypLanguage - '/// open application-specific document which contains an American-formatted textframe with text. And select the text ///' - if (gApplication = "IMPRESS") then - sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odp")) - else - sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odg")) - end if - if hFileExists ( sFileName ) = FALSE then - warnlog "The language-file was not found or accessible! The test ends." + 'As long as OOo has no modules for that, disabled + if gOOO = True then + printlog "No spellchecking in OOo" goto endsub - end if - Call hFileOpen (sFileName) - - sleep (2) - - hTypeKeys "" - hTypeKeys "" - - ' Call hTextrahmenErstellen ("SimpleTest" + "", 10, 10, 30, 40) - try - '/// Tools->Thesaurus ///' - ExtrasThesaurusDraw - Kontext "Thesaurus" - Call DialogTest ( Thesaurus ) - '/// click button 'language' ///' - Sprache.Click - Kontext "SpracheAuswaehlen" - Call DialogTest ( SpracheAuswaehlen ) - '/// cancel dialog 'select language' ///' - SpracheAuswaehlen.cancel - Kontext "Thesaurus" - '/// click button 'search' ///' - Nachschlagen.Click - kontext - '/// if messagebox exist, say OK; (word not found) ///' - if Messagebox.exists (5) then - printlog "Messagebox: word not in thesaurus: '"+Messagebox.gettext+"'" - Messagebox.ok - end if - sleep 1 - Kontext "Thesaurus" - '/// cancel dialog 'Thesaurus' ///' - Thesaurus.Cancel - catch - warnlog "Thesaurus didn't work :-(" - endcatch - sleep 1 - '/// close application ///' - Call hCloseDocument - else goto endsub endif -endcase -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 'First we make sure we test a language where Thesaurus + select case iSprache + case 01 : sWord = "Hello" + case 03 : sWord = "Alo" + case 07 : printlog "- No Thesaur for Russian available" + goto endsub + case 30 : Printlog "- No Thesaurus available !" + goto endsub + case 31 : sWord = "Guiten" + case 33 : sWord = "Bonjour" + case 34 : sWord = "Hola" + case 35 : Printlog "- No Thesaurus available !" + goto endsub + case 36 : Printlog "- No Thesaurus available !" + goto endsub + case 37 : Printlog "- No Thesaurus available !" + goto endsub + case 39 : sWord = "Ciao" + case 42 : Printlog "- No Thesaurus available !" + goto endsub + case 45 : sWord = "Hej" + case 46 : sWord = "Välkommen" + case 47 : Printlog "- No Thesaurus available !" + goto endsub + case 48 : Printlog "- No Thesaurus in Polish!" + goto endsub + case 49 : sWord = "Hallo" + case 50 : sWord = "Prosojnica" + case 51 : Printlog "- No Thesaurus available !" + goto endsub + case 55 : Printlog "- No Thesaurus in Brazilian!" + goto endsub + case 90 : Printlog "- No Thesaurus available !" + goto endsub + + case else : if bAsianLan then + hSetSpellHypLanguage + sWord = "Hello" + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + sWord = "Hello" + endif + end select + + PrintLog "Thesaurus with 1 word: " + sWord + + if( Ucase(gApplication) = "DRAW" ) then + sExt = ".odg" + elseif( Ucase(gApplication) = "IMPRESS" ) then + sExt = ".odp" + endif + + Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) + Call hTextrahmenErstellen (sWord,20,20,50,30) + sleep 1 + + printlog "select the word" + hTypeKeys "" + + try + ExtrasThesaurusDraw + catch + warnlog "No Thesaurus available." + hCloseDocument() + goto endsub + endcatch + + Kontext "Thesaurus" + if Thesaurus.Exists(3) then + Thesaurus.Cancel + else + warnlog "the thesaurus does not appear" + endif + Call hCloseDocument + +endcase +'------------------------------------------------------------------------------- testcase tiToolsHyphenation '/// open application ///' Call hNewDocument @@ -179,7 +223,7 @@ testcase tiToolsHyphenation '/// close application ///' Call hCloseDocument endcase - +'------------------------------------------------------------------------------- testcase tiToolsAutoCorrect dim iLanguage as integer ' for resetting the language '/// open application ///' @@ -291,9 +335,7 @@ testcase tiToolsAutoCorrect '/// close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tChineseTranslation qaerrorlog( "#i89634# - Chinese Translation dialog does not close" ) @@ -365,9 +407,7 @@ testcase tChineseTranslation '/// Close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tiToolsMacro '/// open application ///' Call hNewDocument @@ -419,9 +459,7 @@ testcase tiToolsMacro '/// close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tiToolsGallery '/// open application ///' Call hNewDocument @@ -433,9 +471,7 @@ testcase tiToolsGallery '/// close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tiToolsEyedropper '/// open application ///' Call hNewDocument @@ -449,20 +485,4 @@ testcase tiToolsEyedropper '/// close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -testcase tiToolsOptions - '/// open application ///' - Call hNewDocument - '/// Tools->Options ///' - ToolsOptions - WaitSlot (2000) 'sleep 1 - kontext "OptionenDlg" - '/// close dialog 'Options' ///' - OptionenDlg.Close - '/// close application ///' - Call hCloseDocument -endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +'------------------------------------------------------------------------------- \ No newline at end of file diff --git a/testautomation/graphics/tools/id_tools_2.inc b/testautomation/graphics/tools/id_tools_2.inc index 6cf18494915d..501965a591d0 100644 --- a/testautomation/graphics/tools/id_tools_2.inc +++ b/testautomation/graphics/tools/id_tools_2.inc @@ -835,24 +835,6 @@ sub id_005 ' tiFormatLayer ' not in impress end sub -'------------------------------------------------------------------------------ -sub id_006 - - printLog Chr(13) + "--------- id_006 ----------" - - call tiToolsSpellchecking - call tiToolsSpellcheckingAutomatic - call tiToolsThesaurus - call tiToolsHyphenation - call tiToolsAutoCorrect - call tChineseTranslation - call tiToolsMacro - call tiToolsGallery - call tiToolsEyedropper - call tiToolsOptions ' get just called one time here... - Call tToolsOptionsTest ' global one -end sub - '------------------------------------------------------------------------------- sub id_007 -- cgit v1.2.3 From 754c2fcb779f9c2cbe37f1bf99cf49cec01a0947 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 19 Mar 2010 14:36:03 +0100 Subject: chartpositioning: merge with DEV300_m75 (part2) --- chart2/source/controller/dialogs/tp_DiagramPosition.cxx | 11 ++++------- chart2/source/controller/dialogs/tp_DiagramPosition.hxx | 5 +---- chart2/source/controller/inc/DiagramItemConverter.hxx | 5 +---- .../source/controller/itemsetwrapper/DiagramItemConverter.cxx | 9 +++------ sc/source/filter/excel/xechart.cxx | 2 +- sc/source/filter/excel/xichart.cxx | 8 ++++---- 6 files changed, 14 insertions(+), 26 deletions(-) diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.cxx b/chart2/source/controller/dialogs/tp_DiagramPosition.cxx index ff9b6e23cfd7..68150dceeb22 100644 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.cxx +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tp_DiagramPosition.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -41,8 +38,8 @@ #include //GetModuleFieldUnit #include -#include -#include +#include +#include // header for class SvxDoubleItem #include @@ -132,7 +129,7 @@ DiagramPositionTabPage::DiagramPositionTabPage( Window* pParent, const SfxItemSe void DiagramPositionTabPage::Construct() { // get range and work area - meDlgUnit = GetModuleFieldUnit( &GetItemSet() ); + meDlgUnit = GetModuleFieldUnit( GetItemSet() ); SetFieldUnit( maMtrPosX, meDlgUnit, TRUE ); SetFieldUnit( maMtrPosY, meDlgUnit, TRUE ); SetFieldUnit( maMtrWidth, meDlgUnit, TRUE ); diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.hxx b/chart2/source/controller/dialogs/tp_DiagramPosition.hxx index 153c9d26ca75..90825b97ba15 100644 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.hxx +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tp_DiagramPosition.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/chart2/source/controller/inc/DiagramItemConverter.hxx b/chart2/source/controller/inc/DiagramItemConverter.hxx index 9df7b093d573..280b9cffb45b 100644 --- a/chart2/source/controller/inc/DiagramItemConverter.hxx +++ b/chart2/source/controller/inc/DiagramItemConverter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: AxisItemConverter.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx index 00f1fb664739..bc1cd71ed338 100644 --- a/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DiagramItemConverter.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -37,11 +34,11 @@ #include "macros.hxx" #include "servicenames.hxx" #include "chartview/ExplicitValueProvider.hxx" -#include +#include #include "ItemPropertyMap.hxx" #include "GraphicPropertyItemConverter.hxx" #include -#include +#include #include #include diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index 429cd05ce94d..b6b136da4b1e 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -3263,7 +3263,7 @@ XclExpChartDrawing::XclExpChartDrawing( const XclExpRoot& rRoot, /* Create a new independent object manager with own DFF stream for the DGCONTAINER, pass global manager as parent for shared usage of global DFF data (picture container etc.). */ - mxObjMgr.reset( new XclExpEmbeddedObjectManager( GetObjectManager(), rChartSize, EXC_CHART_UNIT, EXC_CHART_UNIT ) ); + mxObjMgr.reset( new XclExpEmbeddedObjectManager( GetObjectManager(), rChartSize, EXC_CHART_TOTALUNITS, EXC_CHART_TOTALUNITS ) ); // initialize the drawing object list mxObjMgr->StartSheet(); // process the draw page (convert all shapes) diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 899eed843455..e715c74275b6 100755 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -3994,10 +3994,10 @@ Rectangle XclImpChartDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool in the cell address components of the client anchor. In old BIFF3-BIFF5 objects, the position is stored in the offset components of the anchor. */ Rectangle aRect( - static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maFirst.mnCol : rAnchor.mnLX ) / EXC_CHART_UNIT * maChartRect.GetWidth() + 0.5 ), - static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maFirst.mnRow : rAnchor.mnTY ) / EXC_CHART_UNIT * maChartRect.GetHeight() + 0.5 ), - static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maLast.mnCol : rAnchor.mnRX ) / EXC_CHART_UNIT * maChartRect.GetWidth() + 0.5 ), - static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maLast.mnRow : rAnchor.mnBY ) / EXC_CHART_UNIT * maChartRect.GetHeight() + 0.5 ) ); + static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maFirst.mnCol : rAnchor.mnLX ) / EXC_CHART_TOTALUNITS * maChartRect.GetWidth() + 0.5 ), + static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maFirst.mnRow : rAnchor.mnTY ) / EXC_CHART_TOTALUNITS * maChartRect.GetHeight() + 0.5 ), + static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maLast.mnCol : rAnchor.mnRX ) / EXC_CHART_TOTALUNITS * maChartRect.GetWidth() + 0.5 ), + static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maLast.mnRow : rAnchor.mnBY ) / EXC_CHART_TOTALUNITS * maChartRect.GetHeight() + 0.5 ) ); aRect.Justify(); // move shapes into chart area for sheet charts if( mbOwnTab ) -- cgit v1.2.3 From 2b7d82e903bcbbd804fda4e37f00d411e477decd Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 19 Mar 2010 14:36:03 +0100 Subject: chartpositioning: merge with DEV300_m75 (part2) --- oox/inc/oox/drawingml/chart/chartdrawingfragment.hxx | 6 +----- oox/source/drawingml/chart/chartdrawingfragment.cxx | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/oox/inc/oox/drawingml/chart/chartdrawingfragment.hxx b/oox/inc/oox/drawingml/chart/chartdrawingfragment.hxx index e38311394046..0b5a7f6374a4 100644 --- a/oox/inc/oox/drawingml/chart/chartdrawingfragment.hxx +++ b/oox/inc/oox/drawingml/chart/chartdrawingfragment.hxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chartdrawingfragment.hxx,v $ - * - * $Revision: 1.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx index 9df064125457..fcc350b583c3 100644 --- a/oox/source/drawingml/chart/chartdrawingfragment.cxx +++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: chartdrawingfragment.cxx,v $ - * - * $Revision: 1.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify -- cgit v1.2.3 From cd763a88f403c743975d4a9ef8b8770eefde61f8 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Fri, 19 Mar 2010 15:22:12 +0100 Subject: tl74: #108360# fixed for new thesaurus and refactoring --- testautomation/graphics/optional/g_tools.bas | 2 + .../graphics/optional/includes/global/g_tools.inc | 105 +++++++++++++++++++++ 2 files changed, 107 insertions(+) diff --git a/testautomation/graphics/optional/g_tools.bas b/testautomation/graphics/optional/g_tools.bas index bb65e6b27d43..272840602ac4 100755 --- a/testautomation/graphics/optional/g_tools.bas +++ b/testautomation/graphics/optional/g_tools.bas @@ -44,6 +44,7 @@ sub main PrintLog "-------------------------" + gApplication + "-------------------" Call tiToolsThesaurus Call tiToolsThesaurusWithoutText + Call tiToolsThesaurusContextMenu Call tiToolsHyphenation1 Call tiToolsHyphenation2 Call tToolsMacro @@ -52,6 +53,7 @@ sub main PrintLog "-------------------------" + gApplication + "-------------------" Call tiToolsThesaurus Call tiToolsThesaurusWithoutText + Call tiToolsThesaurusContextMenu Call tiToolsHyphenation1 Call tiToolsHyphenation2 Call tToolsMacro diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc index dcfe8707d6d6..00148148fb2f 100644 --- a/testautomation/graphics/optional/includes/global/g_tools.inc +++ b/testautomation/graphics/optional/includes/global/g_tools.inc @@ -203,6 +203,111 @@ testcase tiToolsThesaurusWithoutText Call hCloseDocument +endcase +'------------------------------------------------------------------------------- +testcase tiToolsThesaurusContextMenu + + Dim sWord as string + Dim sExt as string + Dim iItemCount as Integer + + 'for normal text, the thesaurus is enabled, + 'if the format->character->language of the word has a thesaurus + 'unfortunately in textboxes this doesn't work, you can give the word a langauge, + 'but this is been ignored by our thesaurus + 'so especially for asian languages you have to set a default language in the options, + 'to be able to use the thesaurus there - fallback to englisch, + 'because there is no thesaurus for cjk languages + + 'As long as OOo has no modules for that, disabled + if gOOO = True then + printlog "No spellchecking in OOo" + goto endsub + endif + + 'First we make sure we test a language where Thesaurus + select case iSprache + case 01 : sWord = "Hello" + case 03 : sWord = "Alo" + case 07 : printlog "- No Thesaur for Russian available" + goto endsub + case 30 : Printlog "- No Thesaurus available !" + goto endsub + case 31 : sWord = "Guiten" + case 33 : sWord = "Bonjour" + case 34 : sWord = "Hola" + case 35 : Printlog "- No Thesaurus available !" + goto endsub + case 36 : Printlog "- No Thesaurus available !" + goto endsub + case 37 : Printlog "- No Thesaurus available !" + goto endsub + case 39 : sWord = "Ciao" + case 42 : Printlog "- No Thesaurus available !" + goto endsub + case 45 : sWord = "Hej" + case 46 : sWord = "Välkommen" + case 47 : Printlog "- No Thesaurus available !" + goto endsub + case 48 : Printlog "- No Thesaurus in Polish!" + goto endsub + case 49 : sWord = "Hallo" + case 50 : sWord = "Prosojnica" + case 51 : Printlog "- No Thesaurus available !" + goto endsub + case 55 : Printlog "- No Thesaurus in Brazilian!" + goto endsub + case 90 : Printlog "- No Thesaurus available !" + goto endsub + + case else : if bAsianLan then + hSetSpellHypLanguage + sWord = "Hello" + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + sWord = "Hello" + endif + end select + + PrintLog "Thesaurus with 1 word: " + sWord + + if( Ucase(gApplication) = "DRAW" ) then + sExt = ".odg" + Kontext "DrawDocument" + elseif( Ucase(gApplication) = "IMPRESS" ) then + sExt = ".odp" + Kontext "ImpressDocument" + endif + + Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) + + Call hTextrahmenErstellen (sWord,20,20,50,30) + sleep 1 + + printlog "select the word" + hTypeKeys "" + + hOpenContextMenu + + hMenuSelectNr(14) ' the synonyms + iItemCount = hMenuItemGetCount + printlog iItemCount + if(iItemCount <= 2 ) then ' none and Thesaurus item + warnlog "There should be a synonymus display for the word '" + sWord + "' but it isn't." + endif + + hMenuSelectNr(iItemCount) ' the last item + + Kontext "Thesaurus" + if Thesaurus.Exists(5) then + printlog "Thesaurus dialog appear from the context menu" + Thesaurus.Cancel + else + warnlog "the thesaurus dialog does not appear fro mthe context menu of a selected word" + endif + + call hCloseDocument + endcase '------------------------------------------------------------------------------- testcase tiToolsHyphenation1 -- cgit v1.2.3 From 3930a0e5b4f98175dbc74f95615e82cf9b568e22 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Tue, 23 Mar 2010 15:49:58 +0100 Subject: cws tl74: #108360# --- testautomation/graphics/required/input/recht_49.odp | Bin 13159 -> 12783 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/testautomation/graphics/required/input/recht_49.odp b/testautomation/graphics/required/input/recht_49.odp index 445c11940122..88c93c2856b4 100755 Binary files a/testautomation/graphics/required/input/recht_49.odp and b/testautomation/graphics/required/input/recht_49.odp differ -- cgit v1.2.3 From dc652167c03be837eeb224b8c258d836bde211d6 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Tue, 23 Mar 2010 16:04:09 +0100 Subject: cws tl74: #108360# --- testautomation/graphics/required/input/recht_3.odp | Bin 13728 -> 12737 bytes testautomation/graphics/required/input/recht_31.odp | Bin 13837 -> 14160 bytes testautomation/graphics/required/input/recht_33.odp | Bin 12994 -> 13251 bytes testautomation/graphics/required/input/recht_34.odp | Bin 14831 -> 19479 bytes testautomation/graphics/required/input/recht_36.odp | Bin 14284 -> 14155 bytes testautomation/graphics/required/input/recht_39.odp | Bin 11319 -> 12338 bytes testautomation/graphics/required/input/recht_46.odp | Bin 15605 -> 19434 bytes testautomation/graphics/required/input/recht_48.odp | Bin 12666 -> 13346 bytes testautomation/graphics/required/input/recht_55.odp | Bin 13487 -> 18380 bytes 9 files changed, 0 insertions(+), 0 deletions(-) diff --git a/testautomation/graphics/required/input/recht_3.odp b/testautomation/graphics/required/input/recht_3.odp index 77001190ba1a..768fbad4b780 100755 Binary files a/testautomation/graphics/required/input/recht_3.odp and b/testautomation/graphics/required/input/recht_3.odp differ diff --git a/testautomation/graphics/required/input/recht_31.odp b/testautomation/graphics/required/input/recht_31.odp index a8fd2717ba3f..23f5c77c141d 100755 Binary files a/testautomation/graphics/required/input/recht_31.odp and b/testautomation/graphics/required/input/recht_31.odp differ diff --git a/testautomation/graphics/required/input/recht_33.odp b/testautomation/graphics/required/input/recht_33.odp index e98bb9a22dc7..c6acada2537e 100755 Binary files a/testautomation/graphics/required/input/recht_33.odp and b/testautomation/graphics/required/input/recht_33.odp differ diff --git a/testautomation/graphics/required/input/recht_34.odp b/testautomation/graphics/required/input/recht_34.odp index fbfe0ae7ffae..2dcbd561f9e5 100755 Binary files a/testautomation/graphics/required/input/recht_34.odp and b/testautomation/graphics/required/input/recht_34.odp differ diff --git a/testautomation/graphics/required/input/recht_36.odp b/testautomation/graphics/required/input/recht_36.odp index a1f80f1109db..45f7fd3a47cb 100755 Binary files a/testautomation/graphics/required/input/recht_36.odp and b/testautomation/graphics/required/input/recht_36.odp differ diff --git a/testautomation/graphics/required/input/recht_39.odp b/testautomation/graphics/required/input/recht_39.odp index feda53696ecf..bf649b488030 100755 Binary files a/testautomation/graphics/required/input/recht_39.odp and b/testautomation/graphics/required/input/recht_39.odp differ diff --git a/testautomation/graphics/required/input/recht_46.odp b/testautomation/graphics/required/input/recht_46.odp index d6ec036f014d..e9de83b58c8b 100755 Binary files a/testautomation/graphics/required/input/recht_46.odp and b/testautomation/graphics/required/input/recht_46.odp differ diff --git a/testautomation/graphics/required/input/recht_48.odp b/testautomation/graphics/required/input/recht_48.odp index 4d905a8fe4d8..f836b0521f8b 100755 Binary files a/testautomation/graphics/required/input/recht_48.odp and b/testautomation/graphics/required/input/recht_48.odp differ diff --git a/testautomation/graphics/required/input/recht_55.odp b/testautomation/graphics/required/input/recht_55.odp index 2d63df264710..6e78d94e8c49 100755 Binary files a/testautomation/graphics/required/input/recht_55.odp and b/testautomation/graphics/required/input/recht_55.odp differ -- cgit v1.2.3 From 0e8f6eb591f4125b936e0ae911dff78415370e9b Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Wed, 24 Mar 2010 10:43:18 +0100 Subject: cws tl74: #108359# --- .../graphics/optional/includes/global/g_tools.inc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc index 00148148fb2f..b77b57629839 100644 --- a/testautomation/graphics/optional/includes/global/g_tools.inc +++ b/testautomation/graphics/optional/includes/global/g_tools.inc @@ -43,6 +43,7 @@ testcase tiToolsThesaurus Dim sWord as string Dim sChangedWord as string Dim sReplaceWord as string + Dim sAlternativeText as string Dim sExt as string Dim ZaehlerBedeutung @@ -145,8 +146,16 @@ testcase tiToolsThesaurus Alternatives.Select 1 printlog "check if the selected alternative apprear in the ReplaceWith field." - if ( ReplaceWith.getText() <> Alternatives.getSeltext(1,3) ) then - warnlog "the text is no transfered to the ReplaceWith field." + + sAlternativeText = Alternatives.getSeltext(1,3) + 'remove the part in the () if there is any + if( Instr(sAlternativeText, "(") <> 0 ) then + sAlternativeText = left(sAlternativeText, Instr(sAlternativeText, "(") - 2 ) + endif + + if ( ReplaceWith.getText() <> sAlternativeText ) then + warnlog "the text is no transfered to the ReplaceWith field. " +_ + "ReplaceWith = " + ReplaceWith.getText() + ", Alternative = " + sAlternativeText else printlog "the text is transfered to the ReplaceWith field." endif @@ -189,7 +198,7 @@ testcase tiToolsThesaurusWithoutText try ExtrasThesaurusDraw catch - PrintLog "the Thesaurus is correctly not available" + printlog "the Thesaurus is correctly not available" call hCloseDocument goto endsub endcatch -- cgit v1.2.3 From 558299cf33c9992d25e104a80115b70b060eae31 Mon Sep 17 00:00:00 2001 From: Oliver Craemer Date: Wed, 24 Mar 2010 12:34:56 +0100 Subject: #i110357# [Automation] adapt spreadsheettestscripts for new thesaurus --- .../required/includes/c_upd_toolsmenu.inc | 44 +++++++--------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc b/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc index 2b00a3bf601d..434aae88f786 100644 --- a/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc +++ b/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc @@ -391,21 +391,17 @@ endcase testcase tToolsLanguageThesaurus '///Tools – Language – Chinese Translation - '/// Load document from 'gTesttoolPath + "spreadsheet\required\input\english.ods"' printlog " Load document from 'gTesttoolPath + spreadsheet\required\input\english.ods" Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\english.ods" )) - '/// If the file is not editable, click the edit button on standardbar printlog "If the file is not editable, click the edit button on standardbar" call sMakeReadOnlyDocumentEditable Kontext "DocumentCalc" - '/// Enter 'blabla' in a cell - printlog " Enter 'blabla' in a cell" + printlog " Enter 'test' in a cell" Call fCalcSelectRange ("B2") - DocumentCalc.TypeKeys "blabla" - '/// Open 'Thesaurus' dialog by 'Tools – Language – Thesaurus + DocumentCalc.TypeKeys "test" printlog " Open 'Thesaurus' dialog by 'Tools – Language – Thesaurus" try - ToolsLanguageThesaurusCalc + ToolsLanguageThesaurus catch warnlog "Thesaurus did not work" call hCloseDocument @@ -413,34 +409,20 @@ testcase tToolsLanguageThesaurus endcatch Kontext "Thesaurus" DialogTest ( Thesaurus ) - '/// Click on 'Search' button - printlog " Click on 'Search' button" - Nachschlagen.Click - '/// Close messagebox with 'OK' - printlog " Close messagebox with 'OK'" - Kontext - if Active.exists then - Active.OK + printlog " Check if the cellcontent test is correctly read" + if CurrentWord.GetSelText <> "test" then + warnlog "The cellcontent is not test but is " & CurrentWord.GetSelText end if - Kontext "Thesaurus" - '/// Click on 'Language' button - printlog " Click on 'Language' button" - Sprache.Click - Kontext "SpracheAuswaehlen" - DialogTest ( SpracheAuswaehlen ) - '/// Verify that the list has entries - printlog " Verify that the list has entries" - If Auswahl.GetItemCount < 1 then - warnlog "There are no languages available" + printlog " Check that there are alternatives available" + if Alternatives.GetItemCount < 1 then + warnlog "There are no alternatives available" + else Alternatives.Select (1) + if ReplaceWith.GetText = "" then + warnlog "The repacle with field is empty" + end if end if - '/// Close 'Select Language' dialog with 'Cancel' - printlog " Close 'Select Language' dialog with 'Cancel'" - SpracheAuswaehlen.Cancel - Kontext "Thesaurus" - '/// Close 'Thesaurus' with 'Cancel' printlog " Close 'Thesaurus' with 'Cancel'" Thesaurus.Cancel - '/// Close document printlog " Close document" call hCloseDocument -- cgit v1.2.3 From 020130022f263a2fe058369207d83eb41e289e67 Mon Sep 17 00:00:00 2001 From: Oliver Craemer Date: Wed, 24 Mar 2010 15:48:51 +0100 Subject: #i110357# [Automation] adapt spreadsheettestscripts for new thesaurus --- testautomation/global/sid/all.sid | 1 - testautomation/global/sid/e_all.sid | 1 - 2 files changed, 2 deletions(-) diff --git a/testautomation/global/sid/all.sid b/testautomation/global/sid/all.sid index 9e013175a93e..6144e0ff7e27 100755 --- a/testautomation/global/sid/all.sid +++ b/testautomation/global/sid/all.sid @@ -505,7 +505,6 @@ ExtrasAktualisierenSeitenformatierung FN_REPAGINATE ExtrasSeitenformatierung FN_REPAGINATE ' **** Calc -ExtrasThesaurusCalc SID_THESAURUS ExtrasDetektivAlleSpurenEntfernen SID_DETECTIVE_DEL_ALL ExtrasDetektivFuellModus SID_DETECTIVE_FILLMODE ExtrasDetektivSpurZumFehler SID_DETECTIVE_ADD_ERR diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid index 878c145f748a..7af3c9a79b26 100755 --- a/testautomation/global/sid/e_all.sid +++ b/testautomation/global/sid/e_all.sid @@ -745,7 +745,6 @@ ToolsPageFormatting FN_REPAGINATE ' **** Calc ToolsSpellcheckAutoCheckCalc SID_AUTOSPELL_CHECK -ToolsLanguageThesaurusCalc .uno:Thesaurus ToolsLanguageHyphenateCalc .uno:Hyphenate ToolsDetectiveRemoveAllTraces SID_DETECTIVE_DEL_ALL ToolsDetectiveFillMode SID_DETECTIVE_FILLMODE -- cgit v1.2.3 From 61a3c00d1ffcbe24140dfc143eab08a82fbe507c Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Tue, 30 Mar 2010 10:53:20 +0200 Subject: hb33patches1: #i110463# applied patch and verified --- sw/source/filter/ww8/wrtww8.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 6bf7ecbb8cdf..f295f564581e 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1023,7 +1023,8 @@ bool WW8_WrFkp::Combine() return false; if( nIMax ) memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize ); - DELETEZ( pOfs ); + delete[] pOfs; + pOfs = 0; ((BYTE*)pFkp)[511] = nIMax; bCombined = true; -- cgit v1.2.3 From 9ffefc5a02fe8c45c8dc6c2627b67e32101b2960 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 30 Mar 2010 13:09:38 +0200 Subject: chartpositioning: #i100778# avoid assertions upon opening of pos&size dialog --- chart2/source/controller/dialogs/tp_DiagramPosition.cxx | 4 ++-- chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.cxx b/chart2/source/controller/dialogs/tp_DiagramPosition.cxx index 68150dceeb22..c8e2ec552192 100644 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.cxx +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.cxx @@ -30,13 +30,13 @@ #include "tp_DiagramPosition.hxx" #include "tp_DiagramPosition.hrc" +#include "ConfigurationAccess.hxx" #include "DiagramHelper.hxx" #include "ResId.hxx" #include "chartview/ChartSfxItemIds.hxx" #include #include -//GetModuleFieldUnit #include #include #include @@ -129,7 +129,7 @@ DiagramPositionTabPage::DiagramPositionTabPage( Window* pParent, const SfxItemSe void DiagramPositionTabPage::Construct() { // get range and work area - meDlgUnit = GetModuleFieldUnit( GetItemSet() ); + meDlgUnit = ConfigurationAccess::getFieldUnit(); SetFieldUnit( maMtrPosX, meDlgUnit, TRUE ); SetFieldUnit( maMtrPosY, meDlgUnit, TRUE ); SetFieldUnit( maMtrWidth, meDlgUnit, TRUE ); diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx index c1ec0eabcccc..bd971752954c 100644 --- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx +++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx @@ -99,8 +99,6 @@ const USHORT nLegendWhichPairs[] = const USHORT nDiagramWhichPairs[] = { - XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx - XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1000 - 1016 svx/xdef.hxx SCHATTR_DIAGRAM_START, SCHATTR_DIAGRAM_END, SID_ATTR_TRANSFORM_POS_Y, SID_ATTR_TRANSFORM_POS_Y, SID_ATTR_TRANSFORM_WIDTH, SID_ATTR_TRANSFORM_HEIGHT, -- cgit v1.2.3 From 44f707ba8cb791df91bdb028e127cca107e3596b Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 31 Mar 2010 18:43:41 +0200 Subject: chartpositioning: #i98398# treat diagram size without title sizes (correct ODF import/export, correct diagram sizing per mouse, correct API for import) --- .../chartapiwrapper/Chart2ModelContact.cxx | 28 ++--- .../chartapiwrapper/Chart2ModelContact.hxx | 12 +-- .../controller/chartapiwrapper/DiagramWrapper.cxx | 38 +++---- .../controller/main/PositionAndSizeHelper.cxx | 7 -- .../source/inc/chartview/ExplicitValueProvider.hxx | 10 +- chart2/source/view/main/ChartView.cxx | 119 ++++++++++++--------- 6 files changed, 111 insertions(+), 103 deletions(-) diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index 3742feaf8e8a..69e11198095a 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -119,7 +119,7 @@ Reference< chart2::XDiagram > Chart2ModelContact::getChart2Diagram() const return ChartModelHelper::findDiagram( this->getChartModel() ); } -ExplicitValueProvider* Chart2ModelContact::getExplicitValueProvider() const +uno::Reference< lang::XUnoTunnel > Chart2ModelContact::getChartView() const { if(!m_xChartView.is()) { @@ -129,7 +129,12 @@ ExplicitValueProvider* Chart2ModelContact::getExplicitValueProvider() const if( xFact.is() ) m_xChartView = Reference< lang::XUnoTunnel >( xFact->createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY ); } + return m_xChartView; +} +ExplicitValueProvider* Chart2ModelContact::getExplicitValueProvider() const +{ + getChartView(); if(!m_xChartView.is()) return 0; @@ -193,13 +198,20 @@ awt::Size Chart2ModelContact::GetPageSize() const return ChartModelHelper::getPageSize(m_xChartModel); } +awt::Rectangle Chart2ModelContact::SubstractAxisTitleSizes( const awt::Rectangle& rPositionRect ) +{ + awt::Rectangle aRect = ExplicitValueProvider::substractAxisTitleSizes( + m_xChartModel, getChartView(), rPositionRect ); + return aRect; +} + awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingTitle() const { awt::Rectangle aRect( GetDiagramRectangleIncludingAxes() ); //add axis title sizes to the diagram size - aRect = ExplicitValueProvider::calculateDiagramPositionAndSizeIncludingTitle( - m_xChartModel, m_xChartView, aRect ); + aRect = ExplicitValueProvider::addAxisTitleSizes( + m_xChartModel, getChartView(), aRect ); return aRect; } @@ -229,16 +241,6 @@ awt::Rectangle Chart2ModelContact::GetDiagramRectangleExcludingAxes() const return aRect; } -awt::Size Chart2ModelContact::GetDiagramSizeIncludingTitle() const -{ - return ToSize( this->GetDiagramRectangleIncludingTitle() ); -} - -awt::Point Chart2ModelContact::GetDiagramPositionIncludingTitle() const -{ - return ToPoint( this->GetDiagramRectangleIncludingTitle() ); -} - awt::Size Chart2ModelContact::GetLegendSize() const { awt::Size aSize; diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx index bab2eaff2d14..e20167e216c2 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx @@ -93,15 +93,9 @@ public: */ ::com::sun::star::awt::Size GetPageSize() const; - /** Returns the size of the diagram object in logic coordinates including - the space reserved for axis titles. + /** calculates the current axes title sizes and substract that space them from the given recangle */ - ::com::sun::star::awt::Size GetDiagramSizeIncludingTitle() const; - - /** Returns the position of the diagram in logic coordinates including - the space reserved for axis titles. - */ - ::com::sun::star::awt::Point GetDiagramPositionIncludingTitle() const; + ::com::sun::star::awt::Rectangle SubstractAxisTitleSizes( const ::com::sun::star::awt::Rectangle& rPositionRect ); /** Returns the position and size of the diagram in logic coordinates (100th mm) including the space used for axes including axes titles. @@ -149,6 +143,8 @@ public: private: //methods ExplicitValueProvider* getExplicitValueProvider() const; + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XUnoTunnel > getChartView() const; public: //member ::com::sun::star::uno::Reference< diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 51a72b4eb637..dc0fa30926e3 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -59,6 +59,7 @@ #include "DisposeHelper.hxx" #include #include "WrappedAutomaticPositionProperties.hxx" +#include "CommonConverters.hxx" #include #include @@ -737,7 +738,7 @@ Reference< awt::Point SAL_CALL DiagramWrapper::getPosition() throw (uno::RuntimeException) { - awt::Point aPosition = m_spChart2ModelContact->GetDiagramPositionIncludingTitle(); + awt::Point aPosition = ToPoint( m_spChart2ModelContact->GetDiagramRectangleIncludingAxes() ); return aPosition; } @@ -747,17 +748,12 @@ void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition ) Reference< beans::XPropertySet > xProp( this->getInnerPropertySet() ); if( xProp.is() ) { - if( aPosition.X < 0 || aPosition.Y < 0 ) + if( aPosition.X < 0 || aPosition.Y < 0 || aPosition.X > 1 || aPosition.Y > 1 ) { - if( !TitleHelper::getTitle( TitleHelper::X_AXIS_TITLE, m_spChart2ModelContact->getChartModel() ).is() && - !TitleHelper::getTitle( TitleHelper::Y_AXIS_TITLE, m_spChart2ModelContact->getChartModel() ).is() ) - { - DBG_ERROR("DiagramWrapper::setPosition called with negative position -> automatic values are taken instead" ); - uno::Any aEmpty; - xProp->setPropertyValue( C2U( "RelativePosition" ), aEmpty ); - return; - } - //else: The saved didagram size does include the axis title sizes thus the position and size could be negative + DBG_ERROR("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" ); + uno::Any aEmpty; + xProp->setPropertyValue( C2U( "RelativePosition" ), aEmpty ); + return; } awt::Size aPageSize( m_spChart2ModelContact->GetPageSize() ); @@ -774,7 +770,7 @@ void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition ) awt::Size SAL_CALL DiagramWrapper::getSize() throw (uno::RuntimeException) { - awt::Size aSize = m_spChart2ModelContact->GetDiagramSizeIncludingTitle(); + awt::Size aSize = ToSize( m_spChart2ModelContact->GetDiagramRectangleIncludingAxes() ); return aSize; } @@ -793,15 +789,10 @@ void SAL_CALL DiagramWrapper::setSize( const awt::Size& aSize ) if( aRelativeSize.Primary > 1 || aRelativeSize.Secondary > 1 ) { - if( !TitleHelper::getTitle( TitleHelper::X_AXIS_TITLE, m_spChart2ModelContact->getChartModel() ).is() && - !TitleHelper::getTitle( TitleHelper::Y_AXIS_TITLE, m_spChart2ModelContact->getChartModel() ).is() ) - { - DBG_ERROR("DiagramWrapper::setSize called with sizes bigger than page -> automatic values are taken instead" ); - uno::Any aEmpty; - xProp->setPropertyValue( C2U( "RelativeSize" ), aEmpty ); - return; - } - //else: The saved didagram size does include the axis title sizes thus the position and size could be out of range + DBG_ERROR("DiagramWrapper::setSize called with sizes bigger than page -> automatic values are taken instead" ); + uno::Any aEmpty; + xProp->setPropertyValue( C2U( "RelativeSize" ), aEmpty ); + return; } xProp->setPropertyValue( C2U( "RelativeSize" ), uno::makeAny(aRelativeSize) ); @@ -879,9 +870,8 @@ awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxes( } void SAL_CALL DiagramWrapper::setDiagramPositionIncludingAxesAndAxesTitles( const awt::Rectangle& rPositionRect ) throw (uno::RuntimeException) { - setPosition( awt::Point(rPositionRect.X,rPositionRect.Y) ); - setSize( awt::Size(rPositionRect.Width,rPositionRect.Height) ); - + awt::Rectangle aRect( m_spChart2ModelContact->SubstractAxisTitleSizes(rPositionRect) ); + DiagramWrapper::setDiagramPositionIncludingAxes( aRect ); } ::com::sun::star::awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxesAndAxesTitles( ) throw (::com::sun::star::uno::RuntimeException) { diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx index d2e271e92147..6c81f6ede170 100644 --- a/chart2/source/controller/main/PositionAndSizeHelper.cxx +++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx @@ -183,13 +183,6 @@ bool PositionAndSizeHelper::moveObject( const rtl::OUString& rObjectCID xObjectProp = uno::Reference< beans::XPropertySet >( ObjectIdentifier::getDiagramForCID( rObjectCID, xChartModel ), uno::UNO_QUERY ); if(!xObjectProp.is()) return false; - - //add axis title sizes to the diagram size - bool bPosSizeExcludeAxes = false; - xObjectProp->getPropertyValue( C2U( "PosSizeExcludeAxes" ) ) >>= bPosSizeExcludeAxes; - if( !bPosSizeExcludeAxes ) - aNewPositionAndSize = ExplicitValueProvider::calculateDiagramPositionAndSizeIncludingTitle( - xChartModel, xChartView, rNewPositionAndSize ); } return moveObject( eObjectType, xObjectProp, aNewPositionAndSize, rPageRectangle ); } diff --git a/chart2/source/inc/chartview/ExplicitValueProvider.hxx b/chart2/source/inc/chartview/ExplicitValueProvider.hxx index 287d8a708ce5..d10ee8d415fc 100644 --- a/chart2/source/inc/chartview/ExplicitValueProvider.hxx +++ b/chart2/source/inc/chartview/ExplicitValueProvider.hxx @@ -79,13 +79,21 @@ public: static ExplicitValueProvider* getExplicitValueProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xChartView ); static ::com::sun::star::awt::Rectangle - calculateDiagramPositionAndSizeIncludingTitle( + addAxisTitleSizes( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xChartView , const ::com::sun::star::awt::Rectangle& rExcludingPositionAndSize ); + static ::com::sun::star::awt::Rectangle + substractAxisTitleSizes( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel >& xChartModel + , const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface >& xChartView + , const ::com::sun::star::awt::Rectangle& rPositionAndSizeIncludingTitles ); + static sal_Int32 getExplicitNumberFormatKeyForAxis( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index a5232571f045..cfea3896ad2e 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1999,7 +1999,7 @@ sal_Int32 ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabe } //static -awt::Rectangle ExplicitValueProvider::calculateDiagramPositionAndSizeIncludingTitle( +awt::Rectangle ExplicitValueProvider::addAxisTitleSizes( const Reference< frame::XModel >& xChartModel , const Reference< uno::XInterface >& xChartView , const awt::Rectangle& rExcludingPositionAndSize ) @@ -2066,6 +2066,74 @@ awt::Rectangle ExplicitValueProvider::calculateDiagramPositionAndSizeIncludingTi return aRet; } +//static +awt::Rectangle ExplicitValueProvider::substractAxisTitleSizes( + const Reference< frame::XModel >& xChartModel + , const Reference< uno::XInterface >& xChartView + , const awt::Rectangle& rPositionAndSizeIncludingTitles ) +{ + awt::Rectangle aRet(rPositionAndSizeIncludingTitles); + + //add axis title sizes to the diagram size + uno::Reference< chart2::XTitle > xTitle_Height( TitleHelper::getTitle( TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION, xChartModel ) ); + uno::Reference< chart2::XTitle > xTitle_Width( TitleHelper::getTitle( TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION, xChartModel ) ); + uno::Reference< chart2::XTitle > xSecondTitle_Height( TitleHelper::getTitle( TitleHelper::SECONDARY_X_AXIS_TITLE, xChartModel ) ); + uno::Reference< chart2::XTitle > xSecondTitle_Width( TitleHelper::getTitle( TitleHelper::SECONDARY_Y_AXIS_TITLE, xChartModel ) ); + if( xTitle_Height.is() || xTitle_Width.is() || xSecondTitle_Height.is() || xSecondTitle_Width.is() ) + { + ExplicitValueProvider* pExplicitValueProvider = ExplicitValueProvider::getExplicitValueProvider(xChartView); + if( pExplicitValueProvider ) + { + //detect wether x axis points into x direction or not + if( lcl_getPropertySwapXAndYAxis( ChartModelHelper::findDiagram( xChartModel ) ) ) + { + std::swap( xTitle_Height, xTitle_Width ); + std::swap( xSecondTitle_Height, xSecondTitle_Width ); + } + + sal_Int32 nTitleSpaceWidth = 0; + sal_Int32 nTitleSpaceHeight = 0; + sal_Int32 nSecondTitleSpaceWidth = 0; + sal_Int32 nSecondTitleSpaceHeight = 0; + + if( xTitle_Height.is() ) + { + rtl::OUString aCID_X( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle_Height, xChartModel ) ); + nTitleSpaceHeight = pExplicitValueProvider->getRectangleOfObject( aCID_X, true ).Height; + if( nTitleSpaceHeight ) + nTitleSpaceHeight+=lcl_getDiagramTitleSpace(); + } + if( xTitle_Width.is() ) + { + rtl::OUString aCID_Y( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle_Width, xChartModel ) ); + nTitleSpaceWidth = pExplicitValueProvider->getRectangleOfObject( aCID_Y, true ).Width; + if(nTitleSpaceWidth) + nTitleSpaceWidth+=lcl_getDiagramTitleSpace(); + } + if( xSecondTitle_Height.is() ) + { + rtl::OUString aCID_X( ObjectIdentifier::createClassifiedIdentifierForObject( xSecondTitle_Height, xChartModel ) ); + nSecondTitleSpaceHeight = pExplicitValueProvider->getRectangleOfObject( aCID_X, true ).Height; + if( nSecondTitleSpaceHeight ) + nSecondTitleSpaceHeight+=lcl_getDiagramTitleSpace(); + } + if( xSecondTitle_Width.is() ) + { + rtl::OUString aCID_Y( ObjectIdentifier::createClassifiedIdentifierForObject( xSecondTitle_Width, xChartModel ) ); + nSecondTitleSpaceWidth += pExplicitValueProvider->getRectangleOfObject( aCID_Y, true ).Width; + if( nSecondTitleSpaceWidth ) + nSecondTitleSpaceWidth+=lcl_getDiagramTitleSpace(); + } + + aRet.X += nTitleSpaceWidth; + aRet.Y += nSecondTitleSpaceHeight; + aRet.Width -= (nTitleSpaceWidth + nSecondTitleSpaceWidth); + aRet.Height -= (nTitleSpaceHeight + nSecondTitleSpaceHeight); + } + } + return aRet; +} + double lcl_getPageLayoutDistancePercentage() { return 0.02; @@ -2097,7 +2165,6 @@ bool getAvailablePosAndSizeForDiagram( uno::Reference< beans::XPropertySet > xProp(xDiagram, uno::UNO_QUERY); - bool bMakeRoomForTitle = false; bool bPosSizeExcludeAxes = false; if( xProp.is() ) xProp->getPropertyValue( C2U( "PosSizeExcludeAxes" ) ) >>= bPosSizeExcludeAxes; @@ -2108,7 +2175,6 @@ bool getAvailablePosAndSizeForDiagram( { rOutAvailableDiagramSize.Height = static_cast(aRelativeSize.Secondary*rPageSize.Height); rOutAvailableDiagramSize.Width = static_cast(aRelativeSize.Primary*rPageSize.Width); - bMakeRoomForTitle = !bPosSizeExcludeAxes; bUseFixedInnerSize = bPosSizeExcludeAxes; } else @@ -2127,7 +2193,6 @@ bool getAvailablePosAndSizeForDiagram( rOutPos = RelativePositionHelper::getUpperLeftCornerOfAnchoredObject( awt::Point(static_cast(fX),static_cast(fY)) , rOutAvailableDiagramSize, aRelativePosition.Anchor ); - bMakeRoomForTitle = !bPosSizeExcludeAxes; bUseFixedInnerSize = bPosSizeExcludeAxes; } else @@ -2141,52 +2206,6 @@ bool getAvailablePosAndSizeForDiagram( rOutAvailableDiagramSize.Width = rPageSize.Width - rOutPos.X; } - if( bMakeRoomForTitle ) - { - sal_Int32 nTitleSpaceWidth = 0; - sal_Int32 nTitleSpaceHeight = 0; - sal_Int32 nSecondTitleSpaceWidth = 0; - sal_Int32 nSecondTitleSpaceHeight = 0; - { - //todo detect wether x axis points into x direction or not - //detect wether x axis points into x direction or not - if( lcl_getPropertySwapXAndYAxis( xDiagram ) ) - { - std::swap( pXTitle, pYTitle ); - std::swap( pSecondXTitle, pSecondYTitle ); - } - - if( pXTitle ) - { - nTitleSpaceHeight = pXTitle->getFinalSize().Height; - if(nTitleSpaceHeight) - nTitleSpaceHeight+=lcl_getDiagramTitleSpace(); - } - if( pYTitle ) - { - nTitleSpaceWidth = pYTitle->getFinalSize().Width; - if(nTitleSpaceWidth) - nTitleSpaceWidth+=lcl_getDiagramTitleSpace(); - } - if( pSecondXTitle) - { - nSecondTitleSpaceHeight += pSecondXTitle->getFinalSize().Height; - if(nSecondTitleSpaceHeight) - nSecondTitleSpaceHeight+=lcl_getDiagramTitleSpace(); - } - if( pSecondYTitle) - { - nSecondTitleSpaceWidth += pSecondYTitle->getFinalSize().Width; - if(nSecondTitleSpaceWidth) - nSecondTitleSpaceWidth+=lcl_getDiagramTitleSpace(); - } - } - rOutAvailableDiagramSize.Height -= nTitleSpaceHeight + nSecondTitleSpaceHeight; - rOutAvailableDiagramSize.Width -= nTitleSpaceWidth + nSecondTitleSpaceWidth; - rOutPos.X += nTitleSpaceWidth; - rOutPos.Y += nSecondTitleSpaceHeight; - } - return true; } -- cgit v1.2.3 From b7db16a355f9bfbab65e1a88e1e4dede35bf7357 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 31 Mar 2010 18:43:41 +0200 Subject: chartpositioning: #i98398# treat diagram size without title sizes (correct ODF import/export, correct diagram sizing per mouse, correct API for import) --- xmloff/source/chart/SchXMLPlotAreaContext.cxx | 25 ++++++++++++++++++++----- xmloff/source/chart/SchXMLPlotAreaContext.hxx | 1 + xmloff/source/chart/SchXMLTools.cxx | 21 +++++++++++++++++++++ xmloff/source/chart/SchXMLTools.hxx | 1 + 4 files changed, 43 insertions(+), 5 deletions(-) diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 7b7802a8f295..3621789099b6 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -693,10 +693,21 @@ void SchXMLPlotAreaContext::EndElement() uno::Reference< chart::XDiagramPositioning > xDiaPos( mxDiagram, uno::UNO_QUERY ); if( xDiaPos.is()) { + bool bOuterSize = m_aOuterPositioning.hasPosSize() && !m_aOuterPositioning.isAutomatic(); if( m_aInnerPositioning.hasPosSize() ) - xDiaPos->setDiagramPositionExcludingAxes( m_aInnerPositioning.getRectangle() ); - else if( m_aOuterPositioning.hasPosSize() ) - xDiaPos->setDiagramPositionIncludingAxesAndAxesTitles( m_aOuterPositioning.getRectangle() ); + { + if( !m_aInnerPositioning.isAutomatic() ) + xDiaPos->setDiagramPositionExcludingAxes( m_aInnerPositioning.getRectangle() ); + else if( bOuterSize ) + xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() ); + } + else if( bOuterSize ) + { + if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_4( GetImport().GetModel() ) ) //old version of OOo did write a wrong rectangle for the diagram size + xDiaPos->setDiagramPositionIncludingAxesAndAxesTitles( m_aOuterPositioning.getRectangle() ); + else + xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() ); + } } CorrectAxisPositions(); @@ -1675,16 +1686,20 @@ SchXMLPositonAttributesHelper::~SchXMLPositonAttributesHelper() bool SchXMLPositonAttributesHelper::hasSize() const { - return m_bHasSizeWidth && m_bHasSizeHeight && !m_bAutoSize; + return m_bHasSizeWidth && m_bHasSizeHeight; } bool SchXMLPositonAttributesHelper::hasPosition() const { - return m_bHasPositionX && m_bHasPositionY && !m_bAutoPosition; + return m_bHasPositionX && m_bHasPositionY; } bool SchXMLPositonAttributesHelper::hasPosSize() const { return hasPosition() && hasSize(); } +bool SchXMLPositonAttributesHelper::isAutomatic() const +{ + return m_bAutoSize || m_bAutoPosition; +} awt::Point SchXMLPositonAttributesHelper::getPosition() const { return m_aPosition; diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index 632abe209188..cb986d7e7a3d 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -78,6 +78,7 @@ public: void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); bool hasPosSize() const; + bool isAutomatic() const; ::com::sun::star::awt::Rectangle getRectangle() const; diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index f5059f979b63..f836f1c1de7c 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -705,6 +705,27 @@ void setBuildIDAtImportInfo( uno::Reference< frame::XModel > xModel, Reference< SvXMLMetaDocumentContext::setBuildId( aGenerator, xImportInfo ); } +bool isDocumentGeneratedWithOpenOfficeOlderThan3_4( const uno::Reference< frame::XModel >& xChartModel ) +{ + bool bResult = isDocumentGeneratedWithOpenOfficeOlderThan3_0( xChartModel ); + if( !bResult ) + { + ::rtl::OUString aGenerator( lcl_getGeneratorFromModel(xChartModel) ); + if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/3") ) ) != -1 ) + { + if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/300m") ) ) != -1 ) + bResult= true; + else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/310m") ) ) != -1 ) + bResult= true; + else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/320m") ) ) != -1 ) + bResult= true; + else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/330m") ) ) != -1 ) + bResult= true; + } + } + return bResult; +} + bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const uno::Reference< frame::XModel >& xChartModel ) { bool bResult = isDocumentGeneratedWithOpenOfficeOlderThan2_3( xChartModel ); diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx index 35ac3ff72f1b..4912eb5d286e 100644 --- a/xmloff/source/chart/SchXMLTools.hxx +++ b/xmloff/source/chart/SchXMLTools.hxx @@ -54,6 +54,7 @@ namespace SchXMLTools bool isDocumentGeneratedWithOpenOfficeOlderThan2_3( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); bool isDocumentGeneratedWithOpenOfficeOlderThan2_4( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); + bool isDocumentGeneratedWithOpenOfficeOlderThan3_4( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); void setBuildIDAtImportInfo( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel , ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xImportInfo ); -- cgit v1.2.3 From e50db1da8cdc7009328dc4878d16b589310b841a Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 31 Mar 2010 18:43:41 +0200 Subject: chartpositioning: #i98398# treat diagram size without title sizes (correct ODF import/export, correct diagram sizing per mouse, correct API for import) --- offapi/com/sun/star/chart/XDiagramPositioning.idl | 1 + 1 file changed, 1 insertion(+) diff --git a/offapi/com/sun/star/chart/XDiagramPositioning.idl b/offapi/com/sun/star/chart/XDiagramPositioning.idl index 98dc3dcfb7b4..9934e2cb9eca 100644 --- a/offapi/com/sun/star/chart/XDiagramPositioning.idl +++ b/offapi/com/sun/star/chart/XDiagramPositioning.idl @@ -87,6 +87,7 @@ interface XDiagramPositioning : com::sun::star::uno::XInterface com::sun::star::awt::Rectangle calculateDiagramPositionIncludingAxes(); /** place the diagram including the axes, axes labels and axes titles. + For the placement the current axis titles are taken into account, so the titles must be initialized properly before this method is called. @param PositionRect specifies the position and size in 100/th mm */ -- cgit v1.2.3 From 1f083939cf4c353a0897d2fd275aa567f00a9ecc Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 31 Mar 2010 20:07:14 +0200 Subject: chartpositioning: #i100778# fixed typo --- chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 4 ++-- chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index dc0fa30926e3..61b258e2eb22 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -868,12 +868,12 @@ awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxes( { return m_spChart2ModelContact->GetDiagramRectangleIncludingAxes(); } -void SAL_CALL DiagramWrapper::setDiagramPositionIncludingAxesAndAxesTitles( const awt::Rectangle& rPositionRect ) throw (uno::RuntimeException) +void SAL_CALL DiagramWrapper::setDiagramPositionIncludingAxesAndAxisTitles( const awt::Rectangle& rPositionRect ) throw (uno::RuntimeException) { awt::Rectangle aRect( m_spChart2ModelContact->SubstractAxisTitleSizes(rPositionRect) ); DiagramWrapper::setDiagramPositionIncludingAxes( aRect ); } -::com::sun::star::awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxesAndAxesTitles( ) throw (::com::sun::star::uno::RuntimeException) +::com::sun::star::awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxesAndAxisTitles( ) throw (::com::sun::star::uno::RuntimeException) { return m_spChart2ModelContact->GetDiagramRectangleIncludingTitle(); } diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx index 4674295d1238..111e24bd6a8b 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx @@ -220,8 +220,8 @@ public: virtual ::com::sun::star::awt::Rectangle SAL_CALL calculateDiagramPositionExcludingAxes( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDiagramPositionIncludingAxes( const ::com::sun::star::awt::Rectangle& PositionRect ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::awt::Rectangle SAL_CALL calculateDiagramPositionIncludingAxes( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setDiagramPositionIncludingAxesAndAxesTitles( const ::com::sun::star::awt::Rectangle& PositionRect ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::Rectangle SAL_CALL calculateDiagramPositionIncludingAxesAndAxesTitles( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDiagramPositionIncludingAxesAndAxisTitles( const ::com::sun::star::awt::Rectangle& PositionRect ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL calculateDiagramPositionIncludingAxesAndAxisTitles( ) throw (::com::sun::star::uno::RuntimeException); // ____ XDiagramProvider ____ virtual ::com::sun::star::uno::Reference< -- cgit v1.2.3 From f549461066693eb19fdf8bbb4139bcb5e70eca77 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 31 Mar 2010 20:07:14 +0200 Subject: chartpositioning: #i100778# fixed typo --- xmloff/source/chart/SchXMLPlotAreaContext.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 3621789099b6..8f0767c3b6b9 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -704,7 +704,7 @@ void SchXMLPlotAreaContext::EndElement() else if( bOuterSize ) { if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_4( GetImport().GetModel() ) ) //old version of OOo did write a wrong rectangle for the diagram size - xDiaPos->setDiagramPositionIncludingAxesAndAxesTitles( m_aOuterPositioning.getRectangle() ); + xDiaPos->setDiagramPositionIncludingAxesAndAxisTitles( m_aOuterPositioning.getRectangle() ); else xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() ); } -- cgit v1.2.3 From 4a5ec5c6827b3ebc281b3a2e2ed0b2e542935c48 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 31 Mar 2010 20:07:14 +0200 Subject: chartpositioning: #i100778# fixed typo --- offapi/com/sun/star/chart/XDiagramPositioning.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offapi/com/sun/star/chart/XDiagramPositioning.idl b/offapi/com/sun/star/chart/XDiagramPositioning.idl index 9934e2cb9eca..f64bbef4b641 100644 --- a/offapi/com/sun/star/chart/XDiagramPositioning.idl +++ b/offapi/com/sun/star/chart/XDiagramPositioning.idl @@ -91,13 +91,13 @@ interface XDiagramPositioning : com::sun::star::uno::XInterface @param PositionRect specifies the position and size in 100/th mm */ - void setDiagramPositionIncludingAxesAndAxesTitles( [in] com::sun::star::awt::Rectangle PositionRect ); + void setDiagramPositionIncludingAxesAndAxisTitles( [in] com::sun::star::awt::Rectangle PositionRect ); /** @returns the position rectangle of the diagram including the axes, axes labels and axes titles. Position and size are given in 100/th mm. It might be necessary to calculate the positioning so this method can be expensive and the result may depend on different other settings. */ - com::sun::star::awt::Rectangle calculateDiagramPositionIncludingAxesAndAxesTitles(); + com::sun::star::awt::Rectangle calculateDiagramPositionIncludingAxesAndAxisTitles(); }; //============================================================================= -- cgit v1.2.3 From 3031bc2b4f85a211f026408e84a174e6aecdd91b Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Thu, 1 Apr 2010 11:38:41 +0200 Subject: chartpositioning: #i98398# compiler warnings --- chart2/source/controller/inc/PositionAndSizeHelper.hxx | 3 +-- chart2/source/controller/main/ChartController_Position.cxx | 3 +-- chart2/source/controller/main/ChartController_Window.cxx | 3 +-- chart2/source/controller/main/PositionAndSizeHelper.cxx | 3 --- chart2/source/view/main/ChartView.cxx | 6 ++---- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/chart2/source/controller/inc/PositionAndSizeHelper.hxx b/chart2/source/controller/inc/PositionAndSizeHelper.hxx index 43392e7a8235..312c92997055 100644 --- a/chart2/source/controller/inc/PositionAndSizeHelper.hxx +++ b/chart2/source/controller/inc/PositionAndSizeHelper.hxx @@ -51,8 +51,7 @@ public: static bool moveObject( const rtl::OUString& rObjectCID , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel , const ::com::sun::star::awt::Rectangle& rNewPositionAndSize - , const ::com::sun::star::awt::Rectangle& rPageRectangle - , ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xChartView ); + , const ::com::sun::star::awt::Rectangle& rPageRectangle ); }; //............................................................................. diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 51f1cafccd8d..83061be07fe5 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -183,8 +183,7 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() bool bChanged = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID() , m_aModel->getModel() , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight()) - , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) - , m_xChartView ); + , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) ); if( bChanged ) aUndoGuard.commitAction(); } diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 7822c8c1cc21..176d38aa5fc3 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -869,8 +869,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) bool bChanged = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID() , m_aModel->getModel() , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight()) - , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) - , m_xChartView ); + , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) ); if( bChanged ) { bDraggingDone = true; diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx index 6c81f6ede170..f0ce3eaaa04e 100644 --- a/chart2/source/controller/main/PositionAndSizeHelper.cxx +++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx @@ -141,8 +141,6 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType { //@todo decide wether x is primary or secondary - //xChartView - //set position: chart2::RelativePosition aRelativePosition; aRelativePosition.Anchor = drawing::Alignment_CENTER; @@ -169,7 +167,6 @@ bool PositionAndSizeHelper::moveObject( const rtl::OUString& rObjectCID , const uno::Reference< frame::XModel >& xChartModel , const awt::Rectangle& rNewPositionAndSize , const awt::Rectangle& rPageRectangle - , uno::Reference< uno::XInterface > xChartView ) { ControllerLockGuard aLockedControllers( xChartModel ); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index cfea3896ad2e..3505ef92c793 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2144,8 +2144,6 @@ bool getAvailablePosAndSizeForDiagram( , const awt::Rectangle& rSpaceLeft , const awt::Size & rPageSize , const uno::Reference< XDiagram > & xDiagram - , VTitle* pXTitle, VTitle* pYTitle - , VTitle* pSecondXTitle, VTitle* pSecondYTitle , bool& bUseFixedInnerSize ) { bUseFixedInnerSize = false; @@ -2669,8 +2667,8 @@ void ChartView::createShapes() awt::Point aAvailablePosDia; awt::Size aAvailableSizeForDiagram; bool bUseFixedInnerSize = false; - if( getAvailablePosAndSizeForDiagram( aAvailablePosDia, aAvailableSizeForDiagram, aRemainingSpace, aPageSize, ChartModelHelper::findDiagram( m_xChartModel ) - , apVTitle_X.get(), apVTitle_Y.get(), apVTitle_SecondX.get(), apVTitle_SecondY.get(), bUseFixedInnerSize ) ) + if( getAvailablePosAndSizeForDiagram( aAvailablePosDia, aAvailableSizeForDiagram, aRemainingSpace, aPageSize + , ChartModelHelper::findDiagram( m_xChartModel ), bUseFixedInnerSize ) ) { awt::Rectangle aUsedOuterRect = impl_createDiagramAndContent( aSeriesPlotterContainer , xDiagramPlusAxes_Shapes -- cgit v1.2.3 From 06e2110957f0515ce075a83a41ea5556c2c32ea3 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Thu, 1 Apr 2010 14:26:26 +0200 Subject: chartpositioning: #i100778# changed default to exclude axes --- .../controller/dialogs/tp_DiagramPosition.cxx | 23 +++++++++++----------- .../controller/dialogs/tp_DiagramPosition.hrc | 4 ++-- .../controller/dialogs/tp_DiagramPosition.hxx | 2 +- .../controller/dialogs/tp_DiagramPosition.src | 8 ++++---- chart2/source/inc/DiagramHelper.hxx | 4 ++-- chart2/source/model/main/Diagram.cxx | 2 +- chart2/source/view/main/ChartView.cxx | 6 +++++- 7 files changed, 27 insertions(+), 22 deletions(-) diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.cxx b/chart2/source/controller/dialogs/tp_DiagramPosition.cxx index c8e2ec552192..b8d0df131f63 100644 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.cxx +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.cxx @@ -74,8 +74,8 @@ DiagramPositionTabPage::DiagramPositionTabPage( Window* pParent, const SfxItemSe m_aFlPosMode( this, SchResId( FL_POSITIONING_MODE ) ), m_aRbPosMode_Auto( this, SchResId( RB_POSITIONING_MODE_AUTOMATIC ) ), - m_aRbPosMode_Including( this, SchResId( RB_POSITIONING_MODE_INCLUDING ) ), m_aRbPosMode_Excluding( this, SchResId( RB_POSITIONING_MODE_EXCLUDING ) ), + m_aRbPosMode_Including( this, SchResId( RB_POSITIONING_MODE_INCLUDING ) ), maFlPosition ( this, SchResId( FL_POSITION ) ), maFtPosX ( this, SchResId( FT_POS_X ) ), @@ -113,8 +113,8 @@ DiagramPositionTabPage::DiagramPositionTabPage( Window* pParent, const SfxItemSe Construct(); m_aRbPosMode_Auto.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); - m_aRbPosMode_Including.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); m_aRbPosMode_Excluding.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); + m_aRbPosMode_Including.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); maMtrPosX.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangePosXHdl ) ); maMtrPosY.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangePosYHdl ) ); @@ -155,10 +155,10 @@ void DiagramPositionTabPage::Reset( const SfxItemSet& rInAttrs ) ePos = DiagramPositioningMode(((const SfxInt32Item*)pItem)->GetValue()); if( ePos == DiagramPositioningMode_AUTO ) m_aRbPosMode_Auto.Check(); - else if( ePos == DiagramPositioningMode_INCLUDING ) - m_aRbPosMode_Including.Check(); else if( ePos == DiagramPositioningMode_EXCLUDING ) m_aRbPosMode_Excluding.Check(); + else if( ePos == DiagramPositioningMode_INCLUDING ) + m_aRbPosMode_Including.Check(); ReleaseBorders(); maCtlPos.Reset(); @@ -217,10 +217,11 @@ BOOL DiagramPositionTabPage::FillItemSet( SfxItemSet& rOutAttrs ) //positioning mode sal_Int32 nMode = 0; - if( m_aRbPosMode_Including.IsChecked() ) + if( m_aRbPosMode_Excluding.IsChecked() ) nMode = 1; - else if( m_aRbPosMode_Excluding.IsChecked() ) + else if( m_aRbPosMode_Including.IsChecked() ) nMode = 2; + rOutAttrs.Put( SfxInt32Item( SCHATTR_DIAGRAM_POS_MODE, nMode ) ); rOutAttrs.Put( SfxRectangleItem( SCHATTR_DIAGRAM_RECT_TO_USE, GetRectIn100thmm() ) ); @@ -444,8 +445,8 @@ void DiagramPositionTabPage::UpdateControlStates() bool bEnable = true; m_aRbPosMode_Auto.Enable( bEnable ); - m_aRbPosMode_Including.Enable( bEnable ); m_aRbPosMode_Excluding.Enable( bEnable ); + m_aRbPosMode_Including.Enable( bEnable ); if( m_aRbPosMode_Auto.IsChecked() ) bEnable = false; @@ -670,15 +671,15 @@ void DiagramPositionTabPage::PointChanged( Window* pWindow, RECT_POINT /*eRP*/ ) IMPL_LINK( DiagramPositionTabPage, ChangeModeHdl, RadioButton*, pButton ) { UpdateControlStates(); - if( pButton == &m_aRbPosMode_Including ) + if( pButton == &m_aRbPosMode_Excluding ) { if( !m_bRectChangedByUser ) - SetRectIn100thmm( m_aIncludingRect ); + SetRectIn100thmm( m_aExcludingRect ); } - else if( pButton == &m_aRbPosMode_Excluding ) + else if( pButton == &m_aRbPosMode_Including ) { if( !m_bRectChangedByUser ) - SetRectIn100thmm( m_aExcludingRect ); + SetRectIn100thmm( m_aIncludingRect ); } return( 0L ); diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.hrc b/chart2/source/controller/dialogs/tp_DiagramPosition.hrc index c91771e3da91..b2a558636a18 100644 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.hrc +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.hrc @@ -32,8 +32,8 @@ #define FL_POSITIONING_MODE 1 #define RB_POSITIONING_MODE_AUTOMATIC 2 -#define RB_POSITIONING_MODE_INCLUDING 3 -#define RB_POSITIONING_MODE_EXCLUDING 4 +#define RB_POSITIONING_MODE_EXCLUDING 3 +#define RB_POSITIONING_MODE_INCLUDING 4 #define FL_POSITION 5 #define FT_POS_X 6 #define FT_POS_Y 7 diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.hxx b/chart2/source/controller/dialogs/tp_DiagramPosition.hxx index 90825b97ba15..93dddb406500 100644 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.hxx +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.hxx @@ -92,8 +92,8 @@ private: FixedLine m_aFlPosMode; RadioButton m_aRbPosMode_Auto; - RadioButton m_aRbPosMode_Including; RadioButton m_aRbPosMode_Excluding; + RadioButton m_aRbPosMode_Including; // position FixedLine maFlPosition; diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.src b/chart2/source/controller/dialogs/tp_DiagramPosition.src index 3ee028d88e94..4c98d13c7db4 100644 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.src +++ b/chart2/source/controller/dialogs/tp_DiagramPosition.src @@ -65,19 +65,19 @@ TabPage TP_DIAGRAM_POSITION TabStop = TRUE ; Text [ en-US ] = "Automatic" ; }; - RadioButton RB_POSITIONING_MODE_INCLUDING + RadioButton RB_POSITIONING_MODE_EXCLUDING { Pos = MAP_APPFONT ( X2 , Y_MODE_2 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; - Text [ en-US ] = "Include labels" ; + Text [ en-US ] = "Exclude labels" ; }; - RadioButton RB_POSITIONING_MODE_EXCLUDING + RadioButton RB_POSITIONING_MODE_INCLUDING { Pos = MAP_APPFONT ( X2 , Y_MODE_3 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; - Text [ en-US ] = "Exclude labels" ; + Text [ en-US ] = "Include labels" ; }; FixedLine FL_POSITION diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx index 3213886db4c1..41d6e2fca8ff 100644 --- a/chart2/source/inc/DiagramHelper.hxx +++ b/chart2/source/inc/DiagramHelper.hxx @@ -49,8 +49,8 @@ namespace chart enum DiagramPositioningMode { DiagramPositioningMode_AUTO, - DiagramPositioningMode_INCLUDING, - DiagramPositioningMode_EXCLUDING + DiagramPositioningMode_EXCLUDING, + DiagramPositioningMode_INCLUDING }; class OOO_DLLPUBLIC_CHARTTOOLS DiagramHelper diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 2f81e3b91c0f..b24f4059ba74 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -179,7 +179,7 @@ void lcl_AddPropertiesToVector( void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap ) { - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_POSSIZE_EXCLUDE_LABELS, false ); + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_POSSIZE_EXCLUDE_LABELS, true ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_SORT_BY_X_VALUES, false ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_CONNECT_BARS, false ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_GROUP_BARS_PER_AXIS, true ); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 3505ef92c793..b67af5fd7716 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1612,7 +1612,11 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& { awt::Point aPos(rAvailablePos); awt::Size aSize(rAvailableSize); - if( bUseFixedInnerSize ) + bool bPosSizeExcludeAxesProperty = true; + uno::Reference< beans::XPropertySet > xDiaProps( xDiagram, uno::UNO_QUERY_THROW ); + if( xDiaProps.is() ) + xDiaProps->getPropertyValue(C2U("PosSizeExcludeAxes")) >>= bPosSizeExcludeAxesProperty; + if( bUseFixedInnerSize || bPosSizeExcludeAxesProperty ) { aPos = awt::Point( m_aResultingDiagramRectangleExcludingAxes.X, m_aResultingDiagramRectangleExcludingAxes.Y ); aSize = awt::Size( m_aResultingDiagramRectangleExcludingAxes.Width, m_aResultingDiagramRectangleExcludingAxes.Height ); -- cgit v1.2.3 From 5b0fcb960d8b6d49faf40a442b69036bd8efa688 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Thu, 1 Apr 2010 20:29:01 +0200 Subject: chartpositioning: #i100778# correct ODF behaviour --- xmloff/inc/SchXMLImport.hxx | 1 + xmloff/inc/xmlnmspe.hxx | 3 ++- xmloff/inc/xmloff/xmltoken.hxx | 2 ++ xmloff/source/chart/SchXMLExport.cxx | 12 ++++++++++-- xmloff/source/chart/SchXMLImport.cxx | 3 +++ xmloff/source/chart/SchXMLPlotAreaContext.cxx | 16 +++++----------- xmloff/source/chart/SchXMLTools.cxx | 4 +--- xmloff/source/chart/SchXMLTools.hxx | 2 +- xmloff/source/core/xmltoken.cxx | 2 ++ 9 files changed, 27 insertions(+), 18 deletions(-) diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 1e1089805a28..065b268b3b46 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -69,6 +69,7 @@ enum SchXMLChartElemTokenMap enum SchXMLPlotAreaElemTokenMap { + XML_TOK_PA_EXCLUDING_POSITION_EXT, XML_TOK_PA_EXCLUDING_POSITION, XML_TOK_PA_AXIS, XML_TOK_PA_SERIES, diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx index 49c484a1ab17..e7891b36ef17 100644 --- a/xmloff/inc/xmlnmspe.hxx +++ b/xmloff/inc/xmlnmspe.hxx @@ -87,8 +87,9 @@ const sal_uInt16 XML_NAMESPACE_##prefix##_EXT_IDX = key; XML_NAMESPACE_EXT( OFFICE, 37U ) XML_NAMESPACE_EXT( TABLE, 38U ) +XML_NAMESPACE_EXT( CHART, 39U ) -#define _XML_OLD_NAMESPACE_BASE 39U +#define _XML_OLD_NAMESPACE_BASE 40U // namespaces used in the technical preview (SO 5.2) XML_OLD_NAMESPACE( FO, 0U ) diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index ccb3adf74941..681aaaeff82e 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3096,6 +3096,8 @@ namespace xmloff { namespace token { XML_DOES_NOT_END_WITH, //chart + XML_NP_CHART_EXT, + XML_N_CHART_EXT, XML_EXCLUDING_POSITION, XML_PREFER_EXCLUDING_POSITION, diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 51541c6df637..cc281c165cb3 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -2085,6 +2085,12 @@ void SchXMLExportHelper_Impl::exportPlotArea( void SchXMLExportHelper_Impl::exportExcludingPosition( const uno::Reference< chart::XDiagram >& xDiagram ) { + const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); + if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older + return; + if( nCurrentODFVersion != SvtSaveOptions::ODFVER_LATEST )//export only if extensions are enabled //todo: change this dependent on fileformat evolution + return; + Reference< chart::XDiagramPositioning > xDiaPos( xDiagram, uno::UNO_QUERY ); DBG_ASSERT( xDiaPos.is(), "Invalid xDiaPos as parameter" ); if( !xDiaPos.is() ) @@ -2098,9 +2104,9 @@ void SchXMLExportHelper_Impl::exportExcludingPosition( const uno::Reference< cha rtl::OUStringBuffer sStringBuffer; SvXMLUnitConverter::convertBool( sStringBuffer, bPreferExcludingPositioning ); String aString( sStringBuffer.makeStringAndClear() ); - mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_PREFER_EXCLUDING_POSITION, aString ); + mrExport.AddAttribute( XML_NAMESPACE_CHART_EXT, XML_PREFER_EXCLUDING_POSITION, aString );//todo: change to chart namespace in future - dependent on fileformat - SvXMLElementExport aExcludingPosition( mrExport, XML_NAMESPACE_CHART, XML_EXCLUDING_POSITION, sal_True, sal_True ); + SvXMLElementExport aExcludingPosition( mrExport, XML_NAMESPACE_CHART_EXT, XML_EXCLUDING_POSITION, sal_True, sal_True );//todo: change to chart namespace in future - dependent on fileformat } void SchXMLExportHelper_Impl::exportAxes( @@ -3646,6 +3652,8 @@ SchXMLExport::SchXMLExport( maAutoStylePool( *this ), maExportHelper( *this, maAutoStylePool ) { + if( getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + _GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); } diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 2fc23926ef1e..501f92953663 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -281,6 +281,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap() { static __FAR_DATA SvXMLTokenMapEntry aPlotAreaElemTokenMap[] = { + { XML_NAMESPACE_CHART_EXT, XML_EXCLUDING_POSITION, XML_TOK_PA_EXCLUDING_POSITION_EXT }, { XML_NAMESPACE_CHART, XML_EXCLUDING_POSITION, XML_TOK_PA_EXCLUDING_POSITION }, { XML_NAMESPACE_CHART, XML_AXIS, XML_TOK_PA_AXIS }, { XML_NAMESPACE_CHART, XML_SERIES, XML_TOK_PA_SERIES }, @@ -658,6 +659,7 @@ SchXMLImport::SchXMLImport( SvXMLImport( xServiceFactory, nImportFlags ) { GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK ); + GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); mbIsGraphicLoadOnDemandSupported = false; } @@ -671,6 +673,7 @@ SchXMLImport::SchXMLImport( : SvXMLImport( xServiceFactory, xModel, rGrfContainer ) { GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK ); + GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); // get status indicator (if requested) if( bShowProgress ) diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 8f0767c3b6b9..3792deefebbd 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -520,6 +520,7 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( switch( rTokenMap.Get( nPrefix, rLocalName )) { + case XML_TOK_PA_EXCLUDING_POSITION_EXT: case XML_TOK_PA_EXCLUDING_POSITION: { pContext = new SchXMLExcludingPositionContext( GetImport(), nPrefix, rLocalName, m_aInnerPositioning ); @@ -703,7 +704,7 @@ void SchXMLPlotAreaContext::EndElement() } else if( bOuterSize ) { - if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_4( GetImport().GetModel() ) ) //old version of OOo did write a wrong rectangle for the diagram size + if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_3( GetImport().GetModel() ) ) //old version of OOo did write a wrong rectangle for the diagram size xDiaPos->setDiagramPositionIncludingAxesAndAxisTitles( m_aOuterPositioning.getRectangle() ); else xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() ); @@ -1743,18 +1744,11 @@ bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix else bReturn = false; } - else if( XML_NAMESPACE_CHART == nPrefix ) + else if( IsXMLToken( rLocalName, XML_PREFER_EXCLUDING_POSITION ) ) { - //Attribute( XML_NAMESPACE_CHART, XML_PREFER_EXCLUDING_POSITION - sal_Bool bPreferExcludingPosition = false; - if( IsXMLToken( rLocalName, XML_PREFER_EXCLUDING_POSITION ) ) - { - m_rImport.GetMM100UnitConverter().convertBool( bPreferExcludingPosition, rValue ); - m_bAutoPosition = m_bAutoSize = !bPreferExcludingPosition; - } - else - bReturn = false; + m_rImport.GetMM100UnitConverter().convertBool( bPreferExcludingPosition, rValue ); + m_bAutoPosition = m_bAutoSize = !bPreferExcludingPosition; } else bReturn = false; diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index f836f1c1de7c..c6fb4d0ca013 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -705,7 +705,7 @@ void setBuildIDAtImportInfo( uno::Reference< frame::XModel > xModel, Reference< SvXMLMetaDocumentContext::setBuildId( aGenerator, xImportInfo ); } -bool isDocumentGeneratedWithOpenOfficeOlderThan3_4( const uno::Reference< frame::XModel >& xChartModel ) +bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const uno::Reference< frame::XModel >& xChartModel ) { bool bResult = isDocumentGeneratedWithOpenOfficeOlderThan3_0( xChartModel ); if( !bResult ) @@ -719,8 +719,6 @@ bool isDocumentGeneratedWithOpenOfficeOlderThan3_4( const uno::Reference< frame: bResult= true; else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/320m") ) ) != -1 ) bResult= true; - else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/330m") ) ) != -1 ) - bResult= true; } } return bResult; diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx index 4912eb5d286e..382e6c5cc16f 100644 --- a/xmloff/source/chart/SchXMLTools.hxx +++ b/xmloff/source/chart/SchXMLTools.hxx @@ -54,7 +54,7 @@ namespace SchXMLTools bool isDocumentGeneratedWithOpenOfficeOlderThan2_3( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); bool isDocumentGeneratedWithOpenOfficeOlderThan2_4( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); - bool isDocumentGeneratedWithOpenOfficeOlderThan3_4( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); + bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); void setBuildIDAtImportInfo( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel , ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xImportInfo ); diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 7ea75b1868d3..2fb65535964c 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3096,6 +3096,8 @@ namespace xmloff { namespace token { TOKEN( "ends-with", XML_ENDS_WITH ), TOKEN( "does-not-end-with", XML_DOES_NOT_END_WITH ), + TOKEN( "chartooo", XML_NP_CHART_EXT ), + TOKEN( "http://openoffice.org/2010/chart", XML_N_CHART_EXT ), TOKEN( "excluding-position", XML_EXCLUDING_POSITION ), TOKEN( "prefer-excluding-position", XML_PREFER_EXCLUDING_POSITION ), -- cgit v1.2.3 From 110334e229b3e0a03da71cc60937d1d161c5c3df Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Tue, 6 Apr 2010 10:22:30 +0200 Subject: hb33patches1: #i110560# applied patch --- sw/source/filter/ww8/docxattributeoutput.cxx | 92 ++++++++++------------------ sw/source/filter/ww8/docxexport.cxx | 24 ++------ sw/source/filter/ww8/docxexportfilter.cxx | 2 +- sw/source/filter/ww8/wrtw8nds.cxx | 2 +- sw/source/filter/ww8/wrtww8gr.cxx | 8 +-- sw/source/filter/ww8/ww8atr.cxx | 4 +- 6 files changed, 45 insertions(+), 87 deletions(-) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index bb26e670928a..2e22e3518c90 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -731,9 +731,7 @@ void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eChar if ( *pIt < 0x0020 ) // filter out the control codes { impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt ); -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "Ignored control code %x in a text run.", *pIt ); -#endif + OSL_TRACE( "Ignored control code %x in a text run.", *pIt ); } break; } @@ -744,23 +742,17 @@ void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eChar void DocxAttributeOutput::RawText( const String& /*rText*/, bool /*bForceUnicode*/, rtl_TextEncoding /*eCharSet*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" ); -#endif + OSL_TRACE("TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" ); } void DocxAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" ); -#endif + OSL_TRACE("TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" ); } void DocxAttributeOutput::EndRuby() { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::EndRuby()\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::EndRuby()\n" ); } bool DocxAttributeOutput::AnalyzeURL( const String& rUrl, const String& rTarget, String* pLinkURL, String* pMark ) @@ -849,9 +841,7 @@ void DocxAttributeOutput::FieldVanish( const String& rTxt, ww::eField eType ) void DocxAttributeOutput::Redline( const SwRedlineData* /*pRedline*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::Redline( const SwRedlineData* pRedline )\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::Redline( const SwRedlineData* pRedline )\n" ); } /// Append the number as 2-digit when less than 10. @@ -936,9 +926,7 @@ void DocxAttributeOutput::StartRedline( const SwRedlineData* pRedlineData ) break; case nsRedlineType_t::REDLINE_FORMAT: -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::StartRedline()\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::StartRedline()\n" ); default: break; } @@ -960,9 +948,7 @@ void DocxAttributeOutput::EndRedline() break; case nsRedlineType_t::REDLINE_FORMAT: -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::EndRedline()\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::EndRedline()\n" ); break; default: break; @@ -973,9 +959,7 @@ void DocxAttributeOutput::EndRedline() void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" ); } void DocxAttributeOutput::ParagraphStyle( USHORT nStyle ) @@ -990,7 +974,7 @@ void DocxAttributeOutput::ParagraphStyle( USHORT nStyle ) void DocxAttributeOutput::InTable() { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::InTable()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::InTable()\n" ); #endif } @@ -998,7 +982,7 @@ void DocxAttributeOutput::InTable() void DocxAttributeOutput::TableRowProperties( bool /*bHeader*/, long /*nCellHeight*/, bool /*bCannotSplit*/, bool /*bRightToLeft*/ ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::TableRowProperties()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::TableRowProperties()\n" ); #endif } #endif @@ -1439,9 +1423,7 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer void DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t /*pNodeInfo*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO: DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo )\n" ); -#endif + OSL_TRACE( "TODO: DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo )\n" ); } void DocxAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) @@ -1455,16 +1437,12 @@ void DocxAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointe void DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO: DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" ); -#endif + OSL_TRACE( "TODO: DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" ); } void DocxAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO: DocxAttributeOutput::TableRowEnd( sal_uInt32 nDepth = 1 )\n" ); -#endif + OSL_TRACE( "TODO: DocxAttributeOutput::TableRowEnd( sal_uInt32 nDepth = 1 )\n" ); } void DocxAttributeOutput::StartStyles() @@ -1483,7 +1461,7 @@ void DocxAttributeOutput::DefaultStyle( USHORT nStyle ) { // are these the values of enum ww::sti (see ../inc/wwstyles.hxx)? #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle ); + OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle ); #else (void) nStyle; // to quiet the warning #endif @@ -1492,7 +1470,7 @@ void DocxAttributeOutput::DefaultStyle( USHORT nStyle ) void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) - some stuff still missing\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) - some stuff still missing\n" ); #endif // create the relation ID OString aRelId; @@ -1710,7 +1688,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po break; default: #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n", + OSL_TRACE( "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n", rFrame.GetWriterType() == sw::Frame::eTxtBox? "eTxtBox": ( rFrame.GetWriterType() == sw::Frame::eOle? "eOle": ( rFrame.GetWriterType() == sw::Frame::eFormControl? "eFormControl": "???" ) ) ); @@ -1839,7 +1817,7 @@ void DocxAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo break; default: #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "Unknown section break to write: %d\n", nC ); + OSL_TRACE( "Unknown section break to write: %d\n", nC ); #endif break; } @@ -1879,7 +1857,7 @@ void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLi { // see 2.6.8 lnNumType (Line Numbering Settings) #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::SectionLineNumbering()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" ); #endif } @@ -1965,7 +1943,7 @@ void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRes // see 2.6.12 pgNumType (Page Numbering Settings) #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::SectionPageNumbering()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::SectionPageNumbering()\n" ); #endif } @@ -2073,7 +2051,7 @@ void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRul #if OSL_DEBUG_LEVEL > 0 // TODO ww8 version writes this, anything to do about it here? if ( rRule.IsContinusNum() ) - fprintf( stderr, "TODO DocxAttributeOutput::NumberingDefinition()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::NumberingDefinition()\n" ); #else (void) rRule; // to quiet the warning... #endif @@ -2265,7 +2243,7 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& /*rEscapement*/ ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::CharEscapement()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::CharEscapement()\n" ); #endif } @@ -2382,7 +2360,7 @@ void DocxAttributeOutput::CharWeight( const SvxWeightItem& rWeight ) void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::CharAutoKern()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::CharAutoKern()\n" ); #endif } @@ -2554,7 +2532,7 @@ void DocxAttributeOutput::TextINetFormat( const SwFmtINetFmt& rLink ) void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::TextCharFormat()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::TextCharFormat()\n" ); #endif } @@ -2577,14 +2555,14 @@ void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef ) void DocxAttributeOutput::HiddenField( const SwField& /*rFld*/ ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::HiddenField()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::HiddenField()\n" ); #endif } void DocxAttributeOutput::PostitField( const SwField* /* pFld*/ ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::PostitField()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::PostitField()\n" ); #endif } @@ -2970,7 +2948,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize ) if ( m_rExport.bOutFlyFrmAttrs ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" ); #endif } else if ( m_rExport.bOutPageDescs ) @@ -2993,7 +2971,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize ) void DocxAttributeOutput::FormatPaperBin( const SvxPaperBinItem& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatPaperBin()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatPaperBin()\n" ); #endif } @@ -3002,7 +2980,7 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) if ( m_rExport.bOutFlyFrmAttrs ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" ); + OSL_TRACE( "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" ); #endif } else if ( m_rExport.bOutPageDescs ) @@ -3093,28 +3071,28 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) void DocxAttributeOutput::FormatSurround( const SwFmtSurround& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatSurround()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatSurround()\n" ); #endif } void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatVertOrientation()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatVertOrientation()\n" ); #endif } void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatHorizOrientation()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatHorizOrientation()\n" ); #endif } void DocxAttributeOutput::FormatAnchor( const SwFmtAnchor& ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatAnchor()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatAnchor()\n" ); #endif } @@ -3129,7 +3107,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) } #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatBackground()\n" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatBackground()\n" ); #endif } @@ -3215,9 +3193,7 @@ void DocxAttributeOutput::FormatKeep( const SvxFmtKeepItem& ) void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxAttributeOutput::FormatTextGrid()\n" ); -#endif + OSL_TRACE( "TODO DocxAttributeOutput::FormatTextGrid()\n" ); } void DocxAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering ) diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index bbfec465973a..46e79679655a 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -342,9 +342,7 @@ void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const St void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::WriteFormData()\n" ); -#endif + OSL_TRACE( "TODO DocxExport::WriteFormData()\n" ); } void DocxExport::DoComboBox(const rtl::OUString& rName, @@ -404,9 +402,7 @@ void DocxExport::DoComboBox(const rtl::OUString& rName, void DocxExport::DoFormText(const SwInputField* /*pFld*/) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::ForFormText()\n" ); -#endif + OSL_TRACE( "TODO DocxExport::ForFormText()\n" ); } void DocxExport::ExportDocument_Impl() @@ -430,9 +426,7 @@ void DocxExport::ExportDocument_Impl() void DocxExport::OutputPageSectionBreaks( const SwTxtNode& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::OutputPageSectionBreaks( const SwTxtNode& )\n" ); -#endif + OSL_TRACE( "TODO DocxExport::OutputPageSectionBreaks( const SwTxtNode& )\n" ); } @@ -480,23 +474,17 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode ) void DocxExport::OutputTableNode( const SwTableNode& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::OutputTableNode( const SwTableNode& )\n" ); -#endif + OSL_TRACE( "TODO DocxExport::OutputTableNode( const SwTableNode& )\n" ); } void DocxExport::OutputGrfNode( const SwGrfNode& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::OutputGrfNode( const SwGrfNode& )\n" ); -#endif + OSL_TRACE( "TODO DocxExport::OutputGrfNode( const SwGrfNode& )\n" ); } void DocxExport::OutputOLENode( const SwOLENode& ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" ); -#endif + OSL_TRACE( "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" ); } ULONG DocxExport::ReplaceCr( BYTE ) diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 5f23f23a8dd5..13715fcd2bbe 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -47,7 +47,7 @@ DocxExportFilter::DocxExportFilter( const uno::Reference< lang::XMultiServiceFac bool DocxExportFilter::exportDocument() { - fprintf( stderr, "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me + OSL_TRACE(, "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me // get SwDoc* uno::Reference< uno::XInterface > xIfc( getModel(), uno::UNO_QUERY ); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 23fa8ecb2c34..9757cc42f79f 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2709,7 +2709,7 @@ void MSWordExportBase::OutputContentNode( const SwCntntNode& rNode ) break; default: #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "Unhandled node, type == %d\n", rNode.GetNodeType() ); + OSL_TRACE("Unhandled node, type == %d\n", rNode.GetNodeType() ); #endif break; } diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 1116c5354e76..a659abfa3c7f 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -94,9 +94,7 @@ using namespace nsFieldFlags; void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "WW8Export::OutputGrfNode( const SwGrfNode& )\n" ); -#endif + OSL_TRACE("WW8Export::OutputGrfNode( const SwGrfNode& )\n" ); ASSERT( mpParentFrame, "frame not set!" ); if ( mpParentFrame ) { @@ -216,9 +214,7 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, void WW8Export::OutputOLENode( const SwOLENode& rOLENode ) { -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" ); -#endif + OSL_TRACE("WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" ); BYTE *pSpecOLE; BYTE *pDataAdr; short nSize; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index c1c254a47f8d..ec3806409073 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -5254,9 +5254,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt ) break; default: -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "Unhandled SfxPoolItem with id %d.\n", rHt.Which() ); -#endif + OSL_TRACE("Unhandled SfxPoolItem with id %d.\n", rHt.Which() ); break; } } -- cgit v1.2.3 From 21cf3286fe2d239cc8697258b1af4e7294cc6607 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 6 Apr 2010 11:47:20 +0200 Subject: chartpositioning: #i100778# correct ODF behaviour --- xmloff/source/chart/SchXMLTools.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index c6fb4d0ca013..4456fbec7cb1 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -714,7 +714,11 @@ bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const uno::Reference< frame: if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/3") ) ) != -1 ) { if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/300m") ) ) != -1 ) - bResult= true; + { + sal_Int32 nBuilId = lcl_getBuildIDFromGenerator( lcl_getGeneratorFromModel(xChartModel) ); + if( nBuilId>0 && nBuilId<9488 ) //9488 is build id of dev300m75 + bResult= true; + } else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/310m") ) ) != -1 ) bResult= true; else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/320m") ) ) != -1 ) -- cgit v1.2.3 From 41ada097ec91c9bb6c73a7a370d6d7531ce14175 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 6 Apr 2010 12:00:23 +0200 Subject: chartpositioning: #i100778# correct inner rectangle in case of 3D charts if outer rectangle is used for sizing --- chart2/source/view/main/ChartView.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index b67af5fd7716..01dda54e172c 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1605,7 +1605,13 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& } else { - m_aResultingDiagramRectangleExcludingAxes = awt::Rectangle( rAvailablePos.X, rAvailablePos.Y, rAvailableSize.Width, rAvailableSize.Height ); + if( bUseFixedInnerSize ) + m_aResultingDiagramRectangleExcludingAxes = awt::Rectangle( rAvailablePos.X, rAvailablePos.Y, rAvailableSize.Width, rAvailableSize.Height ); + else + { + ::basegfx::B2IRectangle aConsumedInnerRect = aVDiagram.getCurrentRectangle(); + m_aResultingDiagramRectangleExcludingAxes = awt::Rectangle( aConsumedInnerRect.getMinX(), aConsumedInnerRect.getMinY(), aConsumedInnerRect.getWidth(), aConsumedInnerRect.getHeight() ); + } } if( xDiagram_MarkHandles.is() ) -- cgit v1.2.3 From 058b9b0e5f358c95ffa12f9d18f747fac3cbc9eb Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 6 Apr 2010 17:35:30 +0200 Subject: chartpositioning: #i100778# use size inclusive axes and axis titles for 3D charts --- sc/source/filter/excel/xichart.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index e715c74275b6..428bbe2d4f82 100755 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -3758,6 +3758,8 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, const XclImpChTypeGroup* pFirstTypeGroup = mxPrimAxesSet->GetFirstTypeGroup().get(); if( pFirstTypeGroup && (pFirstTypeGroup->GetTypeInfo().meTypeCateg == EXC_CHTYPECATEG_PIE) ) xPositioning->setDiagramPositionExcludingAxes( aDiagramRect ); + else if( pFirstTypeGroup && pFirstTypeGroup->Is3dChart() ) + xPositioning->setDiagramPositionIncludingAxesAndAxisTitles( aDiagramRect ); else xPositioning->setDiagramPositionIncludingAxes( aDiagramRect ); } -- cgit v1.2.3 From 5c4de21a30e1ae06345a735c321bc66db1e004f6 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 6 Apr 2010 18:41:51 +0200 Subject: chartpositioning: #i100778# do only calculate inner rectangle if necessary --- .../controller/chartapiwrapper/Chart2ModelContact.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index 69e11198095a..ffc1e95ca796 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -234,10 +234,17 @@ awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingAxes() const awt::Rectangle Chart2ModelContact::GetDiagramRectangleExcludingAxes() const { - awt::Rectangle aRect; - ExplicitValueProvider* pProvider( getExplicitValueProvider() ); - if( pProvider ) - aRect = pProvider->getDiagramRectangleExcludingAxes(); + awt::Rectangle aRect(0,0,0,0); + uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartModel ) ); + + if( DiagramPositioningMode_EXCLUDING == DiagramHelper::getDiagramPositioningMode( xDiagram ) ) + aRect = DiagramHelper::getDiagramRectangleFromModel(m_xChartModel); + else + { + ExplicitValueProvider* pProvider( getExplicitValueProvider() ); + if( pProvider ) + aRect = pProvider->getDiagramRectangleExcludingAxes(); + } return aRect; } -- cgit v1.2.3 From 603cf369c5bc571bc6c11f2a8b3d06275d287e2c Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Wed, 7 Apr 2010 08:26:29 +0200 Subject: tl74#i107229#testautomation for thesaurus in right click context menu --- .../optional/includes/spellcheck/w_spellcheck.inc | 91 +++++++++++++++++++++- 1 file changed, 87 insertions(+), 4 deletions(-) diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc index e96c205cf79c..3dfd505d129c 100644 --- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc +++ b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc @@ -1227,12 +1227,9 @@ endcase ' ******************************************************************* testcase tToolsThesaurus + Dim sWordInitial as string - Dim sLanguageToBeSelected as integer Dim sWordToBeFound as string - Dim sWordReplacedWith as string - Dim i as integer - Dim j as integer Dim TheFile as String PrintLog "- Tools / Thesaurus" @@ -1379,3 +1376,89 @@ testcase tToolsThesaurus '/// Close thesaurus and writerdocument /// Call hCloseDocument endcase + +' ******************************************************************* + +testcase tToolsThesaurusSynonyms + + Dim sWordInitial as string + Dim sNumberOfSuggestions as string + Dim sReplaceWithWord as string + Dim TheFile as String + + PrintLog "- Tools / Thesaurus" + + printlog " Open document where the formatting is set to the language we wish to test." + TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt") + if hFileExists ( TheFile ) <> TRUE then + Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer." + exit sub + end if + + select case iSprache + case 01 : sWordInitial = "Morning" + case 03 : sWordInitial = "Confirmam" + case 07 : Printlog "- No Thesaurus in Russian!" + goto endsub + case 31 : sWordInitial = "Hulp" + case 33 : sWordInitial = "Payer" + case 34 : sWordInitial = "Suficiente" + case 36 : Printlog "- No Thesaurus in Hungarian!" + goto endsub + case 39 : sWordInitial = "Lingua" + case 45 : sWordInitial = "Først" + case 46 : sWordInitial = "Däng" + case 48 : sWordInitial = "wypowiedź" + case 49 : sWordInitial = "Mann" + case 55 : Printlog "- No Thesaurus in Portuguese (Brazil) !" + goto endsub + case 81 : Printlog "- No Thesaurus in Japanese!" + goto endsub + case 82 : Printlog "- No Thesaurus in Korean!" + goto endsub + case 86 : Printlog "- No Thesaurus in Chinese (simplified)!" + goto endsub + case 88 : Printlog "- No Thesaurus in Chinese (traditional)!" + goto endsub + case 30, 35, 36, 37, 42, 47, 48, 51, 90 + Printlog "- No Thesaurus available !" + goto endsub + case else : QAErrorlog "The language " + iSprache + " has no defined errortext. No Test!" + goto endsub + end select + + printlog "Open new preformatted-writerdocument" + call hFileOpen (TheFile,false) + Call sMakeReadOnlyDocumentEditable + Call wTypeKeys sWordInitial + Call wTypeKeys "" + + printlog "Open contextmenu in wrong word" + Call wTypeKeys "" + printlog "Select 'Synonyms' in context menu" + Call hMenuSelectNr (13) + sNumberOfSuggestions=MenuGetItemCount - 2 + '/// Check if there is a suggestion and replace word /// + if sNumberOfSuggestions <=0 then + Warnlog "- No synonyms in Context menu for the first wrong word!" + else + printlog "- Context menu has " + sNumberOfSuggestions + " synonyms for the 1. wrong word!" + sReplaceWithWord=hMenuItemGetText (1) + Call hMenuSelectNr (1) + Call wTypeKeys "" + try + EditCopy + if GetClipboardtext<> sReplaceWithWord then + Warnlog "- 1. wrong Word has not been replaced with " + sReplaceWithWord + " but "+ GetClipBoardtext + else + printlog "- 1. wrong word has been replaced with the 1. entry in context menu!" + end if + catch + endcatch + end if + Call hCloseDocument + +endcase + + + -- cgit v1.2.3 From 838c91c229efff4a846fb8d6efd0211b999adf56 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 14 Apr 2010 12:21:27 +0200 Subject: chartpositioning: #i100778# correct ODF behaviour --- xmloff/inc/SchXMLImport.hxx | 4 ++-- xmloff/inc/xmloff/xmltoken.hxx | 4 ++-- xmloff/source/chart/SchXMLExport.cxx | 4 ++-- xmloff/source/chart/SchXMLImport.cxx | 4 ++-- xmloff/source/chart/SchXMLPlotAreaContext.cxx | 6 +++--- xmloff/source/chart/SchXMLTools.cxx | 2 +- xmloff/source/core/xmltoken.cxx | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 065b268b3b46..7168b2b811a8 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -69,8 +69,8 @@ enum SchXMLChartElemTokenMap enum SchXMLPlotAreaElemTokenMap { - XML_TOK_PA_EXCLUDING_POSITION_EXT, - XML_TOK_PA_EXCLUDING_POSITION, + XML_TOK_PA_COORDINATE_REGION_EXT, + XML_TOK_PA_COORDINATE_REGION, XML_TOK_PA_AXIS, XML_TOK_PA_SERIES, XML_TOK_PA_WALL, diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 681aaaeff82e..60e8d054ac8e 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3098,8 +3098,8 @@ namespace xmloff { namespace token { //chart XML_NP_CHART_EXT, XML_N_CHART_EXT, - XML_EXCLUDING_POSITION, - XML_PREFER_EXCLUDING_POSITION, + XML_COORDINATE_REGION, + XML_PREFER_COORDINATE_REGION, XML_TOKEN_END }; diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index cc281c165cb3..9f0653cd44d9 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -2104,9 +2104,9 @@ void SchXMLExportHelper_Impl::exportExcludingPosition( const uno::Reference< cha rtl::OUStringBuffer sStringBuffer; SvXMLUnitConverter::convertBool( sStringBuffer, bPreferExcludingPositioning ); String aString( sStringBuffer.makeStringAndClear() ); - mrExport.AddAttribute( XML_NAMESPACE_CHART_EXT, XML_PREFER_EXCLUDING_POSITION, aString );//todo: change to chart namespace in future - dependent on fileformat + mrExport.AddAttribute( XML_NAMESPACE_CHART_EXT, XML_PREFER_COORDINATE_REGION, aString );//todo: change to chart namespace in future - dependent on fileformat - SvXMLElementExport aExcludingPosition( mrExport, XML_NAMESPACE_CHART_EXT, XML_EXCLUDING_POSITION, sal_True, sal_True );//todo: change to chart namespace in future - dependent on fileformat + SvXMLElementExport aExcludingPosition( mrExport, XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, sal_True, sal_True );//todo: change to chart namespace in future - dependent on fileformat } void SchXMLExportHelper_Impl::exportAxes( diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 501f92953663..587070202c9c 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -281,8 +281,8 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap() { static __FAR_DATA SvXMLTokenMapEntry aPlotAreaElemTokenMap[] = { - { XML_NAMESPACE_CHART_EXT, XML_EXCLUDING_POSITION, XML_TOK_PA_EXCLUDING_POSITION_EXT }, - { XML_NAMESPACE_CHART, XML_EXCLUDING_POSITION, XML_TOK_PA_EXCLUDING_POSITION }, + { XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION_EXT }, + { XML_NAMESPACE_CHART, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION }, { XML_NAMESPACE_CHART, XML_AXIS, XML_TOK_PA_AXIS }, { XML_NAMESPACE_CHART, XML_SERIES, XML_TOK_PA_SERIES }, { XML_NAMESPACE_CHART, XML_WALL, XML_TOK_PA_WALL }, diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 3792deefebbd..75fc4b2b5cdb 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -520,8 +520,8 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( switch( rTokenMap.Get( nPrefix, rLocalName )) { - case XML_TOK_PA_EXCLUDING_POSITION_EXT: - case XML_TOK_PA_EXCLUDING_POSITION: + case XML_TOK_PA_COORDINATE_REGION_EXT: + case XML_TOK_PA_COORDINATE_REGION: { pContext = new SchXMLExcludingPositionContext( GetImport(), nPrefix, rLocalName, m_aInnerPositioning ); } @@ -1744,7 +1744,7 @@ bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix else bReturn = false; } - else if( IsXMLToken( rLocalName, XML_PREFER_EXCLUDING_POSITION ) ) + else if( IsXMLToken( rLocalName, XML_PREFER_COORDINATE_REGION ) ) { sal_Bool bPreferExcludingPosition = false; m_rImport.GetMM100UnitConverter().convertBool( bPreferExcludingPosition, rValue ); diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 4456fbec7cb1..f6e33a946acd 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -716,7 +716,7 @@ bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const uno::Reference< frame: if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/300m") ) ) != -1 ) { sal_Int32 nBuilId = lcl_getBuildIDFromGenerator( lcl_getGeneratorFromModel(xChartModel) ); - if( nBuilId>0 && nBuilId<9488 ) //9488 is build id of dev300m75 + if( nBuilId>0 && nBuilId<9491 ) //9491 is build id of dev300m76 bResult= true; } else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/310m") ) ) != -1 ) diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 2fb65535964c..2ee9176bb080 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3098,8 +3098,8 @@ namespace xmloff { namespace token { TOKEN( "chartooo", XML_NP_CHART_EXT ), TOKEN( "http://openoffice.org/2010/chart", XML_N_CHART_EXT ), - TOKEN( "excluding-position", XML_EXCLUDING_POSITION ), - TOKEN( "prefer-excluding-position", XML_PREFER_EXCLUDING_POSITION ), + TOKEN( "coordinate-region", XML_COORDINATE_REGION ), + TOKEN( "prefer-coordinate-region", XML_PREFER_COORDINATE_REGION ), #if OSL_DEBUG_LEVEL > 0 { 0, NULL, NULL, XML_TOKEN_END } -- cgit v1.2.3 From 05adff62623e7fd050ff627aea116bcc50cda41b Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Fri, 16 Apr 2010 11:49:17 +0200 Subject: kfreebsdport01: update main config.{sub,guess} --- config.guess | 801 +++++++++++++++++++++++++++++++---------------------------- config.sub | 270 +++++++++++++++----- 2 files changed, 634 insertions(+), 437 deletions(-) diff --git a/config.guess b/config.guess index 82294713260e..c2246a4f7f4c 100755 --- a/config.guess +++ b/config.guess @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# Free Software Foundation, Inc. -timestamp='2004-11-12' +timestamp='2009-12-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,23 +18,25 @@ timestamp='2004-11-12' # # 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. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, 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. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -53,8 +56,9 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -66,11 +70,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,7 +108,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -123,7 +127,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -158,6 +162,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -166,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -196,55 +201,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amd64:OpenBSD:*:*) - echo x86_64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - cats:OpenBSD:*:*) - echo arm-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - luna88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit 0 ;; + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -297,40 +270,43 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe - exit 0 ;; + exit ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit 0 ;; + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -338,32 +314,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; + exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -372,10 +367,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -387,10 +382,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -401,40 +396,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -458,32 +453,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -499,29 +495,29 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -529,7 +525,7 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -544,15 +540,19 @@ EOF exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; - *:AIX:*:[45]) + exit ;; + *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -565,28 +565,28 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -648,9 +648,19 @@ EOF esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -658,11 +668,11 @@ EOF fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -690,216 +700,248 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) + exit ;; + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit 0 ;; + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit 0 ;; + exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu - exit 0 ;; + exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu - exit 0 ;; + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - mips64:Linux:*:*) + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips64 - #undef mips64el + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -907,87 +949,40 @@ EOF PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #ifdef __INTEL_COMPILER - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -995,27 +990,27 @@ EOF # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:syllable:*:*) + exit ;; + i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1023,15 +1018,16 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; + exit ;; M68*:*:R3V[5678]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1123,69 +1132,94 @@ EOF else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - *86) UNAME_PROCESSOR=i686 ;; + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1193,22 +1227,25 @@ EOF UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1219,41 +1256,50 @@ EOF UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms && exit 0 ;; - I*) echo ia64-dec-vms && exit 0 ;; - V*) echo vax-dec-vms && exit 0 ;; + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix - exit 0 ;; + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1285,7 +1331,7 @@ main () #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1374,11 +1420,12 @@ main () } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1387,22 +1434,22 @@ then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1413,7 +1460,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +and + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config.sub b/config.sub index 0f84ac2c51e2..c2d125724c0e 100755 --- a/config.sub +++ b/config.sub @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# Free Software Foundation, Inc. -timestamp='2004-11-30' +timestamp='2010-01-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,22 +22,26 @@ timestamp='2004-11-30' # # 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. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, 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. + # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -70,8 +75,9 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -83,11 +89,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +105,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,8 +124,10 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -145,10 +153,13 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -170,6 +181,10 @@ case $os in -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -186,6 +201,10 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -230,22 +249,28 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -254,30 +279,40 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ + | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -297,28 +332,32 @@ case $basic_machine in | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -327,26 +366,35 @@ case $basic_machine in | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ + | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile-* | tilegx-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -410,6 +458,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -418,10 +470,26 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -450,8 +518,8 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -489,6 +557,10 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -643,6 +715,14 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -654,10 +734,17 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -683,6 +770,9 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -758,9 +848,8 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff ;; os400) basic_machine=powerpc-ibm @@ -782,6 +871,14 @@ case $basic_machine in basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -791,6 +888,12 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -847,6 +950,10 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -873,6 +980,10 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -884,6 +995,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -973,6 +1087,15 @@ case $basic_machine in basic_machine=tic6x-unknown os=-coff ;; + # This must be matched before tile*. + tilegx*) + basic_machine=tilegx-unknown + os=-linux-gnu + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -1048,6 +1171,10 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1086,13 +1213,10 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1139,6 +1263,9 @@ case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1159,26 +1286,30 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ + | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1196,7 +1327,7 @@ case $os in os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1308,6 +1439,11 @@ case $os in -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; -none) ;; *) @@ -1330,6 +1466,12 @@ else # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1339,9 +1481,9 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1367,6 +1509,9 @@ case $basic_machine in m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; @@ -1385,6 +1530,9 @@ case $basic_machine in *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; @@ -1493,7 +1641,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) @@ -1556,7 +1704,7 @@ case $basic_machine in esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) -- cgit v1.2.3 From 660f0269d8bf6459500091dc9112ae8fc91e28dc Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Fri, 16 Apr 2010 11:53:57 +0200 Subject: kfreebsdport01: add kFreeBSD port patches from http://bugs.debian.org/578023 --- configure | 191 +++++++++++++++++++------------- configure.in | 2 +- set_soenv.in | 41 +++++++ solenv/bin/cwscheckapi | 2 +- solenv/bin/modules/installer/globals.pm | 1 + solenv/bin/modules/pre2par/globals.pm | 1 + 6 files changed, 156 insertions(+), 82 deletions(-) diff --git a/configure b/configure index 1fd582a7e341..c2c1882d4be2 100755 --- a/configure +++ b/configure @@ -1,11 +1,13 @@ #! /bin/sh # From configure.in Revision: 1.290 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64. +# Generated by GNU Autoconf 2.65. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -525,7 +527,8 @@ 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'" -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -2380,7 +2383,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries 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 + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command @@ -2455,7 +2458,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.64 +generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -2502,7 +2505,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -2548,7 +2551,7 @@ fi # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2585,7 +2588,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -2627,7 +2630,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2665,7 +2668,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -2702,7 +2705,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp @@ -2880,7 +2883,7 @@ rm -f conftest.val fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -3044,7 +3047,7 @@ fi # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_cxx_try_link @@ -3240,7 +3243,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_cxx_try_run @@ -3305,7 +3308,7 @@ 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.64. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -3558,7 +3561,7 @@ 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 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$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 @@ -3567,9 +3570,9 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} done 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 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -5243,7 +5246,7 @@ $as_echo "ok ($build_cpu)" >&6; } as_fn_error "only sparc and i386 processors are supported" "$LINENO" 5 fi ;; - linux-gnu*) + linux-gnu*|k*bsd*-gnu*) test_gtk=yes test_cairo=yes test_kde=yes @@ -6131,32 +6134,30 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.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. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -6218,10 +6219,10 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 @@ -6229,51 +6230,18 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.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 that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -6306,13 +6274,72 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi -rm -f conftest$ac_cv_exeext +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { 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:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$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 : @@ -7819,8 +7846,8 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -9209,8 +9236,8 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -23095,7 +23122,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.64. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -23130,6 +23157,7 @@ Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -23144,10 +23172,11 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation @@ -23183,6 +23212,8 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -23351,7 +23382,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -23365,7 +23396,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p diff --git a/configure.in b/configure.in index d3e5a0757435..da655304dd9c 100644 --- a/configure.in +++ b/configure.in @@ -937,7 +937,7 @@ case "$build_os" in AC_MSG_ERROR([only sparc and i386 processors are supported]) fi ;; - linux-gnu*) + linux-gnu*|k*bsd*-gnu*) test_gtk=yes test_cairo=yes test_kde=yes diff --git a/set_soenv.in b/set_soenv.in index 1e74bb7526fe..f6c30dc37a9f 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -301,6 +301,47 @@ elsif ( $platform =~ m/netbsd/ ) $OS = "NETBSD"; $PATH_SEPERATOR = $ps; } +elsif ( $platform =~ m/kfreebsd/ ) +{ +# General GNU/kFreeBSD settings: + $CVER = "C341"; + $BIG_SVX = "TRUE"; + $COM = "GCC"; + $COMPATH = '@COMPATH@'; + $GLIBC = "2REDHAT60"; + $GUI = "UNX"; + $GUIBASE = "unx"; + $GVER = "VCL"; + $OS = "LINUX"; + $PATH_SEPERATOR = $ps; + +#Set platform specific values: + if ($platform =~ m/^i[3456]86/) + { print "Setting GNU/kFreeBSD x86 specific values... "; + $outfile = "GNUkFreeBSDX86Env.Set"; + $CPU = "I"; + $CPUNAME = "INTEL"; + $OUTPATH = "unxkfgi6"; + + $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386"; + $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client"; + $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads"; + + } + elsif ($platform =~ m/^x86_64/) + { print "Setting GNU/kFreeBSD x86-64 specific values... "; + $outfile = "GNUkFreeBSDX86-64Env.Set"; + $CPU = "X"; + $CPUNAME = "X86_64"; + $OUTPATH = "unxkfgx6"; + + $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64"; + $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server"; + $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads"; + } + + $INPATH = $OUTPATH.$PROEXT; +} elsif ( $platform =~ m/freebsd/ ) { $BIG_SVX = "TRUE"; $COM = "GCC"; diff --git a/solenv/bin/cwscheckapi b/solenv/bin/cwscheckapi index 63712be76623..4a07ab2d274e 100755 --- a/solenv/bin/cwscheckapi +++ b/solenv/bin/cwscheckapi @@ -55,7 +55,7 @@ function reportError() elif [ "$OSTYPE" == "solaris" ]; then CWSENV=SolarisX86 else - CWSENV=Unknown + CWSENV=linux fi perl $SOLARENV/bin/cwstestresult.pl -c $CWS_WORK_STAMP -n CWSCheckAPI -p $CWSENV $PT_STATUS else diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 81eaace26343..addf03e58726 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -529,6 +529,7 @@ BEGIN $wrapcmd = ""; if ( $plat =~ /linux/i ) { $islinux = 1; } + if ( $plat =~ /kfreebsd/i ) { $islinux = 1; } if ( $plat =~ /solaris/i ) { $issolaris = 1; } if ( $plat =~ /darwin/i ) { $ismacosx = 1; } diff --git a/solenv/bin/modules/pre2par/globals.pm b/solenv/bin/modules/pre2par/globals.pm index 55da94a211d2..a0a50dc11958 100644 --- a/solenv/bin/modules/pre2par/globals.pm +++ b/solenv/bin/modules/pre2par/globals.pm @@ -60,6 +60,7 @@ BEGIN $issolaris = 0; if ( $plat =~ /linux/i ) { $islinux = 1; } + if ( $plat =~ /kfreebsd/i ) { $islinux = 1; } if ( $plat =~ /solaris/i ) { $issolaris = 1; } } -- cgit v1.2.3 From fdc10329339e1bbec90fd8e1796f4b8ed98956a2 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Fri, 16 Apr 2010 11:53:57 +0200 Subject: kfreebsdport01: add kFreeBSD port patches from http://bugs.debian.org/578023 --- sal/osl/unx/file_volume.cxx | 6 ++++++ sal/osl/unx/system.h | 5 +++++ sal/osl/unx/util.c | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index 543acc5f71c5..cc7f61ec6a8b 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -46,6 +46,12 @@ #undef HAVE_STATFS_H #endif +#if defined(LINUX) && defined(__FreeBSD_kernel__) +#undef LINUX +#define FREEBSD 1 +#endif + + #if defined(SOLARIS) #include diff --git a/sal/osl/unx/system.h b/sal/osl/unx/system.h index 8cb77c9b7fc8..1cb0979490c0 100644 --- a/sal/osl/unx/system.h +++ b/sal/osl/unx/system.h @@ -123,6 +123,11 @@ # define NO_PTHREAD_PRIORITY # define PTHREAD_SIGACTION pthread_sigaction #endif + +# ifndef ETIME +# define ETIME ETIMEDOUT +# endif + #endif #ifdef NETBSD diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c index f969bfe566ec..5ba04db56021 100644 --- a/sal/osl/unx/util.c +++ b/sal/osl/unx/util.c @@ -162,7 +162,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr) * And now, the real thing: the get address */ -#ifdef LINUX +#ifdef SIOCGIFHWADDR ret=ioctl(so, SIOCGIFHWADDR, &ifr); #else ret=ioctl(so, SIOCGIFADDR, &ifr); @@ -177,7 +177,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr) close(so); -#ifdef LINUX +#ifdef SIOCGIFHWADDR memcpy(hard_addr,ifr.ifr_hwaddr.sa_data,8); #else memcpy(hard_addr,ifr.ifr_ifru.ifru_addr.sa_data,8); -- cgit v1.2.3 From dcf66a0c608601ce92cc1df62038eb8a8d507a87 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Fri, 16 Apr 2010 11:53:57 +0200 Subject: kfreebsdport01: add kFreeBSD port patches from http://bugs.debian.org/578023 --- tools/source/stream/strmunx.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 8a3504a417c0..e4c280d12383 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -209,7 +209,7 @@ static sal_uInt32 GetSvError( int nErrno ) { 0, SVSTREAM_OK }, { EACCES, SVSTREAM_ACCESS_DENIED }, { EBADF, SVSTREAM_INVALID_HANDLE }, -#if defined( RS6000 ) || defined( ALPHA ) || defined( HP9000 ) || defined( NETBSD ) || defined(FREEBSD) || defined(MACOSX) +#if defined( RS6000 ) || defined( ALPHA ) || defined( HP9000 ) || defined( NETBSD ) || defined(FREEBSD) || defined(MACOSX) || defined(__FreeBSD_kernel__) { EDEADLK, SVSTREAM_LOCKING_VIOLATION }, #else { EDEADLOCK, SVSTREAM_LOCKING_VIOLATION }, @@ -223,7 +223,7 @@ static sal_uInt32 GetSvError( int nErrno ) { EAGAIN, SVSTREAM_LOCKING_VIOLATION }, { EISDIR, SVSTREAM_PATH_NOT_FOUND }, { ELOOP, SVSTREAM_PATH_NOT_FOUND }, -#if ! defined( RS6000 ) && ! defined( ALPHA ) && ! defined( NETBSD ) && ! defined (FREEBSD) && ! defined (MACOSX) +#if ! defined( RS6000 ) && ! defined( ALPHA ) && ! defined( NETBSD ) && ! defined (FREEBSD) && ! defined (MACOSX) && ! defined(__FreeBSD_kernel__) { EMULTIHOP, SVSTREAM_PATH_NOT_FOUND }, { ENOLINK, SVSTREAM_PATH_NOT_FOUND }, #endif -- cgit v1.2.3 From 2ba0135088efa798a3f5a3722c8bb3537b6c6661 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Fri, 16 Apr 2010 12:06:07 +0200 Subject: kfreebsdport01: fix ancient libtool 1.4 in libtextcat (http://bugs.debian.org/578023) --- libtextcat/libtextcat-2.2.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libtextcat/libtextcat-2.2.patch b/libtextcat/libtextcat-2.2.patch index 499ff3d4d442..ecaf31bedf02 100644 --- a/libtextcat/libtextcat-2.2.patch +++ b/libtextcat/libtextcat-2.2.patch @@ -1,5 +1,23 @@ --- misc/libtextcat-2.2/configure Thu May 22 13:39:55 2003 +++ misc/build/libtextcat-2.2/configure Mon Mar 31 11:29:14 2008 +@@ -3451,7 +3451,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|k*bsd*-gnu*) + case $host_cpu in + alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) + lt_cv_deplibs_check_method=pass_all ;; +@@ -6365,7 +6365,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|k*bsd*-gnu*) + version_type=linux + need_lib_prefix=no + need_version=no @@ -5391,7 +5391,8 @@ allow_undefined_flag= no_undefined_flag= -- cgit v1.2.3 From b61b265e1890f97cdb5930fedc8205b83a4fd8cc Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Fri, 16 Apr 2010 14:34:40 +0200 Subject: kfreebsdport01: update config.{guess,sub} of libtextcat/libxmlsec --- libtextcat/libtextcat-2.2.patch | 2476 ++++++++++++++++++++ libxmlsec/makefile.mk | 3 +- .../xmlsec1-update-config-sub-and-guess.patch | 2314 ++++++++++++++++++ 3 files changed, 4792 insertions(+), 1 deletion(-) create mode 100644 libxmlsec/xmlsec1-update-config-sub-and-guess.patch diff --git a/libtextcat/libtextcat-2.2.patch b/libtextcat/libtextcat-2.2.patch index ecaf31bedf02..570ae7b91a17 100644 --- a/libtextcat/libtextcat-2.2.patch +++ b/libtextcat/libtextcat-2.2.patch @@ -1600,3 +1600,2479 @@ + +/* Define to `unsigned' if does not define. */ +/* #undef size_t */ +--- misc/libtextcat-2.2/config.guess 2010-04-15 09:20:04.000000000 +0000 ++++ misc/build/libtextcat-2.2/config.guess 2010-04-15 09:20:41.000000000 +0000 +@@ -1,9 +1,10 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ++# Free Software Foundation, Inc. + +-timestamp='2002-10-21' ++timestamp='2009-12-30' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -17,23 +18,25 @@ + # + # 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. ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, 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. + +-# Originally written by Per Bothner . +-# Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++ ++# Originally written by Per Bothner. Please send patches (context ++# diff format) to and include a ChangeLog ++# entry. + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # +-# The plan is that this can be called by configure scripts if you +-# don't specify an explicit build system type. ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -53,8 +56,9 @@ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +-Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free ++Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -66,11 +70,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -98,14 +102,18 @@ + # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still + # use `HOST_CC' if defined, but it is deprecated. + +-# This shell variable is my proudest work .. or something. --bje ++# Portable tmp directory creation inspired by the Autoconf team. + +-set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +-(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) +- || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +-dummy=$tmpdir/dummy ; +-files="$dummy.c $dummy.o $dummy.rel $dummy" ; +-trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; ++set_cc_for_build=' ++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; ++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; ++: ${TMPDIR=/tmp} ; ++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || ++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || ++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; ++dummy=$tmp/dummy ; ++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; + case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do +@@ -113,15 +121,13 @@ + CC_FOR_BUILD="$c"; break ; + fi ; + done ; +- rm -f $files ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +-esac ; +-unset files' ++esac ; set_cc_for_build= ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi@noc.rutgers.edu 1994-08-24) +@@ -156,6 +162,7 @@ + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; ++ sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched +@@ -164,7 +171,7 @@ + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ +- | grep __ELF__ >/dev/null ++ | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? +@@ -178,144 +185,128 @@ + ;; + esac + # The OS release +- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ # Debian GNU/NetBSD machines have a different userland, and ++ # thus, need a distinct triplet. However, they do not need ++ # kernel version information, so it can be replaced with a ++ # suitable tag, in the style of linux-gnu. ++ case "${UNAME_VERSION}" in ++ Debian*) ++ release='-gnu' ++ ;; ++ *) ++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ ;; ++ esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" +- exit 0 ;; +- amiga:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- arc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- hp300:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- macppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvmeppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- pmax:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sgi:OpenBSD:*:*) +- echo mipseb-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- wgrisc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:OpenBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit ;; ++ *:SolidBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} ++ exit ;; ++ macppc:MirBSD:*:*) ++ echo powerpc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; + alpha:OSF1:*:*) +- if test $UNAME_RELEASE = "V4.0"; then ++ case $UNAME_RELEASE in ++ *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +- fi ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac ++ # According to Compaq, /usr/sbin/psrinfo has been available on ++ # OSF/1 and Tru64 systems produced since 1995. I hope that ++ # covers most systems running today. This code pipes the CPU ++ # types through head -n 1, so we only detect the type of CPU 0. ++ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` ++ case "$ALPHA_CPU_TYPE" in ++ "EV4 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "EV4.5 (21064)") ++ UNAME_MACHINE="alpha" ;; ++ "LCA4 (21066/21068)") ++ UNAME_MACHINE="alpha" ;; ++ "EV5 (21164)") ++ UNAME_MACHINE="alphaev5" ;; ++ "EV5.6 (21164A)") ++ UNAME_MACHINE="alphaev56" ;; ++ "EV5.6 (21164PC)") ++ UNAME_MACHINE="alphapca56" ;; ++ "EV5.7 (21164PC)") ++ UNAME_MACHINE="alphapca57" ;; ++ "EV6 (21264)") ++ UNAME_MACHINE="alphaev6" ;; ++ "EV6.7 (21264A)") ++ UNAME_MACHINE="alphaev67" ;; ++ "EV6.8CB (21264C)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8AL (21264B)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.8CX (21264D)") ++ UNAME_MACHINE="alphaev68" ;; ++ "EV6.9A (21264/EV69A)") ++ UNAME_MACHINE="alphaev69" ;; ++ "EV7 (21364)") ++ UNAME_MACHINE="alphaev7" ;; ++ "EV7.9 (21364A)") ++ UNAME_MACHINE="alphaev79" ;; ++ esac ++ # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- eval $set_cc_for_build +- cat <$dummy.s +- .data +-\$Lformat: +- .byte 37,100,45,37,120,10,0 # "%d-%x\n" +- +- .text +- .globl main +- .align 4 +- .ent main +-main: +- .frame \$30,16,\$26,0 +- ldgp \$29,0(\$27) +- .prologue 1 +- .long 0x47e03d80 # implver \$0 +- lda \$2,-1 +- .long 0x47e20c21 # amask \$2,\$1 +- lda \$16,\$Lformat +- mov \$0,\$17 +- not \$1,\$18 +- jsr \$26,printf +- ldgp \$29,0(\$26) +- mov 0,\$16 +- jsr \$26,exit +- .end main +-EOF +- $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null +- if test "$?" = 0 ; then +- case `$dummy` in +- 0-0) +- UNAME_MACHINE="alpha" +- ;; +- 1-0) +- UNAME_MACHINE="alphaev5" +- ;; +- 1-1) +- UNAME_MACHINE="alphaev56" +- ;; +- 1-101) +- UNAME_MACHINE="alphapca56" +- ;; +- 2-303) +- UNAME_MACHINE="alphaev6" +- ;; +- 2-307) +- UNAME_MACHINE="alphaev67" +- ;; +- 2-1307) +- UNAME_MACHINE="alphaev68" +- ;; +- 3-1307) +- UNAME_MACHINE="alphaev7" +- ;; +- esac +- fi +- rm -f $dummy.s $dummy && rmdir $tmpdir +- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit 0 ;; ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix +- exit 0 ;; ++ exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 +- exit 0 ;; ++ exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 +- exit 0;; ++ exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos +- exit 0 ;; ++ exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos +- exit 0 ;; ++ exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition +- exit 0 ;; ++ exit ;; ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe ++ exit ;; ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 ++ exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} +- exit 0;; ++ exit ;; ++ arm:riscos:*:*|arm:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp +- exit 0;; ++ exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then +@@ -323,29 +314,51 @@ + else + echo pyramid-pyramid-bsd + fi +- exit 0 ;; ++ exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 +- exit 0 ;; +- DRS?6000:UNIX_SV:4.2*:7*) ++ exit ;; ++ DRS?6000:unix:4.0:6*) ++ echo sparc-icl-nx6 ++ exit ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in +- sparc) echo sparc-icl-nx7 && exit 0 ;; ++ sparc) echo sparc-icl-nx7; exit ;; + esac ;; ++ s390x:SunOS:*:*) ++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; +- i86pc:SunOS:5.*:*) +- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; ++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ++ eval $set_cc_for_build ++ SUN_ARCH="i386" ++ # If there is a compiler, see if it is configured for 64-bit objects. ++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ++ # This test works for both compilers. ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ SUN_ARCH="x86_64" ++ fi ++ fi ++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) +@@ -354,10 +367,10 @@ + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` +- exit 0 ;; ++ exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 +@@ -369,10 +382,10 @@ + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac +- exit 0 ;; ++ exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor +@@ -383,37 +396,40 @@ + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} ++ exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 +- exit 0 ;; ++ exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -437,33 +453,33 @@ + exit (-1); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c \ +- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +- rm -f $dummy.c $dummy && rmdir $tmpdir ++ $CC_FOR_BUILD -o $dummy $dummy.c && ++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && ++ SYSTEM_NAME=`$dummy $dummyarg` && ++ { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax +- exit 0 ;; ++ exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax +- exit 0 ;; +- Night_Hawk:*:*:PowerMAX_OS) ++ exit ;; ++ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax +- exit 0 ;; ++ exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix +- exit 0 ;; ++ exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 +- exit 0 ;; ++ exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 +- exit 0 ;; ++ exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` +@@ -479,29 +495,29 @@ + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 +- exit 0 ;; ++ exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 +- exit 0 ;; ++ exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd +- exit 0 ;; ++ exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` +- exit 0 ;; ++ exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. +- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id +- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id ++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix +- exit 0 ;; ++ exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` +@@ -509,7 +525,7 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build +@@ -524,16 +540,19 @@ + exit(0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +- rm -f $dummy.c $dummy && rmdir $tmpdir +- echo rs6000-ibm-aix3.2.5 ++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` ++ then ++ echo "$SYSTEM_NAME" ++ else ++ echo rs6000-ibm-aix3.2.5 ++ fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi +- exit 0 ;; +- *:AIX:*:[45]) ++ exit ;; ++ *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 +@@ -546,28 +565,28 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix +- exit 0 ;; ++ exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 +- exit 0 ;; ++ exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to +- exit 0 ;; # report: romp-ibm BSD 4.3 ++ exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx +- exit 0 ;; ++ exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 +- exit 0 ;; ++ exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd +- exit 0 ;; ++ exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 +- exit 0 ;; ++ exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in +@@ -624,16 +643,36 @@ + } + EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` +- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi +- rm -f $dummy.c $dummy && rmdir $tmpdir ++ test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac ++ if [ ${HP_ARCH} = "hppa2.0w" ] ++ then ++ eval $set_cc_for_build ++ ++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating ++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler ++ # generating 64-bit code. GNU and HP use different nomenclature: ++ # ++ # $ CC_FOR_BUILD=cc ./config.guess ++ # => hppa2.0w-hp-hpux11.23 ++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess ++ # => hppa64-hp-hpux11.23 ++ ++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | ++ grep -q __LP64__ ++ then ++ HP_ARCH="hppa2.0w" ++ else ++ HP_ARCH="hppa64" ++ fi ++ fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -661,186 +700,248 @@ + exit (0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +- rm -f $dummy.c $dummy && rmdir $tmpdir ++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 +- exit 0 ;; ++ exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd +- exit 0 ;; ++ exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd +- exit 0 ;; ++ exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix +- exit 0 ;; ++ exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf +- exit 0 ;; ++ exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf +- exit 0 ;; ++ exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi +- exit 0 ;; ++ exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites +- exit 0 ;; ++ exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; +- CRAY*T3D:*:*:*) +- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; ++ *:UNICOS/mp:*:*) ++ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit 0 ;; ++ exit ;; ++ 5000:UNIX_System_V:4.*:*) ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:FreeBSD:*:*) +- # Determine whether the default compiler uses glibc. +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #if __GLIBC__ >= 2 +- LIBC=gnu +- #else +- LIBC= +- #endif +-EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- rm -f $dummy.c && rmdir $tmpdir +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} +- exit 0 ;; ++ case ${UNAME_MACHINE} in ++ pc98) ++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ amd64) ++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ *) ++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ esac ++ exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin +- exit 0 ;; +- i*:MINGW*:*) ++ exit ;; ++ *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 +- exit 0 ;; ++ exit ;; ++ i*:windows32*:*) ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 ++ exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 +- exit 0 ;; +- x86:Interix*:3*) +- echo i386-pc-interix3 +- exit 0 ;; ++ exit ;; ++ *:Interix*:*) ++ case ${UNAME_MACHINE} in ++ x86) ++ echo i586-pc-interix${UNAME_RELEASE} ++ exit ;; ++ authenticamd | genuineintel | EM64T) ++ echo x86_64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ IA64) ++ echo ia64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ esac ;; ++ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) ++ echo i${UNAME_MACHINE}-pc-mks ++ exit ;; ++ 8664:Windows_NT:*) ++ echo x86_64-pc-mks ++ exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? +- echo i386-pc-interix +- exit 0 ;; ++ echo i586-pc-interix ++ exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin +- exit 0 ;; ++ exit ;; ++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) ++ echo x86_64-unknown-cygwin ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin +- exit 0 ;; ++ exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + *:GNU:*:*) ++ # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` +- exit 0 ;; ++ exit ;; ++ *:GNU/*:*:*) ++ # other systems with GNU libc and userland ++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu ++ exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix +- exit 0 ;; ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit ;; + arm*:Linux:*:*) ++ eval $set_cc_for_build ++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_EABI__ ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ fi ++ exit ;; ++ avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ cris:Linux:*:*) ++ echo cris-axis-linux-gnu ++ exit ;; ++ crisv32:Linux:*:*) ++ echo crisv32-axis-linux-gnu ++ exit ;; ++ frv:Linux:*:*) ++ echo frv-unknown-linux-gnu ++ exit ;; ++ i*86:Linux:*:*) ++ LIBC=gnu ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #ifdef __dietlibc__ ++ LIBC=dietlibc ++ #endif ++EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" ++ exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ m32r*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; +- mips:Linux:*:*) ++ exit ;; ++ mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU +- #undef mips +- #undef mipsel ++ #undef ${UNAME_MACHINE} ++ #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mipsel ++ CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips ++ CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- rm -f $dummy.c && rmdir $tmpdir +- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; +- ppc:Linux:*:*) +- echo powerpc-unknown-linux-gnu +- exit 0 ;; +- ppc64:Linux:*:*) +- echo powerpc64-unknown-linux-gnu +- exit 0 ;; +- alpha:Linux:*:*) +- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in +- EV5) UNAME_MACHINE=alphaev5 ;; +- EV56) UNAME_MACHINE=alphaev56 ;; +- PCA56) UNAME_MACHINE=alphapca56 ;; +- PCA57) UNAME_MACHINE=alphapca56 ;; +- EV6) UNAME_MACHINE=alphaev6 ;; +- EV67) UNAME_MACHINE=alphaev67 ;; +- EV68*) UNAME_MACHINE=alphaev68 ;; +- esac +- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null +- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} +- exit 0 ;; ++ or32:Linux:*:*) ++ echo or32-unknown-linux-gnu ++ exit ;; ++ padre:Linux:*:*) ++ echo sparc-unknown-linux-gnu ++ exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in +@@ -848,82 +949,40 @@ + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac +- exit 0 ;; +- parisc64:Linux:*:* | hppa64:Linux:*:*) +- echo hppa64-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu ++ exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux +- exit 0 ;; ++ exit ;; ++ sh64*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ vax:Linux:*:*) ++ echo ${UNAME_MACHINE}-dec-linux-gnu ++ exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu +- exit 0 ;; +- i*86:Linux:*:*) +- # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. cd to the root directory to prevent +- # problems with other programs or directories called `ld' in the path. +- # Set LC_ALL=C to ensure ld outputs messages in English. +- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ +- | sed -ne '/supported targets:/!d +- s/[ ][ ]*/ /g +- s/.*supported targets: *// +- s/ .*// +- p'` +- case "$ld_supported_targets" in +- elf32-i386) +- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" +- ;; +- a.out-i386-linux) +- echo "${UNAME_MACHINE}-pc-linux-gnuaout" +- exit 0 ;; +- coff-i386) +- echo "${UNAME_MACHINE}-pc-linux-gnucoff" +- exit 0 ;; +- "") +- # Either a pre-BFD a.out linker (linux-gnuoldld) or +- # one that does not give us useful --help. +- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" +- exit 0 ;; +- esac +- # Determine whether the default compiler is a.out or elf +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #ifdef __ELF__ +- # ifdef __GLIBC__ +- # if __GLIBC__ >= 2 +- LIBC=gnu +- # else +- LIBC=gnulibc1 +- # endif +- # else +- LIBC=gnulibc1 +- # endif +- #else +- #ifdef __INTEL_COMPILER +- LIBC=gnu +- #else +- LIBC=gnuaout +- #endif +- #endif +-EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- rm -f $dummy.c && rmdir $tmpdir +- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 +- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 +- ;; ++ exit ;; ++ xtensa*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 +- exit 0 ;; ++ exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... +@@ -931,7 +990,27 @@ + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} +- exit 0 ;; ++ exit ;; ++ i*86:OS/2:*:*) ++ # If we were able to find `uname', then EMX Unix compatibility ++ # is probably installed. ++ echo ${UNAME_MACHINE}-pc-os2-emx ++ exit ;; ++ i*86:XTS-300:*:STOP) ++ echo ${UNAME_MACHINE}-unknown-stop ++ exit ;; ++ i*86:atheos:*:*) ++ echo ${UNAME_MACHINE}-unknown-atheos ++ exit ;; ++ i*86:syllable:*:*) ++ echo ${UNAME_MACHINE}-pc-syllable ++ exit ;; ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) ++ echo i386-unknown-lynxos${UNAME_RELEASE} ++ exit ;; ++ i*86:*DOS:*:*) ++ echo ${UNAME_MACHINE}-pc-msdosdjgpp ++ exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then +@@ -939,15 +1018,16 @@ + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi +- exit 0 ;; +- i*86:*:5:[78]*) ++ exit ;; ++ i*86:*:5:[678]*) ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} +- exit 0 ;; ++ exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi +- exit 0 ;; ++ exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv +- exit 0 ;; ++ exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv +- exit 0 ;; +- M68*:*:R3V[567]*:*) +- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; +- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) ++ exit ;; ++ M680?0:D-NIX:5.3:*) ++ echo m68k-diab-dnix ++ exit ;; ++ M68*:*:R3V[5678]*:*) ++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; ++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ +- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4 && exit 0 ;; ++ && { echo i486-ncr-sysv4; exit; } ;; ++ NCR*:*:4.2:* | MPRAS*:*:4.2:*) ++ OS_REL='.3' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 +- exit 0 ;; +- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) +- echo i386-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; +- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ exit ;; ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` +@@ -1042,64 +1132,94 @@ + else + echo ns32k-sni-sysv + fi +- exit 0 ;; ++ exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 +- exit 0 ;; ++ exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 +- exit 0 ;; ++ exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 +- exit 0 ;; ++ exit ;; ++ i*86:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo ${UNAME_MACHINE}-stratus-vos ++ exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos +- exit 0 ;; ++ exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 +- exit 0 ;; ++ exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos +- exit 0 ;; ++ exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos +- exit 0 ;; ++ exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos +- exit 0 ;; ++ exit ;; ++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. ++ echo i586-pc-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ SX-7:SUPER-UX:*:*) ++ echo sx7-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8:SUPER-UX:*:*) ++ echo sx8-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8R:SUPER-UX:*:*) ++ echo sx8r-nec-superux${UNAME_RELEASE} ++ exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Darwin:*:*) +- echo `uname -p`-apple-darwin${UNAME_RELEASE} +- exit 0 ;; ++ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown ++ case $UNAME_PROCESSOR in ++ i386) ++ eval $set_cc_for_build ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ UNAME_PROCESSOR="x86_64" ++ fi ++ fi ;; ++ unknown) UNAME_PROCESSOR=powerpc ;; ++ esac ++ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} ++ exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then +@@ -1107,22 +1227,25 @@ + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:QNX:*:4*) + echo i386-pc-qnx +- exit 0 ;; +- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) ++ exit ;; ++ NSE-?:NONSTOP_KERNEL:*:*) ++ echo nse-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux +- exit 0 ;; ++ exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv +- exit 0 ;; ++ exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 +@@ -1133,36 +1256,50 @@ + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 +- exit 0 ;; +- i*86:OS/2:*:*) +- # If we were able to find `uname', then EMX Unix compatibility +- # is probably installed. +- echo ${UNAME_MACHINE}-pc-os2-emx +- exit 0 ;; ++ exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 +- exit 0 ;; ++ exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex +- exit 0 ;; ++ exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 +- exit 0 ;; ++ exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 +- exit 0 ;; ++ exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 +- exit 0 ;; ++ exit ;; + *:ITS:*:*) + echo pdp10-unknown-its +- exit 0 ;; +- i*86:XTS-300:*:STOP) +- echo ${UNAME_MACHINE}-unknown-stop +- exit 0 ;; +- i*86:atheos:*:*) +- echo ${UNAME_MACHINE}-unknown-atheos +- exit 0 ;; ++ exit ;; ++ SEI:*:*:SEIUX) ++ echo mips-sei-seiux${UNAME_RELEASE} ++ exit ;; ++ *:DragonFly:*:*) ++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ++ exit ;; ++ *:*VMS:*:*) ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ case "${UNAME_MACHINE}" in ++ A*) echo alpha-dec-vms ; exit ;; ++ I*) echo ia64-dec-vms ; exit ;; ++ V*) echo vax-dec-vms ; exit ;; ++ esac ;; ++ *:XENIX:*:SysV) ++ echo i386-pc-xenix ++ exit ;; ++ i*86:skyos:*:*) ++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' ++ exit ;; ++ i*86:rdos:*:*) ++ echo ${UNAME_MACHINE}-pc-rdos ++ exit ;; ++ i*86:AROS:*:*) ++ echo ${UNAME_MACHINE}-pc-aros ++ exit ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 +@@ -1194,7 +1331,7 @@ + #endif + + #if defined (__arm) && defined (__acorn) && defined (__unix) +- printf ("arm-acorn-riscix"); exit (0); ++ printf ("arm-acorn-riscix\n"); exit (0); + #endif + + #if defined (hp300) && !defined (hpux) +@@ -1283,12 +1420,12 @@ + } + EOF + +-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +-rm -f $dummy.c $dummy && rmdir $tmpdir ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + + # Apollos put the system type in the environment. + +-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } ++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + + # Convex versions that predate uname can use getsysinfo(1) + +@@ -1297,22 +1434,22 @@ + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + c34*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + c38*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + c4*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + esac + fi + +@@ -1323,7 +1460,9 @@ + the operating system you are using. It is advised that you + download the most up to date version of the config scripts from + +- ftp://ftp.gnu.org/pub/gnu/config/ ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD ++and ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + + If the version you run ($0) is already up to date, please + send the following data and any information you think might be +--- misc/libtextcat-2.2/config.sub 2010-04-15 09:20:04.000000000 +0000 ++++ misc/build/libtextcat-2.2/config.sub 2010-04-15 09:20:41.000000000 +0000 +@@ -1,9 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ++# Free Software Foundation, Inc. + +-timestamp='2002-09-05' ++timestamp='2010-01-22' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -21,22 +22,26 @@ + # + # 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. +- ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, 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. + ++ + # Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++# diff and a properly formatted GNU ChangeLog entry. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD ++ + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. +@@ -70,8 +75,9 @@ + version="\ + GNU config.sub ($timestamp) + +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +-Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free ++Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -83,11 +89,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -99,7 +105,7 @@ + *local*) + # First pass through any local machine types. + echo $1 +- exit 0;; ++ exit ;; + + * ) + break ;; +@@ -118,7 +124,10 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ ++ kopensolaris*-gnu* | \ ++ storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -144,10 +153,13 @@ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple | -axis) ++ -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; ++ -bluegene*) ++ os=-cnk ++ ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 +@@ -169,6 +181,10 @@ + -hiux*) + os=-hiuxwe2 + ;; ++ -sco6) ++ os=-sco5v6 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -185,6 +201,10 @@ + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; ++ -sco5v6*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -228,51 +248,71 @@ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ +- | clipper \ ++ | am33_2.0 \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ ++ | bfin \ ++ | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ +- | fr30 | frv \ ++ | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ +- | ip2k \ +- | m32r | m68000 | m68k | m88k | mcore \ ++ | ip2k | iq2000 \ ++ | lm32 \ ++ | m32c | m32r | m32rle | m68000 | m68k | m88k \ ++ | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +- | mips64vr | mips64vrel \ ++ | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ ++ | mips64r5900 | mips64r5900el \ ++ | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ ++ | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ ++ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ ++ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ ++ | moxie \ ++ | mt \ ++ | msp430 \ ++ | nios | nios2 \ + | ns16k | ns32k \ +- | openrisc | or32 \ ++ | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ +- | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ++ | rx \ ++ | score \ ++ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ +- | strongarm \ +- | tahoe | thumb | tic80 | tron \ ++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ ++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ ++ | spu | strongarm \ ++ | tahoe | thumb | tic4x | tic80 | tron \ ++ | ubicom32 \ + | v850 | v850e \ + | we32k \ +- | x86 | xscale | xstormy16 | xtensa \ +- | z8k) ++ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ ++ | z8k | z80) + basic_machine=$basic_machine-unknown + ;; +- m6811 | m68hc11 | m6812 | m68hc12) ++ m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; ++ ms1) ++ basic_machine=mt-unknown ++ ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and +@@ -292,50 +332,69 @@ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ +- | avr-* \ +- | bs2000-* \ +- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ +- | clipper-* | cydra-* \ ++ | avr-* | avr32-* \ ++ | bfin-* | bs2000-* \ ++ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ ++ | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ +- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ ++ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ +- | ip2k-* \ +- | m32r-* \ ++ | ip2k-* | iq2000-* \ ++ | lm32-* \ ++ | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | mcore-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ +- | mips64vr-* | mips64vrel-* \ ++ | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ ++ | mips64r5900-* | mips64r5900el-* \ ++ | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ ++ | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ ++ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ ++ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ +- | mipstx39 | mipstx39el \ ++ | mipstx39-* | mipstx39el-* \ ++ | mmix-* \ ++ | mt-* \ ++ | msp430-* \ ++ | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ +- | romp-* | rs6000-* \ +- | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ ++ | romp-* | rs6000-* | rx-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ +- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ +- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ +- | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ ++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ ++ | sparclite-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ ++ | tahoe-* | thumb-* \ ++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ ++ | tile-* | tilegx-* \ ++ | tron-* \ ++ | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ +- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ +- | xtensa-* \ ++ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ ++ | xstormy16-* | xtensa*-* \ + | ymp-* \ +- | z8k-*) ++ | z8k-* | z80-*) ++ ;; ++ # Recognize the basic CPU types without company name, with glob match. ++ xtensa*) ++ basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. +@@ -353,6 +412,9 @@ + basic_machine=a29k-amd + os=-udi + ;; ++ abacus) ++ basic_machine=abacus-unknown ++ ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout +@@ -367,6 +429,12 @@ + basic_machine=a29k-none + os=-bsd + ;; ++ amd64) ++ basic_machine=x86_64-pc ++ ;; ++ amd64-*) ++ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + amdahl) + basic_machine=580-amdahl + os=-sysv +@@ -390,6 +458,10 @@ + basic_machine=m68k-apollo + os=-bsd + ;; ++ aros) ++ basic_machine=i386-pc ++ os=-aros ++ ;; + aux) + basic_machine=m68k-apple + os=-aux +@@ -398,10 +470,26 @@ + basic_machine=ns32k-sequent + os=-dynix + ;; ++ blackfin) ++ basic_machine=bfin-unknown ++ os=-linux ++ ;; ++ blackfin-*) ++ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ bluegene*) ++ basic_machine=powerpc-ibm ++ os=-cnk ++ ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; ++ cegcc) ++ basic_machine=arm-unknown ++ os=-cegcc ++ ;; + convex-c1) + basic_machine=c1-convex + os=-bsd +@@ -426,12 +514,27 @@ + basic_machine=j90-cray + os=-unicos + ;; ++ craynv) ++ basic_machine=craynv-cray ++ os=-unicosmp ++ ;; ++ cr16) ++ basic_machine=cr16-unknown ++ os=-elf ++ ;; + crds | unos) + basic_machine=m68k-crds + ;; ++ crisv32 | crisv32-* | etraxfs*) ++ basic_machine=crisv32-axis ++ ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; ++ crx) ++ basic_machine=crx-unknown ++ os=-elf ++ ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; +@@ -454,6 +557,14 @@ + basic_machine=m88k-motorola + os=-sysv3 + ;; ++ dicos) ++ basic_machine=i686-pc ++ os=-dicos ++ ;; ++ djgpp) ++ basic_machine=i586-pc ++ os=-msdosdjgpp ++ ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx +@@ -604,6 +715,14 @@ + basic_machine=m68k-isi + os=-sysv + ;; ++ m68knommu) ++ basic_machine=m68k-unknown ++ os=-linux ++ ;; ++ m68knommu-*) ++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + m88k-omron*) + basic_machine=m88k-omron + ;; +@@ -615,10 +734,17 @@ + basic_machine=ns32k-utek + os=-sysv + ;; ++ microblaze) ++ basic_machine=microblaze-xilinx ++ ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; ++ mingw32ce) ++ basic_machine=arm-unknown ++ os=-mingw32ce ++ ;; + miniframe) + basic_machine=m68000-convergent + ;; +@@ -632,10 +758,6 @@ + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; +- mmix*) +- basic_machine=mmix-knuth +- os=-mmixware +- ;; + monitor) + basic_machine=m68k-rom68k + os=-coff +@@ -648,6 +770,9 @@ + basic_machine=i386-pc + os=-msdos + ;; ++ ms1-*) ++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ++ ;; + mvs) + basic_machine=i370-ibm + os=-mvs +@@ -723,9 +848,12 @@ + basic_machine=hppa1.1-oki + os=-proelf + ;; +- or32 | or32-*) ++ openrisc | openrisc-*) + basic_machine=or32-unknown +- os=-coff ++ ;; ++ os400) ++ basic_machine=powerpc-ibm ++ os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson +@@ -743,6 +871,14 @@ + basic_machine=i860-intel + os=-osf + ;; ++ parisc) ++ basic_machine=hppa-unknown ++ os=-linux ++ ;; ++ parisc-*) ++ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + pbd) + basic_machine=sparc-tti + ;; +@@ -752,24 +888,36 @@ + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; ++ pc98) ++ basic_machine=i386-pc ++ ;; ++ pc98-*) ++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; +- pentiumii | pentium2) ++ pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; ++ pentium4) ++ basic_machine=i786-pc ++ ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; +- pentiumii-* | pentium2-*) ++ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ++ pentium4-*) ++ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + pn) + basic_machine=pn-gould + ;; +@@ -802,6 +950,10 @@ + basic_machine=i586-unknown + os=-pw32 + ;; ++ rdos) ++ basic_machine=i386-pc ++ os=-rdos ++ ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff +@@ -828,6 +980,14 @@ + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; ++ sde) ++ basic_machine=mipsisa32-sde ++ os=-elf ++ ;; ++ sei) ++ basic_machine=mips-sei ++ os=-seiux ++ ;; + sequent) + basic_machine=i386-sequent + ;; +@@ -835,6 +995,12 @@ + basic_machine=sh-hitachi + os=-hms + ;; ++ sh5el) ++ basic_machine=sh5le-unknown ++ ;; ++ sh64) ++ basic_machine=sh64-unknown ++ ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks +@@ -901,10 +1067,6 @@ + basic_machine=i386-sequent + os=-dynix + ;; +- t3d) +- basic_machine=alpha-cray +- os=-unicos +- ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos +@@ -913,14 +1075,27 @@ + basic_machine=t90-cray + os=-unicos + ;; +- tic4x | c4x*) +- basic_machine=tic4x-unknown +- os=-coff +- ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; ++ tic55x | c55x*) ++ basic_machine=tic55x-unknown ++ os=-coff ++ ;; ++ tic6x | c6x*) ++ basic_machine=tic6x-unknown ++ os=-coff ++ ;; ++ # This must be matched before tile*. ++ tilegx*) ++ basic_machine=tilegx-unknown ++ os=-linux-gnu ++ ;; ++ tile*) ++ basic_machine=tile-unknown ++ os=-linux-gnu ++ ;; + tx39) + basic_machine=mipstx39-unknown + ;; +@@ -934,6 +1109,10 @@ + tower | tower-32) + basic_machine=m68k-ncr + ;; ++ tpf) ++ basic_machine=s390x-ibm ++ os=-tpf ++ ;; + udi29k) + basic_machine=a29k-amd + os=-udi +@@ -977,9 +1156,9 @@ + basic_machine=hppa1.1-winbond + os=-proelf + ;; +- windows32) +- basic_machine=i386-pc +- os=-windows32-msvcrt ++ xbox) ++ basic_machine=i686-pc ++ os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell +@@ -992,6 +1171,10 @@ + basic_machine=z8k-unknown + os=-sim + ;; ++ z80-*-coff) ++ basic_machine=z80-unknown ++ os=-sim ++ ;; + none) + basic_machine=none-none + os=-none +@@ -1011,6 +1194,9 @@ + romp) + basic_machine=romp-ibm + ;; ++ mmix) ++ basic_machine=mmix-knuth ++ ;; + rs6000) + basic_machine=rs6000-ibm + ;; +@@ -1027,13 +1213,10 @@ + we32k) + basic_machine=we32k-att + ;; +- sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) ++ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; +- sh64) +- basic_machine=sh64-unknown +- ;; +- sparc | sparcv9 | sparcv9b) ++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) +@@ -1080,6 +1263,9 @@ + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. ++ -auroraux) ++ os=-auroraux ++ ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; +@@ -1100,24 +1286,30 @@ + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ +- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ +- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ ++ | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ +- | -aos* \ ++ | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ +- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ +- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ ++ | -openbsd* | -solidbsd* \ ++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ ++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ +- | -chorusos* | -chorusrdb* \ ++ | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ +- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ ++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ +- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) ++ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ ++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1129,16 +1321,21 @@ + ;; + esac + ;; ++ -nto-qnx*) ++ ;; + -nto*) +- os=-nto-qnx ++ os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ +- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; ++ -linux-dietlibc) ++ os=-linux-dietlibc ++ ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; +@@ -1151,6 +1348,9 @@ + -opened*) + os=-openedition + ;; ++ -os400*) ++ os=-os400 ++ ;; + -wince*) + os=-wince + ;; +@@ -1172,6 +1372,9 @@ + -atheos*) + os=-atheos + ;; ++ -syllable*) ++ os=-syllable ++ ;; + -386bsd) + os=-bsd + ;; +@@ -1194,6 +1397,9 @@ + -sinix*) + os=-sysv4 + ;; ++ -tpf*) ++ os=-tpf ++ ;; + -triton*) + os=-sysv3 + ;; +@@ -1224,6 +1430,20 @@ + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; ++ -aros*) ++ os=-aros ++ ;; ++ -kaos*) ++ os=-kaos ++ ;; ++ -zvmoe) ++ os=-zvmoe ++ ;; ++ -dicos*) ++ os=-dicos ++ ;; ++ -nacl*) ++ ;; + -none) + ;; + *) +@@ -1246,6 +1466,12 @@ + # system, and we'll never get to this point. + + case $basic_machine in ++ score-*) ++ os=-elf ++ ;; ++ spu-*) ++ os=-elf ++ ;; + *-acorn) + os=-riscix1.2 + ;; +@@ -1255,6 +1481,9 @@ + arm*-semi) + os=-aout + ;; ++ c4x-* | tic4x-*) ++ os=-coff ++ ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 +@@ -1280,6 +1509,9 @@ + m68*-cisco) + os=-aout + ;; ++ mep-*) ++ os=-elf ++ ;; + mips*-cisco) + os=-elf + ;; +@@ -1298,9 +1530,15 @@ + *-be) + os=-beos + ;; ++ *-haiku) ++ os=-haiku ++ ;; + *-ibm) + os=-aix + ;; ++ *-knuth) ++ os=-mmixware ++ ;; + *-wec) + os=-proelf + ;; +@@ -1403,7 +1641,7 @@ + -sunos*) + vendor=sun + ;; +- -aix*) ++ -cnk*|-aix*) + vendor=ibm + ;; + -beos*) +@@ -1433,9 +1671,15 @@ + -mvs* | -opened*) + vendor=ibm + ;; ++ -os400*) ++ vendor=ibm ++ ;; + -ptx*) + vendor=sequent + ;; ++ -tpf*) ++ vendor=ibm ++ ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; +@@ -1460,7 +1704,7 @@ + esac + + echo $basic_machine$os +-exit 0 ++exit + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/libxmlsec/makefile.mk b/libxmlsec/makefile.mk index 0c9db0860ae3..98cc871ec15d 100644 --- a/libxmlsec/makefile.mk +++ b/libxmlsec/makefile.mk @@ -61,7 +61,8 @@ PATCH_FILES=\ xmlsec1-nssdisablecallbacks.patch \ xmlsec1-noverify.patch \ xmlsec1-mingw32.patch \ - xmlsec1-mingw-keymgr-mscrypto.patch + xmlsec1-mingw-keymgr-mscrypto.patch \ + xmlsec1-update-config-sub-and-guess.patch ADDITIONAL_FILES= \ diff --git a/libxmlsec/xmlsec1-update-config-sub-and-guess.patch b/libxmlsec/xmlsec1-update-config-sub-and-guess.patch new file mode 100644 index 000000000000..a0caf352c99b --- /dev/null +++ b/libxmlsec/xmlsec1-update-config-sub-and-guess.patch @@ -0,0 +1,2314 @@ +--- misc/xmlsec1-1.2.12/config.guess 2010-04-15 09:29:35.000000000 +0000 ++++ misc/build/xmlsec1-1.2.12/config.guess 2010-04-15 09:29:46.000000000 +0000 +@@ -1,9 +1,10 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ++# Free Software Foundation, Inc. + +-timestamp='2003-06-17' ++timestamp='2009-12-30' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -17,23 +18,25 @@ + # + # 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. ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, 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. + +-# Originally written by Per Bothner . +-# Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++ ++# Originally written by Per Bothner. Please send patches (context ++# diff format) to and include a ChangeLog ++# entry. + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # +-# The plan is that this can be called by configure scripts if you +-# don't specify an explicit build system type. ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -53,8 +56,9 @@ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +-Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free ++Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -66,11 +70,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -104,7 +108,7 @@ + trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; + trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; + : ${TMPDIR=/tmp} ; +- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +@@ -123,7 +127,7 @@ + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +-esac ;' ++esac ; set_cc_for_build= ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi@noc.rutgers.edu 1994-08-24) +@@ -136,13 +140,6 @@ + UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +-## for Red Hat Linux +-if test -f /etc/redhat-release ; then +- VENDOR=redhat ; +-else +- VENDOR= ; +-fi +- + # Note: order is significant - the case branches are not exclusive. + + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +@@ -165,6 +162,7 @@ + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; ++ sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched +@@ -173,7 +171,7 @@ + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ +- | grep __ELF__ >/dev/null ++ | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? +@@ -203,50 +201,32 @@ + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" +- exit 0 ;; +- amiga:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- arc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- hp300:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- macppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvmeppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- pmax:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sgi:OpenBSD:*:*) +- echo mipseb-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- wgrisc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:OpenBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit ;; ++ *:SolidBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} ++ exit ;; ++ macppc:MirBSD:*:*) ++ echo powerpc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; + alpha:OSF1:*:*) +- if test $UNAME_RELEASE = "V4.0"; then ++ case $UNAME_RELEASE in ++ *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +- fi ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU +@@ -284,42 +264,49 @@ + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac ++ # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit 0 ;; +- Alpha*:OpenVMS:*:*) +- echo alpha-hp-vms +- exit 0 ;; ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix +- exit 0 ;; ++ exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 +- exit 0 ;; ++ exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 +- exit 0;; ++ exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos +- exit 0 ;; ++ exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos +- exit 0 ;; ++ exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition +- exit 0 ;; ++ exit ;; ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe ++ exit ;; ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 ++ exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} +- exit 0;; ++ exit ;; ++ arm:riscos:*:*|arm:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp +- exit 0;; ++ exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then +@@ -327,32 +314,51 @@ + else + echo pyramid-pyramid-bsd + fi +- exit 0 ;; ++ exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 +- exit 0 ;; ++ exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 +- exit 0 ;; +- DRS?6000:UNIX_SV:4.2*:7*) ++ exit ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in +- sparc) echo sparc-icl-nx7 && exit 0 ;; ++ sparc) echo sparc-icl-nx7; exit ;; + esac ;; ++ s390x:SunOS:*:*) ++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; +- i86pc:SunOS:5.*:*) +- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; ++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ++ eval $set_cc_for_build ++ SUN_ARCH="i386" ++ # If there is a compiler, see if it is configured for 64-bit objects. ++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ++ # This test works for both compilers. ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ SUN_ARCH="x86_64" ++ fi ++ fi ++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) +@@ -361,10 +367,10 @@ + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` +- exit 0 ;; ++ exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 +@@ -376,10 +382,10 @@ + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac +- exit 0 ;; ++ exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor +@@ -390,37 +396,40 @@ + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} ++ exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 +- exit 0 ;; ++ exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -444,32 +453,33 @@ + exit (-1); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c \ +- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && exit 0 ++ $CC_FOR_BUILD -o $dummy $dummy.c && ++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && ++ SYSTEM_NAME=`$dummy $dummyarg` && ++ { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax +- exit 0 ;; ++ exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax +- exit 0 ;; ++ exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax +- exit 0 ;; ++ exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix +- exit 0 ;; ++ exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 +- exit 0 ;; ++ exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 +- exit 0 ;; ++ exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` +@@ -485,29 +495,29 @@ + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 +- exit 0 ;; ++ exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 +- exit 0 ;; ++ exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd +- exit 0 ;; ++ exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` +- exit 0 ;; ++ exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. +- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id +- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id ++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix +- exit 0 ;; ++ exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` +@@ -515,7 +525,7 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build +@@ -530,15 +540,19 @@ + exit(0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 +- echo rs6000-ibm-aix3.2.5 ++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` ++ then ++ echo "$SYSTEM_NAME" ++ else ++ echo rs6000-ibm-aix3.2.5 ++ fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi +- exit 0 ;; +- *:AIX:*:[45]) ++ exit ;; ++ *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 +@@ -551,28 +565,28 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix +- exit 0 ;; ++ exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 +- exit 0 ;; ++ exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to +- exit 0 ;; # report: romp-ibm BSD 4.3 ++ exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx +- exit 0 ;; ++ exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 +- exit 0 ;; ++ exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd +- exit 0 ;; ++ exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 +- exit 0 ;; ++ exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in +@@ -634,9 +648,19 @@ + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then +- # avoid double evaluation of $set_cc_for_build +- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build +- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null ++ eval $set_cc_for_build ++ ++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating ++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler ++ # generating 64-bit code. GNU and HP use different nomenclature: ++ # ++ # $ CC_FOR_BUILD=cc ./config.guess ++ # => hppa2.0w-hp-hpux11.23 ++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess ++ # => hppa64-hp-hpux11.23 ++ ++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | ++ grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else +@@ -644,11 +668,11 @@ + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -676,208 +700,248 @@ + exit (0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 ++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 +- exit 0 ;; ++ exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd +- exit 0 ;; ++ exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd +- exit 0 ;; ++ exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix +- exit 0 ;; ++ exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf +- exit 0 ;; ++ exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf +- exit 0 ;; ++ exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi +- exit 0 ;; ++ exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites +- exit 0 ;; ++ exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + *:UNICOS/mp:*:*) +- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit 0 ;; ++ exit ;; ++ 5000:UNIX_System_V:4.*:*) ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; +- *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) +- # Determine whether the default compiler uses glibc. +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #if __GLIBC__ >= 2 +- LIBC=gnu +- #else +- LIBC= +- #endif +-EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} +- exit 0 ;; ++ exit ;; ++ *:FreeBSD:*:*) ++ case ${UNAME_MACHINE} in ++ pc98) ++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ amd64) ++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ *) ++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ esac ++ exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin +- exit 0 ;; +- i*:MINGW*:*) ++ exit ;; ++ *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 +- exit 0 ;; ++ exit ;; ++ i*:windows32*:*) ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 ++ exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 +- exit 0 ;; +- x86:Interix*:[34]*) +- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' +- exit 0 ;; ++ exit ;; ++ *:Interix*:*) ++ case ${UNAME_MACHINE} in ++ x86) ++ echo i586-pc-interix${UNAME_RELEASE} ++ exit ;; ++ authenticamd | genuineintel | EM64T) ++ echo x86_64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ IA64) ++ echo ia64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks +- exit 0 ;; ++ exit ;; ++ 8664:Windows_NT:*) ++ echo x86_64-pc-mks ++ exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix +- exit 0 ;; ++ exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin +- exit 0 ;; ++ exit ;; ++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) ++ echo x86_64-unknown-cygwin ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin +- exit 0 ;; ++ exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + *:GNU:*:*) ++ # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` +- exit 0 ;; ++ exit ;; ++ *:GNU/*:*:*) ++ # other systems with GNU libc and userland ++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu ++ exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix +- exit 0 ;; ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit ;; + arm*:Linux:*:*) ++ eval $set_cc_for_build ++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_EABI__ ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ fi ++ exit ;; ++ avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu +- exit 0 ;; +- ia64:Linux:*:*) +- echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu +- exit 0 ;; +- m68*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; +- mips:Linux:*:*) ++ exit ;; ++ crisv32:Linux:*:*) ++ echo crisv32-axis-linux-gnu ++ exit ;; ++ frv:Linux:*:*) ++ echo frv-unknown-linux-gnu ++ exit ;; ++ i*86:Linux:*:*) ++ LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +- #undef CPU +- #undef mips +- #undef mipsel +- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mipsel +- #else +- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips +- #else +- CPU= +- #endif ++ #ifdef __dietlibc__ ++ LIBC=dietlibc + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 +- ;; +- mips64:Linux:*:*) ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" ++ exit ;; ++ ia64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m32r*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m68*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU +- #undef mips64 +- #undef mips64el ++ #undef ${UNAME_MACHINE} ++ #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mips64el ++ CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips64 ++ CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; +- ppc:Linux:*:*) +- echo powerpc-${VENDOR:-unknown}-linux-gnu +- exit 0 ;; +- ppc64:Linux:*:*) +- echo powerpc64-${VENDOR:-unknown}-linux-gnu +- exit 0 ;; +- alpha:Linux:*:*) +- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in +- EV5) UNAME_MACHINE=alphaev5 ;; +- EV56) UNAME_MACHINE=alphaev56 ;; +- PCA56) UNAME_MACHINE=alphapca56 ;; +- PCA57) UNAME_MACHINE=alphapca56 ;; +- EV6) UNAME_MACHINE=alphaev6 ;; +- EV67) UNAME_MACHINE=alphaev67 ;; +- EV68*) UNAME_MACHINE=alphaev68 ;; +- esac +- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null +- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} +- exit 0 ;; ++ or32:Linux:*:*) ++ echo or32-unknown-linux-gnu ++ exit ;; ++ padre:Linux:*:*) ++ echo sparc-unknown-linux-gnu ++ exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in +@@ -885,84 +949,40 @@ + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac +- exit 0 ;; +- parisc64:Linux:*:* | hppa64:Linux:*:*) +- echo hppa64-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu ++ exit ;; + s390:Linux:*:* | s390x:Linux:*:*) +- echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu +- exit 0 ;; ++ echo ${UNAME_MACHINE}-ibm-linux ++ exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ vax:Linux:*:*) ++ echo ${UNAME_MACHINE}-dec-linux-gnu ++ exit ;; + x86_64:Linux:*:*) +- echo x86_64-${VENDOR:-unknown}-linux-gnu +- exit 0 ;; +- i*86:Linux:*:*) +- # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. cd to the root directory to prevent +- # problems with other programs or directories called `ld' in the path. +- # Set LC_ALL=C to ensure ld outputs messages in English. +- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ +- | sed -ne '/supported targets:/!d +- s/[ ][ ]*/ /g +- s/.*supported targets: *// +- s/ .*// +- p'` +- case "$ld_supported_targets" in +- elf32-i386) +- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" +- ;; +- a.out-i386-linux) +- echo "${UNAME_MACHINE}-pc-linux-gnuaout" +- exit 0 ;; +- coff-i386) +- echo "${UNAME_MACHINE}-pc-linux-gnucoff" +- exit 0 ;; +- "") +- # Either a pre-BFD a.out linker (linux-gnuoldld) or +- # one that does not give us useful --help. +- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" +- exit 0 ;; +- esac +- # Determine whether the default compiler is a.out or elf +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #ifdef __ELF__ +- # ifdef __GLIBC__ +- # if __GLIBC__ >= 2 +- LIBC=gnu +- # else +- LIBC=gnulibc1 +- # endif +- # else +- LIBC=gnulibc1 +- # endif +- #else +- #ifdef __INTEL_COMPILER +- LIBC=gnu +- #else +- LIBC=gnuaout +- #endif +- #endif +-EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0 +- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 +- ;; ++ echo x86_64-unknown-linux-gnu ++ exit ;; ++ xtensa*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 +- exit 0 ;; ++ exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... +@@ -970,24 +990,27 @@ + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} +- exit 0 ;; ++ exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx +- exit 0 ;; ++ exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop +- exit 0 ;; ++ exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos +- exit 0 ;; +- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ exit ;; ++ i*86:syllable:*:*) ++ echo ${UNAME_MACHINE}-pc-syllable ++ exit ;; ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp +- exit 0 ;; ++ exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then +@@ -995,15 +1018,16 @@ + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi +- exit 0 ;; +- i*86:*:5:[78]*) ++ exit ;; ++ i*86:*:5:[678]*) ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} +- exit 0 ;; ++ exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi +- exit 0 ;; ++ exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv +- exit 0 ;; ++ exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv +- exit 0 ;; ++ exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix +- exit 0 ;; +- M68*:*:R3V[567]*:*) +- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; +- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) ++ exit ;; ++ M68*:*:R3V[5678]*:*) ++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; ++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ +- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4 && exit 0 ;; ++ && { echo i486-ncr-sysv4; exit; } ;; ++ NCR*:*:4.2:* | MPRAS*:*:4.2:*) ++ OS_REL='.3' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 +- exit 0 ;; ++ exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; +- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ exit ;; ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` +@@ -1095,68 +1132,94 @@ + else + echo ns32k-sni-sysv + fi +- exit 0 ;; ++ exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 +- exit 0 ;; ++ exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 +- exit 0 ;; ++ exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 +- exit 0 ;; ++ exit ;; ++ i*86:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo ${UNAME_MACHINE}-stratus-vos ++ exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos +- exit 0 ;; ++ exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 +- exit 0 ;; ++ exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos +- exit 0 ;; ++ exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos +- exit 0 ;; ++ exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos +- exit 0 ;; ++ exit ;; ++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. ++ echo i586-pc-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ SX-7:SUPER-UX:*:*) ++ echo sx7-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8:SUPER-UX:*:*) ++ echo sx8-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8R:SUPER-UX:*:*) ++ echo sx8r-nec-superux${UNAME_RELEASE} ++ exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Darwin:*:*) +- case `uname -p` in +- *86) UNAME_PROCESSOR=i686 ;; +- powerpc) UNAME_PROCESSOR=powerpc ;; ++ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown ++ case $UNAME_PROCESSOR in ++ i386) ++ eval $set_cc_for_build ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ UNAME_PROCESSOR="x86_64" ++ fi ++ fi ;; ++ unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then +@@ -1164,22 +1227,25 @@ + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:QNX:*:4*) + echo i386-pc-qnx +- exit 0 ;; +- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) ++ exit ;; ++ NSE-?:NONSTOP_KERNEL:*:*) ++ echo nse-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux +- exit 0 ;; ++ exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv +- exit 0 ;; ++ exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 +@@ -1190,28 +1256,50 @@ + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 +- exit 0 ;; ++ exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 +- exit 0 ;; ++ exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex +- exit 0 ;; ++ exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 +- exit 0 ;; ++ exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 +- exit 0 ;; ++ exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 +- exit 0 ;; ++ exit ;; + *:ITS:*:*) + echo pdp10-unknown-its +- exit 0 ;; ++ exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ *:DragonFly:*:*) ++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ++ exit ;; ++ *:*VMS:*:*) ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ case "${UNAME_MACHINE}" in ++ A*) echo alpha-dec-vms ; exit ;; ++ I*) echo ia64-dec-vms ; exit ;; ++ V*) echo vax-dec-vms ; exit ;; ++ esac ;; ++ *:XENIX:*:SysV) ++ echo i386-pc-xenix ++ exit ;; ++ i*86:skyos:*:*) ++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' ++ exit ;; ++ i*86:rdos:*:*) ++ echo ${UNAME_MACHINE}-pc-rdos ++ exit ;; ++ i*86:AROS:*:*) ++ echo ${UNAME_MACHINE}-pc-aros ++ exit ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 +@@ -1243,7 +1331,7 @@ + #endif + + #if defined (__arm) && defined (__acorn) && defined (__unix) +- printf ("arm-acorn-riscix"); exit (0); ++ printf ("arm-acorn-riscix\n"); exit (0); + #endif + + #if defined (hp300) && !defined (hpux) +@@ -1332,11 +1420,12 @@ + } + EOF + +-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + + # Apollos put the system type in the environment. + +-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } ++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + + # Convex versions that predate uname can use getsysinfo(1) + +@@ -1345,22 +1434,22 @@ + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + c34*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + c38*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + c4*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + esac + fi + +@@ -1371,7 +1460,9 @@ + the operating system you are using. It is advised that you + download the most up to date version of the config scripts from + +- ftp://ftp.gnu.org/pub/gnu/config/ ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD ++and ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + + If the version you run ($0) is already up to date, please + send the following data and any information you think might be +--- misc/xmlsec1-1.2.12/config.sub 2010-04-15 09:29:35.000000000 +0000 ++++ misc/build/xmlsec1-1.2.12/config.sub 2010-04-15 09:29:46.000000000 +0000 +@@ -1,9 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ++# Free Software Foundation, Inc. + +-timestamp='2003-06-18' ++timestamp='2010-01-22' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -21,22 +22,26 @@ + # + # 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. +- ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, 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. + ++ + # Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++# diff and a properly formatted GNU ChangeLog entry. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD ++ + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. +@@ -70,8 +75,9 @@ + version="\ + GNU config.sub ($timestamp) + +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +-Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free ++Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -83,11 +89,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -99,7 +105,7 @@ + *local*) + # First pass through any local machine types. + echo $1 +- exit 0;; ++ exit ;; + + * ) + break ;; +@@ -118,7 +124,10 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ ++ kopensolaris*-gnu* | \ ++ storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -144,10 +153,13 @@ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple | -axis) ++ -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; ++ -bluegene*) ++ os=-cnk ++ ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 +@@ -169,6 +181,10 @@ + -hiux*) + os=-hiuxwe2 + ;; ++ -sco6) ++ os=-sco5v6 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -185,6 +201,10 @@ + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; ++ -sco5v6*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -228,54 +248,71 @@ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ++ | am33_2.0 \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ ++ | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ +- | fr30 | frv \ ++ | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ +- | ip2k \ +- | m32r | m68000 | m68k | m88k | mcore \ ++ | ip2k | iq2000 \ ++ | lm32 \ ++ | m32c | m32r | m32rle | m68000 | m68k | m88k \ ++ | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +- | mips64vr | mips64vrel \ ++ | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ ++ | mips64r5900 | mips64r5900el \ ++ | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ ++ | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ ++ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ ++ | moxie \ ++ | mt \ + | msp430 \ ++ | nios | nios2 \ + | ns16k | ns32k \ +- | openrisc | or32 \ ++ | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ +- | s390 | s390x \ +- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ++ | rx \ ++ | score \ ++ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ +- | strongarm \ ++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ ++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ ++ | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ ++ | ubicom32 \ + | v850 | v850e \ + | we32k \ +- | x86 | xscale | xstormy16 | xtensa \ +- | z8k) ++ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ ++ | z8k | z80) + basic_machine=$basic_machine-unknown + ;; +- m6811 | m68hc11 | m6812 | m68hc12) ++ m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; ++ ms1) ++ basic_machine=mt-unknown ++ ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and +@@ -295,55 +332,69 @@ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ +- | avr-* \ +- | bs2000-* \ ++ | avr-* | avr32-* \ ++ | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ +- | clipper-* | cydra-* \ ++ | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ +- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ ++ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ +- | ip2k-* \ +- | m32r-* \ ++ | ip2k-* | iq2000-* \ ++ | lm32-* \ ++ | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | mcore-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ +- | mips64vr-* | mips64vrel-* \ ++ | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ ++ | mips64r5900-* | mips64r5900el-* \ ++ | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ ++ | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ ++ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ ++ | mmix-* \ ++ | mt-* \ + | msp430-* \ +- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ ++ | nios-* | nios2-* \ ++ | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ +- | romp-* | rs6000-* \ +- | s390-* | s390x-* \ +- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ ++ | romp-* | rs6000-* | rx-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ +- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ +- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ ++ | sparclite-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ ++ | tile-* | tilegx-* \ + | tron-* \ ++ | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ +- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ +- | xtensa-* \ ++ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ ++ | xstormy16-* | xtensa*-* \ + | ymp-* \ +- | z8k-*) ++ | z8k-* | z80-*) ++ ;; ++ # Recognize the basic CPU types without company name, with glob match. ++ xtensa*) ++ basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. +@@ -361,6 +412,9 @@ + basic_machine=a29k-amd + os=-udi + ;; ++ abacus) ++ basic_machine=abacus-unknown ++ ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout +@@ -378,6 +432,9 @@ + amd64) + basic_machine=x86_64-pc + ;; ++ amd64-*) ++ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + amdahl) + basic_machine=580-amdahl + os=-sysv +@@ -401,6 +458,10 @@ + basic_machine=m68k-apollo + os=-bsd + ;; ++ aros) ++ basic_machine=i386-pc ++ os=-aros ++ ;; + aux) + basic_machine=m68k-apple + os=-aux +@@ -409,10 +470,26 @@ + basic_machine=ns32k-sequent + os=-dynix + ;; ++ blackfin) ++ basic_machine=bfin-unknown ++ os=-linux ++ ;; ++ blackfin-*) ++ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ bluegene*) ++ basic_machine=powerpc-ibm ++ os=-cnk ++ ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; ++ cegcc) ++ basic_machine=arm-unknown ++ os=-cegcc ++ ;; + convex-c1) + basic_machine=c1-convex + os=-bsd +@@ -437,12 +514,27 @@ + basic_machine=j90-cray + os=-unicos + ;; ++ craynv) ++ basic_machine=craynv-cray ++ os=-unicosmp ++ ;; ++ cr16) ++ basic_machine=cr16-unknown ++ os=-elf ++ ;; + crds | unos) + basic_machine=m68k-crds + ;; ++ crisv32 | crisv32-* | etraxfs*) ++ basic_machine=crisv32-axis ++ ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; ++ crx) ++ basic_machine=crx-unknown ++ os=-elf ++ ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; +@@ -465,6 +557,14 @@ + basic_machine=m88k-motorola + os=-sysv3 + ;; ++ dicos) ++ basic_machine=i686-pc ++ os=-dicos ++ ;; ++ djgpp) ++ basic_machine=i586-pc ++ os=-msdosdjgpp ++ ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx +@@ -615,6 +715,14 @@ + basic_machine=m68k-isi + os=-sysv + ;; ++ m68knommu) ++ basic_machine=m68k-unknown ++ os=-linux ++ ;; ++ m68knommu-*) ++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + m88k-omron*) + basic_machine=m88k-omron + ;; +@@ -626,10 +734,17 @@ + basic_machine=ns32k-utek + os=-sysv + ;; ++ microblaze) ++ basic_machine=microblaze-xilinx ++ ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; ++ mingw32ce) ++ basic_machine=arm-unknown ++ os=-mingw32ce ++ ;; + miniframe) + basic_machine=m68000-convergent + ;; +@@ -643,10 +758,6 @@ + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; +- mmix*) +- basic_machine=mmix-knuth +- os=-mmixware +- ;; + monitor) + basic_machine=m68k-rom68k + os=-coff +@@ -659,6 +770,9 @@ + basic_machine=i386-pc + os=-msdos + ;; ++ ms1-*) ++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ++ ;; + mvs) + basic_machine=i370-ibm + os=-mvs +@@ -727,10 +841,6 @@ + np1) + basic_machine=np1-gould + ;; +- nv1) +- basic_machine=nv1-cray +- os=-unicosmp +- ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; +@@ -738,9 +848,12 @@ + basic_machine=hppa1.1-oki + os=-proelf + ;; +- or32 | or32-*) ++ openrisc | openrisc-*) + basic_machine=or32-unknown +- os=-coff ++ ;; ++ os400) ++ basic_machine=powerpc-ibm ++ os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson +@@ -758,6 +871,14 @@ + basic_machine=i860-intel + os=-osf + ;; ++ parisc) ++ basic_machine=hppa-unknown ++ os=-linux ++ ;; ++ parisc-*) ++ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + pbd) + basic_machine=sparc-tti + ;; +@@ -767,6 +888,12 @@ + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; ++ pc98) ++ basic_machine=i386-pc ++ ;; ++ pc98-*) ++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; +@@ -823,6 +950,10 @@ + basic_machine=i586-unknown + os=-pw32 + ;; ++ rdos) ++ basic_machine=i386-pc ++ os=-rdos ++ ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff +@@ -833,6 +964,12 @@ + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; ++ s390 | s390-*) ++ basic_machine=s390-ibm ++ ;; ++ s390x | s390x-*) ++ basic_machine=s390x-ibm ++ ;; + sa29200) + basic_machine=a29k-amd + os=-udi +@@ -843,6 +980,10 @@ + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; ++ sde) ++ basic_machine=mipsisa32-sde ++ os=-elf ++ ;; + sei) + basic_machine=mips-sei + os=-seiux +@@ -854,6 +995,9 @@ + basic_machine=sh-hitachi + os=-hms + ;; ++ sh5el) ++ basic_machine=sh5le-unknown ++ ;; + sh64) + basic_machine=sh64-unknown + ;; +@@ -943,6 +1087,15 @@ + basic_machine=tic6x-unknown + os=-coff + ;; ++ # This must be matched before tile*. ++ tilegx*) ++ basic_machine=tilegx-unknown ++ os=-linux-gnu ++ ;; ++ tile*) ++ basic_machine=tile-unknown ++ os=-linux-gnu ++ ;; + tx39) + basic_machine=mipstx39-unknown + ;; +@@ -956,6 +1109,10 @@ + tower | tower-32) + basic_machine=m68k-ncr + ;; ++ tpf) ++ basic_machine=s390x-ibm ++ os=-tpf ++ ;; + udi29k) + basic_machine=a29k-amd + os=-udi +@@ -999,6 +1156,10 @@ + basic_machine=hppa1.1-winbond + os=-proelf + ;; ++ xbox) ++ basic_machine=i686-pc ++ os=-mingw32 ++ ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; +@@ -1010,6 +1171,10 @@ + basic_machine=z8k-unknown + os=-sim + ;; ++ z80-*-coff) ++ basic_machine=z80-unknown ++ os=-sim ++ ;; + none) + basic_machine=none-none + os=-none +@@ -1029,6 +1194,9 @@ + romp) + basic_machine=romp-ibm + ;; ++ mmix) ++ basic_machine=mmix-knuth ++ ;; + rs6000) + basic_machine=rs6000-ibm + ;; +@@ -1045,13 +1213,10 @@ + we32k) + basic_machine=we32k-att + ;; +- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) ++ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; +- sh64) +- basic_machine=sh64-unknown +- ;; +- sparc | sparcv9 | sparcv9b) ++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) +@@ -1098,6 +1263,9 @@ + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. ++ -auroraux) ++ os=-auroraux ++ ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; +@@ -1118,25 +1286,30 @@ + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ +- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ +- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ ++ | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ +- | -aos* \ ++ | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ +- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ +- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ ++ | -openbsd* | -solidbsd* \ ++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ ++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ +- | -chorusos* | -chorusrdb* \ ++ | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ +- | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) ++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1154,12 +1327,15 @@ + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ +- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; ++ -linux-dietlibc) ++ os=-linux-dietlibc ++ ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; +@@ -1172,6 +1348,9 @@ + -opened*) + os=-openedition + ;; ++ -os400*) ++ os=-os400 ++ ;; + -wince*) + os=-wince + ;; +@@ -1193,6 +1372,9 @@ + -atheos*) + os=-atheos + ;; ++ -syllable*) ++ os=-syllable ++ ;; + -386bsd) + os=-bsd + ;; +@@ -1215,6 +1397,9 @@ + -sinix*) + os=-sysv4 + ;; ++ -tpf*) ++ os=-tpf ++ ;; + -triton*) + os=-sysv3 + ;; +@@ -1251,6 +1436,14 @@ + -kaos*) + os=-kaos + ;; ++ -zvmoe) ++ os=-zvmoe ++ ;; ++ -dicos*) ++ os=-dicos ++ ;; ++ -nacl*) ++ ;; + -none) + ;; + *) +@@ -1273,6 +1466,12 @@ + # system, and we'll never get to this point. + + case $basic_machine in ++ score-*) ++ os=-elf ++ ;; ++ spu-*) ++ os=-elf ++ ;; + *-acorn) + os=-riscix1.2 + ;; +@@ -1282,8 +1481,8 @@ + arm*-semi) + os=-aout + ;; +- c4x-* | tic4x-*) +- os=-coff ++ c4x-* | tic4x-*) ++ os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) +@@ -1310,6 +1509,9 @@ + m68*-cisco) + os=-aout + ;; ++ mep-*) ++ os=-elf ++ ;; + mips*-cisco) + os=-elf + ;; +@@ -1328,9 +1530,15 @@ + *-be) + os=-beos + ;; ++ *-haiku) ++ os=-haiku ++ ;; + *-ibm) + os=-aix + ;; ++ *-knuth) ++ os=-mmixware ++ ;; + *-wec) + os=-proelf + ;; +@@ -1433,7 +1641,7 @@ + -sunos*) + vendor=sun + ;; +- -aix*) ++ -cnk*|-aix*) + vendor=ibm + ;; + -beos*) +@@ -1463,9 +1671,15 @@ + -mvs* | -opened*) + vendor=ibm + ;; ++ -os400*) ++ vendor=ibm ++ ;; + -ptx*) + vendor=sequent + ;; ++ -tpf*) ++ vendor=ibm ++ ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; +@@ -1490,7 +1704,7 @@ + esac + + echo $basic_machine$os +-exit 0 ++exit + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) -- cgit v1.2.3 From ee0b04174011ff11e70d26cd95474564739fd5e1 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Sat, 17 Apr 2010 14:38:13 +0200 Subject: kfreebsdport01: fix openssl build on GNU/kFreeBSD --- openssl/makefile.mk | 14 ++++++++++++-- openssl/openssllnx.patch | 12 ++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/openssl/makefile.mk b/openssl/makefile.mk index 66bfa31a145e..42d770c95d3f 100644 --- a/openssl/makefile.mk +++ b/openssl/makefile.mk @@ -61,15 +61,25 @@ OUT2LIB = libssl.* OUT2LIB += libcrypto.* OUT2INC += include/openssl/* +UNAME=$(shell uname) + .IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" PATCH_FILES=openssllnx.patch ADDITIONAL_FILES:= \ libcrypto_OOo_0_9_8l.map \ libssl_OOo_0_9_8l.map .IF "$(CPU)" == "I" - CONFIGURE_ACTION=Configure linux-elf + .IF "$(UNAME)" == "GNU/kFreeBSD" + CONFIGURE_ACTION=Configure debian-kfreebsd-i386 + .ELSE + CONFIGURE_ACTION=Configure linux-elf + .ENDIF .ELIF "$(BUILD64)" == "1" - CONFIGURE_ACTION=Configure linux-generic64 + .IF "$(UNAME)" == "GNU/kFreeBSD" + CONFIGURE_ACTION=Configure debian-kfreebsd-amd64 + .ELSE + CONFIGURE_ACTION=Configure linux-generic64 + .ENDIF .ELSE CONFIGURE_ACTION=Configure linux-generic32 .ENDIF diff --git a/openssl/openssllnx.patch b/openssl/openssllnx.patch index 2eb929474ae1..7f26b997bd1c 100644 --- a/openssl/openssllnx.patch +++ b/openssl/openssllnx.patch @@ -1,3 +1,15 @@ +--- misc/build/openssl-0.9.8l/Configure-old 2010-04-17 13:51:42.000000000 +0200 ++++ misc/build/openssl-0.9.8l/Configure 2010-04-17 13:52:03.000000000 +0200 +@@ -382,6 +382,9 @@ + + "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + ++"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++ + "nextstep", "cc:-O -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", + "nextstep3.3", "cc:-O3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", + --- misc/openssl-0.9.8l/test/Makefile 2009-03-25 11:59:22.000000000 +0100 +++ misc/build/openssl-0.9.8l/test/Makefile 2009-03-30 12:51:00.210108929 +0200 @@ -408,7 +408,7 @@ -- cgit v1.2.3 From 7416e6a8305282606f54b30daf4942ab0b5ecbb7 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Fri, 16 Apr 2010 13:14:12 +0200 Subject: kfreebsdport01: fix misordered hunks --- libtextcat/libtextcat-2.2.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libtextcat/libtextcat-2.2.patch b/libtextcat/libtextcat-2.2.patch index 570ae7b91a17..ca7a26cabfbf 100644 --- a/libtextcat/libtextcat-2.2.patch +++ b/libtextcat/libtextcat-2.2.patch @@ -9,15 +9,6 @@ case $host_cpu in alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) lt_cv_deplibs_check_method=pass_all ;; -@@ -6365,7 +6365,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux-gnu*|k*bsd*-gnu*) - version_type=linux - need_lib_prefix=no - need_version=no @@ -5391,7 +5391,8 @@ allow_undefined_flag= no_undefined_flag= @@ -46,6 +37,15 @@ version_type=freebsd-$objformat case $version_type in freebsd-elf*) +@@ -6365,7 +6365,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|k*bsd*-gnu*) + version_type=linux + need_lib_prefix=no + need_version=no --- misc/libtextcat-2.2/src/Makefile.in Thu May 22 13:39:52 2003 +++ misc/build/libtextcat-2.2/src/Makefile.in Mon Mar 31 11:29:14 2008 @@ -124,20 +124,20 @@ -- cgit v1.2.3 From e91dde17f239ac9aa2f5ee49333ff9dbeb091995 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Sat, 17 Apr 2010 02:49:49 +0200 Subject: kfreebsdport01: remove .IF "$(JDK)" != gcj, we need JAVA_INCLUDES for gcj, too --- odk/source/unowinreg/win/makefile.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/odk/source/unowinreg/win/makefile.mk b/odk/source/unowinreg/win/makefile.mk index eab0826a433c..077d8aa60aac 100644 --- a/odk/source/unowinreg/win/makefile.mk +++ b/odk/source/unowinreg/win/makefile.mk @@ -42,7 +42,6 @@ USE_DEFFILE=TRUE JAVA_INCLUDES:= -I$(JAVA_HOME)/include # values taken from set_soenv.in -.IF "$(JDK)" != "gcj" .IF "$(OS)" == "LINUX" JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux .ELIF "$(OS)" == "FREEBSD" @@ -52,7 +51,6 @@ JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux .ELIF "$(OS)" == "NETBSD" JAVA_INCLUDES+= -I$(JAVA_HOME)/include/netbsd .ENDIF -.ENDIF .IF "$(SOLAR_JAVA)"=="" nojava: -- cgit v1.2.3 From a60d0d583416ff39e140f8106e13ce01fba1763d Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Sat, 17 Apr 2010 16:55:29 +0200 Subject: kfreebsdport01: default to system-stl for GNU/kFreeBSD --- configure | 8 +++++++- configure.in | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/configure b/configure index c2c1882d4be2..b6abef2d361b 100755 --- a/configure +++ b/configure @@ -9747,7 +9747,13 @@ $as_echo_n "checking what the default STL should be... " >&6; } if test "$_os" = "Linux"; then case "$build_cpu" in i?86) - DEFAULT_TO_STLPORT="yes" + case "$build_os" in k*bsd*-gnu*) + DEFAULT_TO_STLPORT="no" + ;; + *) + DEFAULT_TO_STLPORT="yes" + ;; + esac ;; *) DEFAULT_TO_STLPORT="no" diff --git a/configure.in b/configure.in index da655304dd9c..1a9c812c2603 100644 --- a/configure.in +++ b/configure.in @@ -2398,7 +2398,13 @@ dnl =================================================================== if test "$_os" = "Linux"; then case "$build_cpu" in i?86) - DEFAULT_TO_STLPORT="yes" + case "$build_os" in k*bsd*-gnu*) + DEFAULT_TO_STLPORT="no" + ;; + *) + DEFAULT_TO_STLPORT="yes" + ;; + esac ;; *) DEFAULT_TO_STLPORT="no" -- cgit v1.2.3 From 60137211233861884b4d035b9bdd5e3c06682fba Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Tue, 20 Apr 2010 01:10:11 +0200 Subject: kfreebsdport01: make epms deb.c create correct kfreebsd-{i386,amd64}.deb packages --- epm/epm-3.7.patch | 1454 ++++++++++++++++++++++++----------------------------- 1 file changed, 650 insertions(+), 804 deletions(-) diff --git a/epm/epm-3.7.patch b/epm/epm-3.7.patch index 116aa28f6690..02835bc3e5ce 100644 --- a/epm/epm-3.7.patch +++ b/epm/epm-3.7.patch @@ -1,811 +1,657 @@ -*** misc/epm-3.7/bsd.c Tue Jan 14 18:05:01 2003 ---- misc/build/epm-3.7/bsd.c Mon Nov 20 14:54:51 2006 -*************** -*** 26,31 **** ---- 26,38 ---- - - #include "epm.h" - -+ void cr2semicolon(char *command) -+ { -+ int len, i; -+ len=strlen(command); -+ for (i=0;inum_depends, d = dist->depends; i > 0; i --, d ++) + { ++#ifdef __FreeBSD__ ++ if (d->type == DEPEND_REQUIRES) { ++ if (dist->relnumber) ++ fprintf(fp, "@pkgdep %s-%s-%d-%s", d->product, dist->version, dist->relnumber, platname); ++ else ++ fprintf(fp, "@pkgdep %s-%s-%s", d->product, dist->version, platname); ++ } ++#else + if (d->type == DEPEND_REQUIRES) + fprintf(fp, "@pkgdep %s", d->product); ++#endif + else + #ifdef __FreeBSD__ + /* +@@ -179,9 +195,11 @@ + " by the BSD packager.\n", stderr); + break; + case COMMAND_POST_INSTALL : ++ cr2semicolon(c->command); + fprintf(fp, "@exec %s\n", c->command); + break; + case COMMAND_PRE_REMOVE : ++ cr2semicolon(c->command); + fprintf(fp, "@unexec %s\n", c->command); + break; + case COMMAND_POST_REMOVE : +@@ -199,7 +217,7 @@ + */ + + fprintf(fp, "@exec /bin/mkdir -p %s\n", file->dst); +- fprintf(fp, "@exec /bin/chown %s:%s %s\n", file->user, file->group, ++ fprintf(fp, "@exec /usr/sbin/chown %s:%s %s\n", file->user, file->group, + file->dst); + fprintf(fp, "@exec /bin/chmod %04o %s\n", file->mode, file->dst); + } +@@ -326,12 +344,13 @@ + if (Verbosity) + puts("Building FreeBSD pkg binary distribution..."); + +- if (run_command(NULL, "pkg_create -p / -s %s -c %s -d %s -f %s %s", ++ if (run_command(NULL, "/usr/sbin/pkg_create -p / -s %s -c %s -d %s -f %s %s", + current, commentname, descrname, plistname, name)) + return (1); + +- if (run_command(NULL, "mv %s.tgz %s", name, directory)) +- return (1); ++ if (run_command(NULL, "mv %s.tbz %s", name, directory)) ++ if (run_command(NULL, "mv %s.tgz %s", name, directory)) ++ return (1); + /* - * 'make_bsd()' - Make a FreeBSD software distribution package. -*************** -*** 149,156 **** ---- 156,172 ---- - - for (i = dist->num_depends, d = dist->depends; i > 0; i --, d ++) - { -+ #ifdef __FreeBSD__ -+ if (d->type == DEPEND_REQUIRES) { -+ if (dist->relnumber) -+ fprintf(fp, "@pkgdep %s-%s-%d-%s", d->product, dist->version, dist->relnumber, platname); -+ else -+ fprintf(fp, "@pkgdep %s-%s-%s", d->product, dist->version, platname); -+ } -+ #else - if (d->type == DEPEND_REQUIRES) - fprintf(fp, "@pkgdep %s", d->product); -+ #endif - else - #ifdef __FreeBSD__ - /* -*************** -*** 179,187 **** ---- 195,205 ---- - " by the BSD packager.\n", stderr); - break; - case COMMAND_POST_INSTALL : -+ cr2semicolon(c->command); - fprintf(fp, "@exec %s\n", c->command); - break; - case COMMAND_PRE_REMOVE : -+ cr2semicolon(c->command); - fprintf(fp, "@unexec %s\n", c->command); - break; - case COMMAND_POST_REMOVE : -*************** -*** 199,205 **** - */ - - fprintf(fp, "@exec /bin/mkdir -p %s\n", file->dst); -! fprintf(fp, "@exec /bin/chown %s:%s %s\n", file->user, file->group, - file->dst); - fprintf(fp, "@exec /bin/chmod %04o %s\n", file->mode, file->dst); - } ---- 217,223 ---- - */ - - fprintf(fp, "@exec /bin/mkdir -p %s\n", file->dst); -! fprintf(fp, "@exec /usr/sbin/chown %s:%s %s\n", file->user, file->group, - file->dst); - fprintf(fp, "@exec /bin/chmod %04o %s\n", file->mode, file->dst); - } -*************** -*** 326,337 **** - if (Verbosity) - puts("Building FreeBSD pkg binary distribution..."); - -! if (run_command(NULL, "pkg_create -p / -s %s -c %s -d %s -f %s %s", - current, commentname, descrname, plistname, name)) - return (1); - -! if (run_command(NULL, "mv %s.tgz %s", name, directory)) -! return (1); - - /* - * Remove temporary files... ---- 344,356 ---- - if (Verbosity) - puts("Building FreeBSD pkg binary distribution..."); - -! if (run_command(NULL, "/usr/sbin/pkg_create -p / -s %s -c %s -d %s -f %s %s", - current, commentname, descrname, plistname, name)) - return (1); - -! if (run_command(NULL, "mv %s.tbz %s", name, directory)) -! if (run_command(NULL, "mv %s.tgz %s", name, directory)) -! return (1); - - /* - * Remove temporary files... -*** misc/epm-3.7/configure Thu Jul 24 03:20:54 2003 ---- misc/build/epm-3.7/configure Mon Nov 20 15:01:11 2006 -*************** -*** 1238,1244 **** ---- 1238,1249 ---- - fi - fi; - -+ # Check whether --enable-fltk or --disable-fltk was given. -+ if test "${enable_fltk+set}" = set; then -+ enableval="$enable_fltk" -+ fi; - -+ - # Check whether --with-docdir or --without-docdir was given. - if test "${with_docdir+set}" = set; then - withval="$with_docdir" -*************** -*** 4904,4939 **** - fi - - -! # Extract the first word of "fltk-config", so it can be a program name with args. -! set dummy fltk-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_FLTKCONFIG+set}" = set; then -! echo $ECHO_N "(cached) $ECHO_C" >&6 -! else -! case $FLTKCONFIG in -! [\\/]* | ?:[\\/]*) -! ac_cv_path_FLTKCONFIG="$FLTKCONFIG" # 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_FLTKCONFIG="$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 -! -! ;; -! esac - fi -- FLTKCONFIG=$ac_cv_path_FLTKCONFIG - - if test -n "$FLTKCONFIG"; then - echo "$as_me:$LINENO: result: $FLTKCONFIG" >&5 ---- 4909,4946 ---- - fi - - -! if eval "test x$enable_fltk = xyes"; then -! # Extract the first word of "fltk-config", so it can be a program name with args. -! set dummy fltk-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_FLTKCONFIG+set}" = set; then -! echo $ECHO_N "(cached) $ECHO_C" >&6 -! else -! case $FLTKCONFIG in -! [\\/]* | ?:[\\/]*) -! ac_cv_path_FLTKCONFIG="$FLTKCONFIG" # 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_FLTKCONFIG="$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 -! -! ;; -! esac - fi -! FLTKCONFIG=$ac_cv_path_FLTKCONFIG - fi - - if test -n "$FLTKCONFIG"; then - echo "$as_me:$LINENO: result: $FLTKCONFIG" >&5 -*************** -*** 4950,4957 **** ---- 4957,4966 ---- - INSTALL_GUIS="" - INSTALL_OSX="" - -+ if eval "test x$enable_fltk = xyes"; then - { echo "$as_me:$LINENO: WARNING: Sorry, setup GUI requires FLTK 1.1.x." >&5 - echo "$as_me: WARNING: Sorry, setup GUI requires FLTK 1.1.x." >&2;} -+ fi - else - CXXFLAGS="`$FLTKCONFIG --cflags` ${CXXFLAGS}" - GUIS="setup uninst" -*** misc/epm-3.7/deb.c Wed Jan 15 15:29:24 2003 ---- misc/build/epm-3.7/deb.c Mon Nov 20 14:54:51 2006 -*************** -*** 26,31 **** ---- 26,53 ---- - - #include "epm.h" - -+ /* -+ * 'add_size()' - Append Installed-Size tag to DEBIAN/control file -+ */ + * Remove temporary files... +diff -urN epm-3.7-old//configure epm-3.7/configure +--- misc/epm-3.7/configure 2003-07-24 01:20:54.000000000 +0000 ++++ misc/build/epm-3.7/configure 2010-04-19 22:52:32.000000000 +0000 +@@ -1238,6 +1238,11 @@ + fi + fi; + ++# Check whether --enable-fltk or --disable-fltk was given. ++if test "${enable_fltk+set}" = set; then ++ enableval="$enable_fltk" ++fi; ++ + + # Check whether --with-docdir or --without-docdir was given. + if test "${with_docdir+set}" = set; then +@@ -4904,36 +4909,38 @@ + fi + + +-# Extract the first word of "fltk-config", so it can be a program name with args. +-set dummy fltk-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_FLTKCONFIG+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- case $FLTKCONFIG in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_FLTKCONFIG="$FLTKCONFIG" # 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_FLTKCONFIG="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 ++if eval "test x$enable_fltk = xyes"; then ++ # Extract the first word of "fltk-config", so it can be a program name with args. ++ set dummy fltk-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_FLTKCONFIG+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++ else ++ case $FLTKCONFIG in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_FLTKCONFIG="$FLTKCONFIG" # 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_FLTKCONFIG="$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 + -+ int /* O - 0 = success, 1 = fail */ -+ add_size(FILE *fpControl, /* Control file stream */ -+ const char *directory) /* Directory containing all files to package */ -+ { -+ FILE *fp; -+ char command[1024]; -+ -+ snprintf(command, sizeof(command), "du -k -s %s", directory); -+ fp = popen(command, "r"); -+ if( NULL != fp ) -+ { -+ char size[1024]; -+ fscanf(fp, "%s .", size); -+ fprintf(fpControl, "Installed-Size: %s\n", size); -+ return pclose(fp); -+ } -+ return 1; -+ } - - /* - * 'make_deb()' - Make a Debian software distribution package. -*************** -*** 61,78 **** - if (Verbosity) - puts("Creating Debian distribution..."); - - if (dist->relnumber) - { - if (platname[0]) -! snprintf(name, sizeof(name), "%s-%s-%d-%s", prodname, dist->version, dist->relnumber, - platname); - else -! snprintf(name, sizeof(name), "%s-%s-%d", prodname, dist->version, dist->relnumber); - } - else if (platname[0]) -! snprintf(name, sizeof(name), "%s-%s-%s", prodname, dist->version, platname); - else -! snprintf(name, sizeof(name), "%s-%s", prodname, dist->version); - - /* - * Write the control file for DPKG... ---- 83,111 ---- - if (Verbosity) - puts("Creating Debian distribution..."); - -+ /* -+ * Use debian default naming scheme -+ */ -+ -+ if (!strcmp(platform->machine, "intel")) -+ platname = "i386"; -+ else if (!strcmp(platform->machine, "x86_64")) -+ platname = "amd64"; -+ else if (!strcmp(platform->machine, "ppc")) -+ platname = "powerpc"; ++ ;; ++ esac + fi +-done +-done +- +- ;; +-esac ++ FLTKCONFIG=$ac_cv_path_FLTKCONFIG + fi +-FLTKCONFIG=$ac_cv_path_FLTKCONFIG + + if test -n "$FLTKCONFIG"; then + echo "$as_me:$LINENO: result: $FLTKCONFIG" >&5 +@@ -4950,8 +4957,10 @@ + INSTALL_GUIS="" + INSTALL_OSX="" + ++if eval "test x$enable_fltk = xyes"; then + { echo "$as_me:$LINENO: WARNING: Sorry, setup GUI requires FLTK 1.1.x." >&5 + echo "$as_me: WARNING: Sorry, setup GUI requires FLTK 1.1.x." >&2;} ++fi + else + CXXFLAGS="`$FLTKCONFIG --cflags` ${CXXFLAGS}" + GUIS="setup uninst" +diff -urN epm-3.7-old//deb.c epm-3.7/deb.c +--- misc/epm-3.7/deb.c 2003-01-15 14:29:24.000000000 +0000 ++++ misc/build/epm-3.7/deb.c 2010-04-19 22:53:34.000000000 +0000 +@@ -26,6 +26,28 @@ + + #include "epm.h" + ++/* ++ * 'add_size()' - Append Installed-Size tag to DEBIAN/control file ++ */ + - if (dist->relnumber) - { - if (platname[0]) -! snprintf(name, sizeof(name), "%s_%s-%d_%s", prodname, dist->version, dist->relnumber, - platname); - else -! snprintf(name, sizeof(name), "%s_%s-%d", prodname, dist->version, dist->relnumber); - } - else if (platname[0]) -! snprintf(name, sizeof(name), "%s_%s_%s", prodname, dist->version, platname); - else -! snprintf(name, sizeof(name), "%s_%s", prodname, dist->version); - - /* - * Write the control file for DPKG... -*************** -*** 108,115 **** - * (which we change in get_platform to a common name) - */ - -! if (strcmp(platform->machine, "intel") == 0) - fputs("Architecture: i386\n", fp); - else - fprintf(fp, "Architecture: %s\n", platform->machine); - ---- 141,152 ---- - * (which we change in get_platform to a common name) - */ - -! if (!strcmp(platform->machine, "intel")) - fputs("Architecture: i386\n", fp); -+ else if (!strcmp(platform->machine, "x86_64")) -+ fputs("Architecture: amd64\n", fp); -+ else if (!strcmp(platform->machine, "ppc")) -+ fputs("Architecture: powerpc\n", fp); - else - fprintf(fp, "Architecture: %s\n", platform->machine); - -*************** -*** 148,156 **** - putc('\n', fp); - } - } -! - fclose(fp); -! - /* - * Write the preinst file for DPKG... - */ ---- 185,193 ---- - putc('\n', fp); - } - } -! - fclose(fp); -! - /* - * Write the preinst file for DPKG... - */ -*************** -*** 417,422 **** ---- 454,480 ---- - } - } - -+ -+ /* -+ * Calculate and append Installed-Size to DEBIAN/control -+ */ ++int /* O - 0 = success, 1 = fail */ ++add_size(FILE *fpControl, /* Control file stream */ ++ const char *directory) /* Directory containing all files to package */ ++{ ++ FILE *fp; ++ char command[1024]; + -+ if (Verbosity) -+ puts("Calculating Installed-Size..."); ++ snprintf(command, sizeof(command), "du -k -s %s", directory); ++ fp = popen(command, "r"); ++ if( NULL != fp ) ++ { ++ char size[1024]; ++ fscanf(fp, "%s .", size); ++ fprintf(fpControl, "Installed-Size: %s\n", size); ++ return pclose(fp); ++ } ++ return 1; ++} + + /* + * 'make_deb()' - Make a Debian software distribution package. +@@ -61,18 +83,37 @@ + if (Verbosity) + puts("Creating Debian distribution..."); + ++ /* ++ * Use debian default naming scheme ++ */ ++ ++ if (!strcmp(platform->machine, "intel")) ++#ifdef __FreeBSD_kernel__ ++ platname = "kfreebsd-i386"; ++#else ++ platname = "i386"; ++#endif ++ else if (!strcmp(platform->machine, "x86_64")) ++#ifdef __FreeBSD_kernel__ ++ platname = "kfreebsd-amd64"; ++#else ++ platname = "amd64"; ++#endif ++ else if (!strcmp(platform->machine, "ppc")) ++ platname = "powerpc"; ++ + if (dist->relnumber) + { + if (platname[0]) +- snprintf(name, sizeof(name), "%s-%s-%d-%s", prodname, dist->version, dist->relnumber, ++ snprintf(name, sizeof(name), "%s_%s-%d_%s", prodname, dist->version, dist->relnumber, + platname); + else +- snprintf(name, sizeof(name), "%s-%s-%d", prodname, dist->version, dist->relnumber); ++ snprintf(name, sizeof(name), "%s_%s-%d", prodname, dist->version, dist->relnumber); + } + else if (platname[0]) +- snprintf(name, sizeof(name), "%s-%s-%s", prodname, dist->version, platname); ++ snprintf(name, sizeof(name), "%s_%s_%s", prodname, dist->version, platname); + else +- snprintf(name, sizeof(name), "%s-%s", prodname, dist->version); ++ snprintf(name, sizeof(name), "%s_%s", prodname, dist->version); + + /* + * Write the control file for DPKG... +@@ -108,8 +141,20 @@ + * (which we change in get_platform to a common name) + */ + +- if (strcmp(platform->machine, "intel") == 0) ++ if (!strcmp(platform->machine, "intel")) ++#ifdef __FreeBSD_kernel__ ++ fputs("Architecture: kfreebsd-i386\n", fp); ++#else + fputs("Architecture: i386\n", fp); ++#endif ++ else if (!strcmp(platform->machine, "x86_64")) ++#ifdef __FreeBSD_kernel__ ++ fputs("Architecture: kfreebsd-amd64\n", fp); ++#else ++ fputs("Architecture: amd64\n", fp); ++#endif ++ else if (!strcmp(platform->machine, "ppc")) ++ fputs("Architecture: powerpc\n", fp); + else + fprintf(fp, "Architecture: %s\n", platform->machine); + +@@ -148,9 +193,9 @@ + putc('\n', fp); + } + } +- ++ + fclose(fp); +- ++ + /* + * Write the preinst file for DPKG... + */ +@@ -417,6 +462,27 @@ + } + } + ++ ++ /* ++ * Calculate and append Installed-Size to DEBIAN/control ++ */ + -+ snprintf(filename, sizeof(filename), "%s/%s/DEBIAN/control", directory, name); -+ if ((fp = fopen(filename, "a")) == NULL) -+ { -+ fprintf(stderr, "epm: Unable to Installed-Size to file \"%s\" - %s\n", filename, -+ strerror(errno)); -+ return (1); -+ } -+ -+ snprintf(filename, sizeof(filename), "%s/%s", directory, name); -+ add_size(fp, filename); -+ fclose(fp); ++ if (Verbosity) ++ puts("Calculating Installed-Size..."); + ++ snprintf(filename, sizeof(filename), "%s/%s/DEBIAN/control", directory, name); ++ if ((fp = fopen(filename, "a")) == NULL) ++ { ++ fprintf(stderr, "epm: Unable to Installed-Size to file \"%s\" - %s\n", filename, ++ strerror(errno)); ++ return (1); ++ } ++ ++ snprintf(filename, sizeof(filename), "%s/%s", directory, name); ++ add_size(fp, filename); ++ fclose(fp); + - /* - * Build the distribution from the spec file... - */ -*** misc/epm-3.7/dist.c Thu Aug 7 16:14:40 2003 ---- misc/build/epm-3.7/dist.c Mon Nov 20 14:54:51 2006 -*************** -*** 394,401 **** - strcpy(platform->machine, "mips"); - #elif defined(__hpux) - strcpy(platform->machine, "hppa"); -! #elif defined(_AIX) || defined(__APPLE__) - strcpy(platform->machine, "powerpc"); - #else - for (temp = platform->machine; *temp != '\0'; temp ++) - if (*temp == '-' || *temp == '_') ---- 394,406 ---- - strcpy(platform->machine, "mips"); - #elif defined(__hpux) - strcpy(platform->machine, "hppa"); -! #elif defined(_AIX) - strcpy(platform->machine, "powerpc"); -+ #elif defined(__APPLE__) -+ if (strstr(platform->machine, "86") != NULL) -+ strcpy(platform->machine, "intel"); -+ else -+ strcpy(platform->machine, "powerpc"); - #else - for (temp = platform->machine; *temp != '\0'; temp ++) - if (*temp == '-' || *temp == '_') -*************** -*** 407,413 **** - *temp = tolower(*temp); - - if (strstr(platform->machine, "86") != NULL) -! strcpy(platform->machine, "intel"); - else if (strncmp(platform->machine, "sun", 3) == 0) - strcpy(platform->machine, "sparc"); - #endif /* __sgi */ ---- 412,423 ---- - *temp = tolower(*temp); - - if (strstr(platform->machine, "86") != NULL) -! { -! if (strstr(platform->machine, "64") != NULL) -! strcpy(platform->machine, "x86_64"); -! else -! strcpy(platform->machine, "intel"); -! } - else if (strncmp(platform->machine, "sun", 3) == 0) - strcpy(platform->machine, "sparc"); - #endif /* __sgi */ -*** misc/epm-3.7/epm.c Tue Oct 28 15:48:30 2003 ---- misc/build/epm-3.7/epm.c Mon Nov 20 14:54:51 2006 -*************** -*** 547,552 **** ---- 547,553 ---- - { - puts(EPM_VERSION); - puts("Copyright 1999-2003 by Easy Software Products."); -+ puts("Patched for OpenOffice.org"); - puts(""); - puts("EPM is free software and comes with ABSOLUTELY NO WARRANTY; for details"); - puts("see the GNU General Public License in the file COPYING or at"); -*** misc/epm-3.7/file.c Wed Jul 23 23:41:08 2003 ---- misc/build/epm-3.7/file.c Mon Nov 20 14:54:51 2006 -*************** -*** 108,114 **** - fclose(dstfile); - - chmod(dst, mode); -- chown(dst, owner, group); - - return (0); - } ---- 108,113 ---- -*************** -*** 138,144 **** - { - mkdir(buffer, 0777); - chmod(buffer, mode | 0700); -- chown(buffer, owner, group); - } - } - ---- 137,142 ---- -*************** -*** 151,157 **** - { - mkdir(buffer, 0777); - chmod(buffer, mode | 0700); -- chown(buffer, owner, group); - } - - return (0); ---- 149,154 ---- -*** misc/epm-3.7/osx.c Wed Jul 23 23:41:08 2003 ---- misc/build/epm-3.7/osx.c Mon Nov 20 14:54:51 2006 -*************** -*** 373,379 **** - else - snprintf(filename, sizeof(filename), "%s/%s", current, directory); - -! run_command(NULL, "/Developer/Applications/PackageMaker.app/" - "Contents/MacOS/PackageMaker -build " - "-p %s/%s.pkg -f %s/Package -r %s/Resources -d %s/%s-desc.plist -i %s/%s-info.plist", - filename, prodname, filename, filename, filename, prodname, filename, prodname); ---- 373,379 ---- - else - snprintf(filename, sizeof(filename), "%s/%s", current, directory); - -! run_command(NULL, "/Developer/Applications/Utilities/PackageMaker.app/" - "Contents/MacOS/PackageMaker -build " - "-p %s/%s.pkg -f %s/Package -r %s/Resources -d %s/%s-desc.plist -i %s/%s-info.plist", - filename, prodname, filename, filename, filename, prodname, filename, prodname); -*** misc/epm-3.7/pkg.c Tue Dec 17 19:57:56 2002 ---- misc/build/epm-3.7/pkg.c Mon Nov 20 14:54:51 2006 -*************** -*** 429,503 **** - - fclose(fp); - -- /* -- * Build the distribution from the prototype file... -- */ -- -- if (Verbosity) -- puts("Building PKG binary distribution..."); -- -- if (run_command(NULL, "pkgmk -o -f %s/%s.prototype -d %s/%s", -- directory, prodname, current, directory)) -- return (1); -- -- /* -- * Tar and compress the distribution... -- */ -- -- if (Verbosity) -- puts("Creating tar.gz file for distribution..."); -- -- snprintf(filename, sizeof(filename), "%s/%s.tar.gz", directory, name); -- -- if ((tarfile = tar_open(filename, 1)) == NULL) -- return (1); -- -- snprintf(filename, sizeof(filename), "%s/%s", directory, prodname); -- -- if (tar_directory(tarfile, filename, prodname)) -- { -- tar_close(tarfile); -- return (1); -- } -- -- tar_close(tarfile); -- -- /* -- * Make a package stream file... -- */ -- -- if (Verbosity) -- puts("Copying into package stream file..."); -- -- if (run_command(directory, "pkgtrans -s %s/%s %s.pkg %s", -- current, directory, name, prodname)) -- return (1); -- -- /* -- * Remove temporary files... -- */ -- -- if (!KeepFiles) -- { -- if (Verbosity) -- puts("Removing temporary distribution files..."); -- -- snprintf(filename, sizeof(filename), "%s/%s.pkginfo", directory, prodname); -- unlink(filename); -- snprintf(filename, sizeof(filename), "%s/%s.depend", directory, prodname); -- unlink(filename); -- snprintf(filename, sizeof(filename), "%s/%s.prototype", directory, prodname); -- unlink(filename); -- if (preinstall[0]) -- unlink(preinstall); -- if (postinstall[0]) -- unlink(postinstall); -- if (preremove[0]) -- unlink(preremove); -- if (postremove[0]) -- unlink(postremove); -- } -- - return (0); - } - ---- 429,434 ---- -*** misc/epm-3.7/qprintf.c Mon Jan 27 22:48:03 2003 ---- misc/build/epm-3.7/qprintf.c Mon Nov 20 14:54:51 2006 -*************** -*** 181,192 **** - - for (i = slen; i > 0; i --, s ++, bytes ++) - { - if (strchr("`~!#$%^&*()[{]}\\|;\'\"<>? ", *s)) - { - putc('\\', fp); - bytes ++; - } -! - putc(*s, fp); - } - ---- 181,199 ---- - - for (i = slen; i > 0; i --, s ++, bytes ++) - { -+ #if defined(__FreeBSD__) -+ if (strchr("`~!#%^&*()[{]}\\|;\'\"<>? ", *s)) -+ { -+ putc('\\', fp); -+ bytes ++; -+ } -+ #else - if (strchr("`~!#$%^&*()[{]}\\|;\'\"<>? ", *s)) - { - putc('\\', fp); - bytes ++; - } -! #endif - putc(*s, fp); - } - -*** misc/epm-3.7/rpm.c Wed Oct 1 21:27:15 2003 ---- misc/build/epm-3.7/rpm.c Mon Nov 20 14:54:51 2006 -*************** -*** 38,44 **** - dist_t *dist, /* I - Distribution information */ - struct utsname *platform) /* I - Platform information */ - { -! int i; /* Looping var */ - FILE *fp; /* Spec file */ - char name[1024]; /* Full product name */ - char specname[1024]; /* Spec filename */ ---- 38,44 ---- - dist_t *dist, /* I - Distribution information */ - struct utsname *platform) /* I - Platform information */ - { -! int i,n; /* Looping vars */ - FILE *fp; /* Spec file */ - char name[1024]; /* Full product name */ - char specname[1024]; /* Spec filename */ -*************** -*** 160,165 **** ---- 160,167 ---- - fprintf(fp, "Requires: %s", dname); - else if (d->type == DEPEND_PROVIDES) - fprintf(fp, "Provides: %s", dname); -+ else if (d->type == DEPEND_REPLACES) -+ fprintf(fp, "Obsoletes: %s", dname); - else - fprintf(fp, "Conflicts: %s", dname); - -*************** -*** 186,200 **** - for (i = 0; i < dist->num_descriptions; i ++) - fprintf(fp, "%s\n", dist->descriptions[i]); - -! fputs("%pre\n", fp); - for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) - if (c->type == COMMAND_PRE_INSTALL) - fprintf(fp, "%s\n", c->command); - -! fputs("%post\n", fp); - for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) - if (c->type == COMMAND_POST_INSTALL) - fprintf(fp, "%s\n", c->command); - - for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) - if (tolower(file->type) == 'i') ---- 188,220 ---- - for (i = 0; i < dist->num_descriptions; i ++) - fprintf(fp, "%s\n", dist->descriptions[i]); - -! /* -! * %pre -! */ -! n = 0; - for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) -+ { - if (c->type == COMMAND_PRE_INSTALL) -+ { -+ if (1 == ++n) /* Only write %pre if there is at least one command */ -+ fputs("%pre\n", fp); - fprintf(fp, "%s\n", c->command); -+ } -+ } - -! /* -! * %post -! */ -! n = 0; - for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) -+ { - if (c->type == COMMAND_POST_INSTALL) -+ { -+ if (1 == ++n) /* Only write %post if there is at least one command */ -+ fputs("%post\n", fp); - fprintf(fp, "%s\n", c->command); -+ } -+ } - - for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) - if (tolower(file->type) == 'i') -*************** -*** 202,207 **** ---- 222,229 ---- - - if (i) - { -+ if (1 == ++n) /* If not previously done so, write %post here */ -+ fputs("%post\n", fp); - fputs("if test \"x$1\" = x1; then\n", fp); - fputs(" echo Setting up init scripts...\n", fp); - -*************** -*** 259,265 **** - fputs("fi\n", fp); - } - -! fputs("%preun\n", fp); - for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) - if (tolower(file->type) == 'i') - break; ---- 281,290 ---- - fputs("fi\n", fp); - } - -! /* -! * %preun -! */ -! n = 0; - for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) - if (tolower(file->type) == 'i') - break; -*************** -*** 266,271 **** ---- 291,297 ---- - - if (i) - { -+ fputs("%preun\n", fp); ++n; /* Need to write %preun here */ - fputs("if test \"x$1\" = x0; then\n", fp); - fputs(" echo Cleaning up init scripts...\n", fp); - -*************** -*** 315,327 **** - } - - for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) - if (c->type == COMMAND_PRE_REMOVE) - fprintf(fp, "%s\n", c->command); - -! fputs("%postun\n", fp); - for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) - if (c->type == COMMAND_POST_REMOVE) - fprintf(fp, "%s\n", c->command); - - fputs("%files\n", fp); - for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) ---- 341,369 ---- - } - - for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) -+ { - if (c->type == COMMAND_PRE_REMOVE) -+ { -+ if (1 == ++n) /* Only write %preun if not previously done so */ -+ fputs("%preun\n", fp); -+ - fprintf(fp, "%s\n", c->command); -+ } -+ } - -! /* -! * %post -! */ -! n = 0; - for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) -+ { - if (c->type == COMMAND_POST_REMOVE) -+ { -+ if (1 == ++n) /* Only write %post if there is at least one command */ -+ fputs("%postun\n", fp); - fprintf(fp, "%s\n", c->command); -+ } -+ } - - fputs("%files\n", fp); - for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) -*************** -*** 415,467 **** - } - } - -- /* -- * Build the distribution from the spec file... -- */ -- -- if (Verbosity) -- puts("Building RPM binary distribution..."); -- -- if (strcmp(platform->machine, "intel") == 0) -- { -- if (run_command(NULL, EPM_RPMBUILD " %s -bb " EPM_RPMARCH "i386 %s", -- Verbosity == 0 ? "--quiet" : "", specname)) -- return (1); -- } -- else if (run_command(NULL, EPM_RPMBUILD " %s -bb " EPM_RPMARCH "%s %s", -- Verbosity == 0 ? "--quiet" : "", platform->machine, -- specname)) -- return (1); -- -- /* -- * Move the RPM to the local directory and rename the RPM using the -- * product name specified by the user... -- */ -- -- if (strcmp(platform->machine, "intel") == 0) -- run_command(NULL, "/bin/mv %s/RPMS/i386/%s-%s-%d.i386.rpm %s/%s.rpm", -- rpmdir, prodname, dist->version, dist->relnumber, -- directory, name); -- else -- run_command(NULL, "/bin/mv %s/RPMS/%s/%s-%s-%d.%s.rpm %s/%s.rpm", -- rpmdir, platform->machine, prodname, dist->version, -- dist->relnumber, platform->machine, directory, name); -- -- /* -- * Remove temporary files... -- */ -- -- if (!KeepFiles) -- { -- if (Verbosity) -- puts("Removing temporary distribution files..."); -- -- run_command(NULL, "/bin/rm -rf %s/RPMS", directory); -- run_command(NULL, "/bin/rm -rf %s/buildroot", directory); -- -- unlink(specname); -- } -- - return (0); - } - ---- 457,462 ---- ++ + /* + * Build the distribution from the spec file... + */ +diff -urN epm-3.7-old//dist.c epm-3.7/dist.c +--- misc/epm-3.7/dist.c 2003-08-07 14:14:40.000000000 +0000 ++++ misc/build/epm-3.7/dist.c 2010-04-19 22:52:32.000000000 +0000 +@@ -394,8 +394,13 @@ + strcpy(platform->machine, "mips"); + #elif defined(__hpux) + strcpy(platform->machine, "hppa"); +-#elif defined(_AIX) || defined(__APPLE__) ++#elif defined(_AIX) + strcpy(platform->machine, "powerpc"); ++#elif defined(__APPLE__) ++ if (strstr(platform->machine, "86") != NULL) ++ strcpy(platform->machine, "intel"); ++ else ++ strcpy(platform->machine, "powerpc"); + #else + for (temp = platform->machine; *temp != '\0'; temp ++) + if (*temp == '-' || *temp == '_') +@@ -407,7 +412,12 @@ + *temp = tolower(*temp); + + if (strstr(platform->machine, "86") != NULL) +- strcpy(platform->machine, "intel"); ++ { ++ if (strstr(platform->machine, "64") != NULL) ++ strcpy(platform->machine, "x86_64"); ++ else ++ strcpy(platform->machine, "intel"); ++ } + else if (strncmp(platform->machine, "sun", 3) == 0) + strcpy(platform->machine, "sparc"); + #endif /* __sgi */ +diff -urN epm-3.7-old//epm.c epm-3.7/epm.c +--- misc/epm-3.7/epm.c 2003-10-28 14:48:30.000000000 +0000 ++++ misc/build/epm-3.7/epm.c 2010-04-19 22:52:32.000000000 +0000 +@@ -547,6 +547,7 @@ + { + puts(EPM_VERSION); + puts("Copyright 1999-2003 by Easy Software Products."); ++ puts("Patched for OpenOffice.org"); + puts(""); + puts("EPM is free software and comes with ABSOLUTELY NO WARRANTY; for details"); + puts("see the GNU General Public License in the file COPYING or at"); +diff -urN epm-3.7-old//file.c epm-3.7/file.c +--- misc/epm-3.7/file.c 2003-07-23 21:41:08.000000000 +0000 ++++ misc/build/epm-3.7/file.c 2010-04-19 22:52:32.000000000 +0000 +@@ -108,7 +108,6 @@ + fclose(dstfile); + + chmod(dst, mode); +- chown(dst, owner, group); + + return (0); + } +@@ -138,7 +137,6 @@ + { + mkdir(buffer, 0777); + chmod(buffer, mode | 0700); +- chown(buffer, owner, group); + } + } + +@@ -151,7 +149,6 @@ + { + mkdir(buffer, 0777); + chmod(buffer, mode | 0700); +- chown(buffer, owner, group); + } + + return (0); +diff -urN epm-3.7-old//osx.c epm-3.7/osx.c +--- misc/epm-3.7/osx.c 2003-07-23 21:41:08.000000000 +0000 ++++ misc/build/epm-3.7/osx.c 2010-04-19 22:52:32.000000000 +0000 +@@ -373,7 +373,7 @@ + else + snprintf(filename, sizeof(filename), "%s/%s", current, directory); + +- run_command(NULL, "/Developer/Applications/PackageMaker.app/" ++ run_command(NULL, "/Developer/Applications/Utilities/PackageMaker.app/" + "Contents/MacOS/PackageMaker -build " + "-p %s/%s.pkg -f %s/Package -r %s/Resources -d %s/%s-desc.plist -i %s/%s-info.plist", + filename, prodname, filename, filename, filename, prodname, filename, prodname); +diff -urN epm-3.7-old//pkg.c epm-3.7/pkg.c +--- misc/epm-3.7/pkg.c 2002-12-17 18:57:56.000000000 +0000 ++++ misc/build/epm-3.7/pkg.c 2010-04-19 22:52:32.000000000 +0000 +@@ -429,75 +429,6 @@ + + fclose(fp); + +- /* +- * Build the distribution from the prototype file... +- */ +- +- if (Verbosity) +- puts("Building PKG binary distribution..."); +- +- if (run_command(NULL, "pkgmk -o -f %s/%s.prototype -d %s/%s", +- directory, prodname, current, directory)) +- return (1); +- +- /* +- * Tar and compress the distribution... +- */ +- +- if (Verbosity) +- puts("Creating tar.gz file for distribution..."); +- +- snprintf(filename, sizeof(filename), "%s/%s.tar.gz", directory, name); +- +- if ((tarfile = tar_open(filename, 1)) == NULL) +- return (1); +- +- snprintf(filename, sizeof(filename), "%s/%s", directory, prodname); +- +- if (tar_directory(tarfile, filename, prodname)) +- { +- tar_close(tarfile); +- return (1); +- } +- +- tar_close(tarfile); +- +- /* +- * Make a package stream file... +- */ +- +- if (Verbosity) +- puts("Copying into package stream file..."); +- +- if (run_command(directory, "pkgtrans -s %s/%s %s.pkg %s", +- current, directory, name, prodname)) +- return (1); +- +- /* +- * Remove temporary files... +- */ +- +- if (!KeepFiles) +- { +- if (Verbosity) +- puts("Removing temporary distribution files..."); +- +- snprintf(filename, sizeof(filename), "%s/%s.pkginfo", directory, prodname); +- unlink(filename); +- snprintf(filename, sizeof(filename), "%s/%s.depend", directory, prodname); +- unlink(filename); +- snprintf(filename, sizeof(filename), "%s/%s.prototype", directory, prodname); +- unlink(filename); +- if (preinstall[0]) +- unlink(preinstall); +- if (postinstall[0]) +- unlink(postinstall); +- if (preremove[0]) +- unlink(preremove); +- if (postremove[0]) +- unlink(postremove); +- } +- + return (0); + } + +diff -urN epm-3.7-old//qprintf.c epm-3.7/qprintf.c +--- misc/epm-3.7-old/qprintf.c 2003-01-27 21:48:03.000000000 +0000 ++++ misc/build/epm-3.7/qprintf.c 2010-04-19 22:52:32.000000000 +0000 +@@ -181,12 +181,19 @@ + + for (i = slen; i > 0; i --, s ++, bytes ++) + { ++#if defined(__FreeBSD__) ++ if (strchr("`~!#%^&*()[{]}\\|;\'\"<>? ", *s)) ++ { ++ putc('\\', fp); ++ bytes ++; ++ } ++#else + if (strchr("`~!#$%^&*()[{]}\\|;\'\"<>? ", *s)) + { + putc('\\', fp); + bytes ++; + } +- ++#endif + putc(*s, fp); + } + +diff -urN epm-3.7-old//rpm.c epm-3.7/rpm.c +--- misc/epm-3.7/rpm.c 2003-10-01 19:27:15.000000000 +0000 ++++ misc/build/epm-3.7/rpm.c 2010-04-19 22:52:32.000000000 +0000 +@@ -38,7 +38,7 @@ + dist_t *dist, /* I - Distribution information */ + struct utsname *platform) /* I - Platform information */ + { +- int i; /* Looping var */ ++ int i,n; /* Looping vars */ + FILE *fp; /* Spec file */ + char name[1024]; /* Full product name */ + char specname[1024]; /* Spec filename */ +@@ -160,6 +160,8 @@ + fprintf(fp, "Requires: %s", dname); + else if (d->type == DEPEND_PROVIDES) + fprintf(fp, "Provides: %s", dname); ++ else if (d->type == DEPEND_REPLACES) ++ fprintf(fp, "Obsoletes: %s", dname); + else + fprintf(fp, "Conflicts: %s", dname); + +@@ -186,15 +188,33 @@ + for (i = 0; i < dist->num_descriptions; i ++) + fprintf(fp, "%s\n", dist->descriptions[i]); + +- fputs("%pre\n", fp); ++ /* ++ * %pre ++ */ ++ n = 0; + for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) ++ { + if (c->type == COMMAND_PRE_INSTALL) ++ { ++ if (1 == ++n) /* Only write %pre if there is at least one command */ ++ fputs("%pre\n", fp); + fprintf(fp, "%s\n", c->command); ++ } ++ } + +- fputs("%post\n", fp); ++ /* ++ * %post ++ */ ++ n = 0; + for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) ++ { + if (c->type == COMMAND_POST_INSTALL) ++ { ++ if (1 == ++n) /* Only write %post if there is at least one command */ ++ fputs("%post\n", fp); + fprintf(fp, "%s\n", c->command); ++ } ++ } + + for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) + if (tolower(file->type) == 'i') +@@ -202,6 +222,8 @@ + + if (i) + { ++ if (1 == ++n) /* If not previously done so, write %post here */ ++ fputs("%post\n", fp); + fputs("if test \"x$1\" = x1; then\n", fp); + fputs(" echo Setting up init scripts...\n", fp); + +@@ -259,13 +281,17 @@ + fputs("fi\n", fp); + } + +- fputs("%preun\n", fp); ++ /* ++ * %preun ++ */ ++ n = 0; + for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) + if (tolower(file->type) == 'i') + break; + + if (i) + { ++ fputs("%preun\n", fp); ++n; /* Need to write %preun here */ + fputs("if test \"x$1\" = x0; then\n", fp); + fputs(" echo Cleaning up init scripts...\n", fp); + +@@ -315,13 +341,29 @@ + } + + for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) ++ { + if (c->type == COMMAND_PRE_REMOVE) ++ { ++ if (1 == ++n) /* Only write %preun if not previously done so */ ++ fputs("%preun\n", fp); ++ + fprintf(fp, "%s\n", c->command); ++ } ++ } + +- fputs("%postun\n", fp); ++ /* ++ * %post ++ */ ++ n = 0; + for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) ++ { + if (c->type == COMMAND_POST_REMOVE) ++ { ++ if (1 == ++n) /* Only write %post if there is at least one command */ ++ fputs("%postun\n", fp); + fprintf(fp, "%s\n", c->command); ++ } ++ } + + fputs("%files\n", fp); + for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) +@@ -415,53 +457,6 @@ + } + } + +- /* +- * Build the distribution from the spec file... +- */ +- +- if (Verbosity) +- puts("Building RPM binary distribution..."); +- +- if (strcmp(platform->machine, "intel") == 0) +- { +- if (run_command(NULL, EPM_RPMBUILD " %s -bb " EPM_RPMARCH "i386 %s", +- Verbosity == 0 ? "--quiet" : "", specname)) +- return (1); +- } +- else if (run_command(NULL, EPM_RPMBUILD " %s -bb " EPM_RPMARCH "%s %s", +- Verbosity == 0 ? "--quiet" : "", platform->machine, +- specname)) +- return (1); +- +- /* +- * Move the RPM to the local directory and rename the RPM using the +- * product name specified by the user... +- */ +- +- if (strcmp(platform->machine, "intel") == 0) +- run_command(NULL, "/bin/mv %s/RPMS/i386/%s-%s-%d.i386.rpm %s/%s.rpm", +- rpmdir, prodname, dist->version, dist->relnumber, +- directory, name); +- else +- run_command(NULL, "/bin/mv %s/RPMS/%s/%s-%s-%d.%s.rpm %s/%s.rpm", +- rpmdir, platform->machine, prodname, dist->version, +- dist->relnumber, platform->machine, directory, name); +- +- /* +- * Remove temporary files... +- */ +- +- if (!KeepFiles) +- { +- if (Verbosity) +- puts("Removing temporary distribution files..."); +- +- run_command(NULL, "/bin/rm -rf %s/RPMS", directory); +- run_command(NULL, "/bin/rm -rf %s/buildroot", directory); +- +- unlink(specname); +- } +- + return (0); + } + -- cgit v1.2.3 From d1972d2902e9b1223c6f8458bfd6b5ba32d79aab Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Tue, 20 Apr 2010 03:21:10 +0200 Subject: kfreebsdport01: change identifier from linux_* to kfreebsd_* --- desktop/source/deployment/misc/dp_platform.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx index bb93f78689b6..7f32a267b02a 100644 --- a/desktop/source/deployment/misc/dp_platform.cxx +++ b/desktop/source/deployment/misc/dp_platform.cxx @@ -39,6 +39,8 @@ #define PLATFORM_WIN_X86 "windows_x86" #define PLATFORM_LINUX_X86 "linux_x86" #define PLATFORM_LINUX_X86_64 "linux_x86_64" +#define PLATFORM_KFREEBSD_X86 "kfreebsd_x86" +#define PLATFORM_KFREEBSD_X86_64 "kfreebsd_x86_64" #define PLATFORM_LINUX_SPARC "linux_sparc" #define PLATFORM_LINUX_POWERPC "linux_powerpc" #define PLATFORM_LINUX_POWERPC64 "linux_powerpc64" @@ -126,6 +128,10 @@ namespace ret = checkOSandCPU(OUSTR("Linux"), OUSTR("x86")); else if (token.equals(OUSTR(PLATFORM_LINUX_X86_64))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("X86_64")); + else if (token.equals(OUSTR(PLATFORM_KFREEBSD_X86))) + ret = checkOSandCPU(OUSTR("kFreeBSD"), OUSTR("x86")); + else if (token.equals(OUSTR(PLATFORM_KFREEBSD_X86_64))) + ret = checkOSandCPU(OUSTR("kFreeBSD"), OUSTR("X86_64")); else if (token.equals(OUSTR(PLATFORM_LINUX_SPARC))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("SPARC")); else if (token.equals(OUSTR(PLATFORM_LINUX_POWERPC))) -- cgit v1.2.3 From 22e6570cba66c2f6105e902917485c792089e98c Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Tue, 20 Apr 2010 03:21:10 +0200 Subject: kfreebsdport01: change identifier from linux_* to kfreebsd_* --- sal/rtl/source/macro.hxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sal/rtl/source/macro.hxx b/sal/rtl/source/macro.hxx index a48918668f83..11a6e7c89963 100644 --- a/sal/rtl/source/macro.hxx +++ b/sal/rtl/source/macro.hxx @@ -39,7 +39,11 @@ #elif defined SOLARIS #define THIS_OS "Solaris" #elif defined LINUX +#ifdef __FreeBSD_kernel__ +#define THIS_OS "kFreeBSD" +#else #define THIS_OS "Linux" +#endif #elif defined MACOSX #define THIS_OS "MacOSX" #elif defined NETBSD -- cgit v1.2.3 From dce8fe3766891c22b2a228bdd71f949e7006ab0d Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 21 Apr 2010 15:19:04 +0200 Subject: hb33patches1: #i111038# applied patch and verified --- sw/source/filter/ww8/ww8par.cxx | 11 +++++++++-- sw/source/filter/ww8/ww8par.hxx | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index e03816d7776c..f33c66a4ce4b 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1681,6 +1681,13 @@ void SwWW8ImplReader::Read_HdFtText(long nStart, long nLen, SwFrmFmt* pHdFtFmt) *pPaM->GetPoint() = aTmpPos; } + +bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const +{ + //each CP of Plcfhdd MUST be less than FibRgLw97.ccpHdd + return (nHeaderCP < pWwFib->ccpHdr) ? true : false; +} + bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect) { @@ -1700,7 +1707,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, else { pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), start, nLen); - bOk = ( 2 <= nLen ); + bOk = ( 2 <= nLen ) && isValid_HdFt_CP(start); } if (bOk) @@ -1752,7 +1759,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect, else { pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), start, nLen); - bOk = ( 2 <= nLen ); + bOk = ( 2 <= nLen ) && isValid_HdFt_CP(start); } bool bUseLeft diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 68d77972c7ef..df8a9bd8c5d4 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1112,6 +1112,8 @@ private: void Read_HdFtTextAsHackedFrame(long nStart, long nLen, SwFrmFmt &rHdFtFmt, sal_uInt16 nPageWidth); + bool isValid_HdFt_CP(WW8_CP nHeaderCP) const; + bool HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect); void HandleLineNumbering(const wwSection &rSection); -- cgit v1.2.3 From 005df3ca336ad05fe872745f797c4cdd39e61db7 Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Mon, 26 Apr 2010 11:51:35 +0200 Subject: tl74#108360#readonly document should be made readable --- testautomation/graphics/required/includes/global/id_006.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 testautomation/graphics/required/includes/global/id_006.inc diff --git a/testautomation/graphics/required/includes/global/id_006.inc b/testautomation/graphics/required/includes/global/id_006.inc old mode 100644 new mode 100755 index a2a435735268..8e16f5ef5593 --- a/testautomation/graphics/required/includes/global/id_006.inc +++ b/testautomation/graphics/required/includes/global/id_006.inc @@ -187,7 +187,7 @@ testcase tiToolsThesaurus endif Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) - + Call sMakeReadOnlyDocumentEditable() Call hTextrahmenErstellen (sWord,20,20,50,30) sleep 1 -- cgit v1.2.3 From 37f107ae85b6a289085ae821ae109ff7d10e44fb Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Mon, 26 Apr 2010 12:09:03 +0200 Subject: tl74#108360#readonly document should be made readable --- testautomation/graphics/optional/includes/global/g_tools.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 testautomation/graphics/optional/includes/global/g_tools.inc diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc old mode 100644 new mode 100755 index b77b57629839..2d802af5b40c --- a/testautomation/graphics/optional/includes/global/g_tools.inc +++ b/testautomation/graphics/optional/includes/global/g_tools.inc @@ -114,7 +114,7 @@ testcase tiToolsThesaurus endif Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) - + Call sMakeReadOnlyDocumentEditable() Call hTextrahmenErstellen (sWord,20,20,50,30) sleep 1 -- cgit v1.2.3 From 4fdd19781fa500032b520e042129da35899ed715 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 28 Apr 2010 18:45:33 +0800 Subject: findbar01: enhancements for findbar --- sd/source/ui/unoidl/DrawController.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index acd57f18d85c..e0d5712e33f1 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -29,6 +29,7 @@ #include "precompiled_sd.hxx" #include "DrawController.hxx" +#include "DrawDocShell.hxx" #include "DrawSubController.hxx" #include "sdpage.hxx" @@ -54,6 +55,7 @@ #include #include #include +#include using namespace ::std; using ::rtl::OUString; @@ -164,6 +166,16 @@ void SAL_CALL DrawController::dispose (void) { mbDisposing = true; + boost::shared_ptr pViewShell = mpBase->GetMainViewShell(); + if ( pViewShell ) + { + pViewShell->DeactivateCurrentFunction(); + DrawDocShell* pDocShell = pViewShell->GetDocSh(); + if ( pDocShell != NULL ) + pDocShell->SetDocShellFunction(0); + } + pViewShell.reset(); + // When the controller has not been detached from its view // shell, i.e. mpViewShell is not NULL, then tell PaneManager // and ViewShellManager to clear the shell stack. -- cgit v1.2.3 From 8a429819aab795e131bb2567f08cc0c2d1784624 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 28 Apr 2010 18:45:33 +0800 Subject: findbar01: enhancements for findbar --- svx/inc/tbunosearchcontrollers.hxx | 284 +++++++ svx/source/tbxctrls/makefile.mk | 3 +- svx/source/tbxctrls/tbunosearchcontrollers.cxx | 1018 ++++++++++++++++++++++++ svx/source/unodraw/unoctabl.cxx | 35 + 4 files changed, 1339 insertions(+), 1 deletion(-) create mode 100644 svx/inc/tbunosearchcontrollers.hxx create mode 100644 svx/source/tbxctrls/tbunosearchcontrollers.cxx diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx new file mode 100644 index 000000000000..3b52852c61fd --- /dev/null +++ b/svx/inc/tbunosearchcontrollers.hxx @@ -0,0 +1,284 @@ +/************************************************************************* + * + * 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 __TBUNOSEARCHCONTROLLERS_HXX_ +#define __TBUNOSEARCHCONTROLLERS_HXX_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +namespace css = ::com::sun::star ; +namespace svx +{ + +class FindTextFieldControl; + +struct ExecuteInfo +{ + css::uno::Reference< css::frame::XDispatch > xDispatch; + css::util::URL aTargetURL; + css::uno::Sequence< css::beans::PropertyValue > aArgs; +}; + +class SearchToolbarControllersManager +{ +public: + + SearchToolbarControllersManager(); + ~SearchToolbarControllersManager(); + + static SearchToolbarControllersManager* createControllersManager(); + + void registryController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL ); + void freeController ( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL ); + css::uno::Reference< css::frame::XStatusListener > findController( const css::uno::Reference< css::frame::XFrame >& xFrame, const ::rtl::OUString& sCommandURL ); + +private: + + static SearchToolbarControllersManager* m_pInstance; + + typedef ::comphelper::SequenceAsVector< css::beans::PropertyValue > SearchToolbarControllersVec; + typedef ::std::map< css::uno::Reference< css::frame::XFrame >, SearchToolbarControllersVec > SearchToolbarControllersMap; + SearchToolbarControllersMap aSearchToolbarControllersMap; + +}; + +class FindTextToolbarController : public svt::ToolboxController, + public css::lang::XServiceInfo +{ +public: + + FindTextToolbarController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager ); + ~FindTextToolbarController(); + + // XInterface + virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + + static ::rtl::OUString getImplementationName_Static() throw() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.FindTextToolboxController" )); + } + + static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + + // XComponent + virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); + + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ); + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException); + virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw ( css::uno::RuntimeException ); + + // XStatusListener + virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException ); + + sal_Int32 getFontSizePixel( const Window* pWindow ); + + DECL_STATIC_LINK( FindTextToolbarController, ExecuteHdl_Impl, ExecuteInfo* ); + DECL_LINK(EditModifyHdl, void*); + +private: + + css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; + FindTextFieldControl* m_pFindTextFieldControl; + + USHORT m_nDownSearchId; // item position of findbar + USHORT m_nUpSearchId; // item position of findbar + +}; + +class DownSearchToolboxController : public svt::ToolboxController, + public css::lang::XServiceInfo +{ +public: + + DownSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager ); + ~DownSearchToolboxController(); + + // XInterface + virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + + static ::rtl::OUString getImplementationName_Static() throw() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.DownSearchToolboxController" )); + } + + static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + + // XComponent + virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); + + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ); + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException); + + // XStatusListener + virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ); + + DECL_STATIC_LINK( DownSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo* ); + +private : + + css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; + +}; + +class UpSearchToolboxController : public svt::ToolboxController, + public css::lang::XServiceInfo +{ +public: + + UpSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager ); + ~UpSearchToolboxController(); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + + static ::rtl::OUString getImplementationName_Static() throw() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.UpSearchToolboxController" )); + } + + static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + + // XComponent + virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); + + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException); + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException ); + + // XStatusListener + virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ); + + DECL_STATIC_LINK( UpSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo* ); + +private : + + css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; + +}; + +// protocol handler for "vnd.sun.star.findbar:*" URLs +// The dispatch object will be used for shortcut commands for findbar +class FindbarDispatcher : public css::lang::XServiceInfo, + public css::lang::XInitialization, + public css::frame::XDispatchProvider, + public css::frame::XDispatch, + public ::cppu::OWeakObject +{ +public: + + FindbarDispatcher( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ); + virtual ~FindbarDispatcher(); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + + static ::rtl::OUString getImplementationName_Static() throw() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.Impl.FindbarDispatcher" )); + } + + static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ); + + // XDispatchProvider + virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL& aURL, const ::rtl::OUString& sTargetFrameName , sal_Int32 nSearchFlags ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptions ) throw( css::uno::RuntimeException ); + + // XDispatch + virtual void SAL_CALL dispatch( const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException ); + virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener, const css::util::URL& aURL ) throw( css::uno::RuntimeException ); + virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener, const css::util::URL& aURL ) throw( css::uno::RuntimeException ); + +private: + + css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory; + css::uno::Reference< css::frame::XFrame > m_xFrame; + +}; + +// createInstance +css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); + +} + +#endif // __TBUNOSEARCHCONTROLLERS_HXX_ diff --git a/svx/source/tbxctrls/makefile.mk b/svx/source/tbxctrls/makefile.mk index 47da008e87a3..d7b264d30fc0 100644 --- a/svx/source/tbxctrls/makefile.mk +++ b/svx/source/tbxctrls/makefile.mk @@ -62,7 +62,8 @@ LIB2OBJFILES= \ $(SLO)$/verttexttbxctrl.obj \ $(SLO)$/subtoolboxcontrol.obj \ $(SLO)$/tbxcolor.obj \ - $(SLO)$/tbunocontroller.obj + $(SLO)$/tbunocontroller.obj \ + $(SLO)$/tbunosearchcontrollers.obj SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx new file mode 100644 index 000000000000..8dcf2ceed0f0 --- /dev/null +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -0,0 +1,1018 @@ +/************************************************************************* + * + * 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_svx.hxx" + +#include "tbunosearchcontrollers.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace svx +{ + +static const ::rtl::OUString SEARCHITEM_SEARCHSTRING = ::rtl::OUString::createFromAscii("SearchItem.SearchString"); +static const ::rtl::OUString SEARCHITEM_SEARCHBACKWARD = ::rtl::OUString::createFromAscii("SearchItem.Backward"); + +static const ::rtl::OUString COMMAND_FINDTEXT = ::rtl::OUString::createFromAscii(".uno:FindText") ; +static const ::rtl::OUString COMMAND_DOWNSEARCH = ::rtl::OUString::createFromAscii(".uno:DownSearch"); +static const ::rtl::OUString COMMAND_UPSEARCH = ::rtl::OUString::createFromAscii(".uno:UpSearch") ; + +static const ::rtl::OUString COMMAND_APPENDSEARCHHISTORY = ::rtl::OUString::createFromAscii("AppendSearchHistory") ; + +class FindTextFieldControl : public ComboBox +{ +public: + FindTextFieldControl( Window* pParent, WinBits nStyle, + css::uno::Reference< css::frame::XFrame >& xFrame, + css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); + virtual ~FindTextFieldControl(); + + virtual void Modify(); + virtual long PreNotify( NotifyEvent& rNEvt ); + + void InitControls_Impl(); + void Remember_Impl(const String& rStr); + +private: + + css::uno::Reference< css::frame::XFrame > m_xFrame; + css::uno::Reference < css::util::XURLTransformer > m_xURLTransformer; + css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager; + + sal_Bool m_bToClearTextField; + +}; + +FindTextFieldControl::FindTextFieldControl( Window* pParent, WinBits nStyle, + css::uno::Reference< css::frame::XFrame >& xFrame, + css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager) : + ComboBox( pParent, nStyle ), + m_xFrame(xFrame), + m_xServiceManager(xServiceManager), + m_bToClearTextField(sal_True) +{ + m_xURLTransformer = css::uno::Reference< css::util::XURLTransformer >( m_xServiceManager->createInstance( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), + css::uno::UNO_QUERY_THROW ); + + InitControls_Impl(); +} + +FindTextFieldControl::~FindTextFieldControl() +{ +} + +void FindTextFieldControl::InitControls_Impl() +{ + SetText( String( ::rtl::OUString::createFromAscii("Find") ) ); + SetControlForeground(COL_GRAY); + + EnableAutocomplete(TRUE, TRUE); +} + +void FindTextFieldControl::Remember_Impl(const String& rStr) +{ + USHORT nCount = GetEntryCount(); + for (USHORT i=0; iGetKeyCode().GetCode(); + sal_Bool bCtrl = pKeyEvent->GetKeyCode().IsMod1(); + if (bCtrl && KEY_G== nCode) + GrabFocusToDocument(); + + if (KEY_RETURN == nCode) + { + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + + Remember_Impl(GetText()); + + css::uno::Reference< css::frame::XDispatch > xDispatch; + css::util::URL aTargetURL; + + if ( m_xURLTransformer.is() ) + { + aTargetURL.Complete = ::rtl::OUString::createFromAscii(".uno:ExecuteSearch"); + m_xURLTransformer->parseStrict( aTargetURL ); + + css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( m_xFrame, css::uno::UNO_QUERY); + if ( xDispatchProvider.is() ) + xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 ); + } + + if ( xDispatch.is() && aTargetURL.Complete.getLength() > 0 ) + { + ::rtl::OUString sFindText = GetText(); + css::uno::Sequence< css::beans::PropertyValue > aArgs( 2 ); + aArgs[0].Name = SEARCHITEM_SEARCHSTRING; + aArgs[0].Value <<= sFindText; + aArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; + aArgs[1].Value <<= sal_False; + + // Execute dispatch asynchronously + ExecuteInfo* pExecuteInfo = new ExecuteInfo; + pExecuteInfo->xDispatch = xDispatch; + pExecuteInfo->aTargetURL = aTargetURL; + pExecuteInfo->aArgs = aArgs; + Application::PostUserEvent( STATIC_LINK(0, DownSearchToolboxController , ExecuteHdl_Impl), pExecuteInfo ); + } + } + break; + } + + case EVENT_GETFOCUS: + if ( m_bToClearTextField ) + { + SetText( String() ); + m_bToClearTextField = sal_False; + } + break; + + case EVENT_LOSEFOCUS: + if ( GetText().Len() == 0 ) + { + SetText( String( ::rtl::OUString::createFromAscii("Find") ) ); + SetControlForeground(COL_GRAY); + + m_bToClearTextField = sal_True; + } + break; + } + + return nRet; +} + + +//----------------------------------------------------------------------------------------------------------- +// SearchToolbarControllersManager + +SearchToolbarControllersManager* SearchToolbarControllersManager::m_pInstance = 0; + +SearchToolbarControllersManager::SearchToolbarControllersManager() +{ +} + +SearchToolbarControllersManager::~SearchToolbarControllersManager() +{ +} + +SearchToolbarControllersManager* SearchToolbarControllersManager::createControllersManager() +{ + if (!m_pInstance) + m_pInstance = new SearchToolbarControllersManager(); + + return m_pInstance; +} + +void SearchToolbarControllersManager::registryController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL ) +{ + SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame); + if (pIt == aSearchToolbarControllersMap.end()) + { + SearchToolbarControllersVec lControllers(1); + lControllers[0].Name = sCommandURL; + lControllers[0].Value <<= xStatusListener; + aSearchToolbarControllersMap.insert(SearchToolbarControllersMap::value_type(xFrame, lControllers)); + } + else + { + sal_Int32 nSize = pIt->second.size(); + for (sal_Int32 i=0; isecond[i].Name.equals(sCommandURL)) + return; + } + + pIt->second.resize(nSize+1); + pIt->second[nSize].Name = sCommandURL; + pIt->second[nSize].Value <<= xStatusListener; + } + +} + +void SearchToolbarControllersManager::freeController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL ) +{ + SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame); + if (pIt != aSearchToolbarControllersMap.end()) + { + for (SearchToolbarControllersVec::iterator pItCtrl=pIt->second.begin(); pItCtrl!=pIt->second.end(); ++pItCtrl) + { + if (pItCtrl->Name.equals(sCommandURL)) + { + pIt->second.erase(pItCtrl); + break; + } + } + + if (pIt->second.empty()) + aSearchToolbarControllersMap.erase(pIt); + } +} + +css::uno::Reference< css::frame::XStatusListener > SearchToolbarControllersManager::findController( const css::uno::Reference< css::frame::XFrame >& xFrame, const ::rtl::OUString& sCommandURL ) +{ + css::uno::Reference< css::frame::XStatusListener > xStatusListener; + + SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame); + if (pIt != aSearchToolbarControllersMap.end()) + { + for (SearchToolbarControllersVec::iterator pItCtrl =pIt->second.begin(); pItCtrl != pIt->second.end(); ++pItCtrl) + { + if (pItCtrl->Name.equals(sCommandURL)) + { + pItCtrl->Value >>= xStatusListener; + break; + } + } + } + + return xStatusListener; +} + +//----------------------------------------------------------------------------------------------------------- +// FindTextToolbarController + +FindTextToolbarController::FindTextToolbarController( const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager ) + :svt::ToolboxController( rServiceManager, + css::uno::Reference< css::frame::XFrame >(), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FindText" )) ) +{ + m_xURLTransformer = css::uno::Reference< css::util::XURLTransformer >( m_xServiceManager->createInstance( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), + css::uno::UNO_QUERY_THROW ); +} + +FindTextToolbarController::~FindTextToolbarController() +{ +} + +// XInterface +css::uno::Any SAL_CALL FindTextToolbarController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ) +{ + css::uno::Any a = ToolboxController::queryInterface( aType ); + if ( a.hasValue() ) + return a; + + return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) ); +} + +void SAL_CALL FindTextToolbarController::acquire() throw () +{ + ToolboxController::acquire(); +} + +void SAL_CALL FindTextToolbarController::release() throw () +{ + ToolboxController::release(); +} + +// XServiceInfo +::rtl::OUString SAL_CALL FindTextToolbarController::getImplementationName() throw( css::uno::RuntimeException ) +{ + return getImplementationName_Static(); +} + +sal_Bool SAL_CALL FindTextToolbarController::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ) +{ + const css::uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() ); + const ::rtl::OUString * pArray = aSNL.getConstArray(); + + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) + if( pArray[i] == ServiceName ) + return true; + + return false; +} + +css::uno::Sequence< ::rtl::OUString > SAL_CALL FindTextToolbarController::getSupportedServiceNames() throw( css::uno::RuntimeException ) +{ + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< ::rtl::OUString > FindTextToolbarController::getSupportedServiceNames_Static() throw() +{ + css::uno::Sequence< ::rtl::OUString > aSNS( 1 ); + aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ) ); + return aSNS; +} + +// XComponent +void SAL_CALL FindTextToolbarController::dispose() throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + + SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); + + svt::ToolboxController::dispose(); + delete m_pFindTextFieldControl; + m_pFindTextFieldControl = 0; +} + +// XInitialization +void SAL_CALL FindTextToolbarController::initialize( const css::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException) +{ + svt::ToolboxController::initialize(aArguments); + + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) + { + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; iGetItemCommand(i); + if ( sItemCommand.equals( COMMAND_DOWNSEARCH ) ) + m_nDownSearchId = i; + else if (sItemCommand.equals( COMMAND_UPSEARCH )) + m_nUpSearchId = i; + } + } + + SearchToolbarControllersManager::createControllersManager()->registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); +} + +// XToolbarController +void SAL_CALL FindTextToolbarController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException ) +{ +} + +css::uno::Reference< css::awt::XWindow > SAL_CALL FindTextToolbarController::createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw ( css::uno::RuntimeException ) +{ + css::uno::Reference< css::awt::XWindow > xItemWindow; + + css::uno::Reference< css::awt::XWindow > xParent( Parent ); + Window* pParent = VCLUnoHelper::GetWindow( xParent ); + if ( pParent ) + { + ToolBox* pToolbar = ( ToolBox* )pParent; + m_pFindTextFieldControl = new FindTextFieldControl( pToolbar, WinBits( WB_DROPDOWN | WB_VSCROLL), m_xFrame, m_xServiceManager ); + + // Calculate height of the edit field according to the application font height + sal_Int32 nHeight = getFontSizePixel( m_pFindTextFieldControl ); + nHeight += 200; + m_pFindTextFieldControl->SetSizePixel( Size( 100, nHeight )); + + m_pFindTextFieldControl->SetModifyHdl(LINK(this, FindTextToolbarController, EditModifyHdl)); + + } + xItemWindow = VCLUnoHelper::GetInterface( m_pFindTextFieldControl ); + + return xItemWindow; +} + +// XStatusListener +void SAL_CALL FindTextToolbarController::statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + if ( m_bDisposed ) + return; + + ::rtl::OUString aFeatureURL = rEvent.FeatureURL.Complete; + if (aFeatureURL.equalsAscii("AppendSearchHistory")) + { + m_pFindTextFieldControl->Remember_Impl(m_pFindTextFieldControl->GetText()); + } +} + +sal_Int32 FindTextToolbarController::getFontSizePixel( const Window* pWindow ) +{ + const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); + const Font& rFont = rSettings.GetAppFont(); + + // Calculate height of the application font used by window + sal_Int32 nHeight = sal_Int32( rFont.GetHeight() ); + ::Size aPixelSize = pWindow->LogicToPixel( ::Size( 0, nHeight ), MAP_APPFONT ); + return aPixelSize.Height(); +} + +IMPL_STATIC_LINK_NOINSTANCE( FindTextToolbarController, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) +{ + const sal_uInt32 nRef = Application::ReleaseSolarMutex(); + try + { + // Asynchronous execution as this can lead to our own destruction! + // Framework can recycle our current frame and the layout manager disposes all user interface + // elements if a component gets detached from its frame! + pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs ); + } + catch ( css::uno::Exception& ) + { + + } + + Application::AcquireSolarMutex( nRef ); + delete pExecuteInfo; + + return 0; +} + +IMPL_LINK( FindTextToolbarController, EditModifyHdl, void *, EMPTYARG ) +{ + // enable or disable item DownSearch/UpSearch of findbar + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox && m_pFindTextFieldControl ) + { + if (m_pFindTextFieldControl->GetText().Len()>0) + { + if ( !pToolBox->IsItemEnabled(m_nDownSearchId) ) + pToolBox->EnableItem(m_nDownSearchId, sal_True); + if ( !pToolBox->IsItemEnabled(m_nUpSearchId) ) + pToolBox->EnableItem(m_nUpSearchId, sal_True); + } + else + { + if ( pToolBox->IsItemEnabled(m_nDownSearchId) ) + pToolBox->EnableItem(m_nDownSearchId, sal_False); + if ( pToolBox->IsItemEnabled(m_nUpSearchId) ) + pToolBox->EnableItem(m_nUpSearchId, sal_False); + } + } + + return 0; +} + +//----------------------------------------------------------------------------------------------------------- +// class DownSearchToolboxController + +DownSearchToolboxController::DownSearchToolboxController(const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager ) + : svt::ToolboxController( rServiceManager, + css::uno::Reference< css::frame::XFrame >(), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DownSearch" )) ) +{ + m_xURLTransformer = css::uno::Reference< css::util::XURLTransformer >( m_xServiceManager->createInstance( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), + css::uno::UNO_QUERY_THROW ); +} + +DownSearchToolboxController::~DownSearchToolboxController() +{ +} + +// XInterface +css::uno::Any SAL_CALL DownSearchToolboxController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ) +{ + css::uno::Any a = ToolboxController::queryInterface( aType ); + if ( a.hasValue() ) + return a; + + return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) ); +} + +void SAL_CALL DownSearchToolboxController::acquire() throw () +{ + ToolboxController::acquire(); +} + +void SAL_CALL DownSearchToolboxController::release() throw () +{ + ToolboxController::release(); +} + +// XServiceInfo +::rtl::OUString SAL_CALL DownSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException ) +{ + return getImplementationName_Static(); +} + +sal_Bool SAL_CALL DownSearchToolboxController::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ) +{ + const css::uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() ); + const ::rtl::OUString * pArray = aSNL.getConstArray(); + + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) + if( pArray[i] == ServiceName ) + return true; + + return false; +} + +css::uno::Sequence< ::rtl::OUString > SAL_CALL DownSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException ) +{ + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< ::rtl::OUString > DownSearchToolboxController::getSupportedServiceNames_Static() throw() +{ + css::uno::Sequence< ::rtl::OUString > aSNS( 1 ); + aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" )); + return aSNS; +} + +// XComponent +void SAL_CALL DownSearchToolboxController::dispose() throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + + SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); + + svt::ToolboxController::dispose(); +} + +// XInitialization +void SAL_CALL DownSearchToolboxController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ) +{ + svt::ToolboxController::initialize( aArguments ); + SearchToolbarControllersManager::createControllersManager()->registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); +} + +// XToolbarController +void SAL_CALL DownSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException) +{ + if ( m_bDisposed ) + throw css::lang::DisposedException(); + + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + + css::uno::Reference< css::frame::XDispatch > xDispatch; + css::util::URL aTargetURL; + + if ( m_xURLTransformer.is() ) + { + aTargetURL.Complete = ::rtl::OUString::createFromAscii(".uno:ExecuteSearch"); + m_xURLTransformer->parseStrict( aTargetURL ); + + css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( m_xFrame, css::uno::UNO_QUERY); + if ( xDispatchProvider.is() ) + xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 ); + } + + if ( xDispatch.is() && aTargetURL.Complete.getLength() > 0 ) + { + ::rtl::OUString sFindText; + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) + { + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; iGetItemCommand(i); + if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) + { + Window* pItemWin = pToolBox->GetItemWindow(i); + if (pItemWin) + sFindText = pItemWin->GetText(); + break; + } + } + } + + css::uno::Sequence< css::beans::PropertyValue > aArgs( 2 ); + aArgs[0].Name = SEARCHITEM_SEARCHSTRING; + aArgs[0].Value <<= sFindText; + aArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; + aArgs[1].Value <<= sal_False; + + // Execute dispatch asynchronously + ExecuteInfo* pExecuteInfo = new ExecuteInfo; + pExecuteInfo->xDispatch = xDispatch; + pExecuteInfo->aTargetURL = aTargetURL; + pExecuteInfo->aArgs = aArgs; + Application::PostUserEvent( STATIC_LINK(0, DownSearchToolboxController , ExecuteHdl_Impl), pExecuteInfo ); + + css::frame::FeatureStateEvent aEvent; + css::util::URL aCommand; + aCommand.Complete = COMMAND_APPENDSEARCHHISTORY; + aEvent.FeatureURL = aCommand; + aEvent.IsEnabled = sal_True; + + css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT); + xStatusListener->statusChanged( aEvent ); + } +} + +// XStatusListener +void SAL_CALL DownSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException ) +{ +} + +IMPL_STATIC_LINK_NOINSTANCE( DownSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) +{ + const sal_uInt32 nRef = Application::ReleaseSolarMutex(); + try + { + // Asynchronous execution as this can lead to our own destruction! + // Framework can recycle our current frame and the layout manager disposes all user interface + // elements if a component gets detached from its frame! + pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs ); + } + catch ( css::uno::Exception& ) + { + } + + Application::AcquireSolarMutex( nRef ); + delete pExecuteInfo; + + return 0; +} + +//----------------------------------------------------------------------------------------------------------- +// class UpSearchToolboxController + +UpSearchToolboxController::UpSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager ) + :svt::ToolboxController( rServiceManager, + css::uno::Reference< css::frame::XFrame >(), + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:UpSearch" )) ) +{ + m_xURLTransformer = css::uno::Reference< css::util::XURLTransformer >( m_xServiceManager->createInstance( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), + css::uno::UNO_QUERY_THROW ); +} + +UpSearchToolboxController::~UpSearchToolboxController() +{ +} + +// XInterface +css::uno::Any SAL_CALL UpSearchToolboxController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ) +{ + css::uno::Any a = ToolboxController::queryInterface( aType ); + if ( a.hasValue() ) + return a; + + return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) ); +} + +void SAL_CALL UpSearchToolboxController::acquire() throw () +{ + ToolboxController::acquire(); +} + +void SAL_CALL UpSearchToolboxController::release() throw () +{ + ToolboxController::release(); +} + +// XServiceInfo +::rtl::OUString SAL_CALL UpSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException ) +{ + return getImplementationName_Static(); +} + +sal_Bool SAL_CALL UpSearchToolboxController::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ) +{ + const css::uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() ); + const ::rtl::OUString * pArray = aSNL.getConstArray(); + + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) + if( pArray[i] == ServiceName ) + return true; + + return false; +} + +css::uno::Sequence< ::rtl::OUString > SAL_CALL UpSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException ) +{ + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< ::rtl::OUString > UpSearchToolboxController::getSupportedServiceNames_Static() throw() +{ + css::uno::Sequence< ::rtl::OUString > aSNS( 1 ); + aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ) ); + return aSNS; +} + +// XComponent +void SAL_CALL UpSearchToolboxController::dispose() throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + + SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); + + svt::ToolboxController::dispose(); +} + +// XInitialization +void SAL_CALL UpSearchToolboxController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ) +{ + svt::ToolboxController::initialize( aArguments ); + SearchToolbarControllersManager::createControllersManager()->registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); +} + +// XToolbarController +void SAL_CALL UpSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException ) +{ + if ( m_bDisposed ) + throw css::lang::DisposedException(); + + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + + css::uno::Reference< css::frame::XDispatch > xDispatch; + css::util::URL aTargetURL; + + if ( m_xURLTransformer.is() ) + { + aTargetURL.Complete = ::rtl::OUString::createFromAscii(".uno:ExecuteSearch"); + m_xURLTransformer->parseStrict( aTargetURL ); + + css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( m_xFrame, css::uno::UNO_QUERY); + if ( xDispatchProvider.is() ) + xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 ); + } + + if ( xDispatch.is() && aTargetURL.Complete.getLength() > 0 ) + { + ::rtl::OUString sFindText; + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) + { + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; iGetItemCommand(i); + if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) + { + Window* pItemWin = pToolBox->GetItemWindow(i); + if (pItemWin) + sFindText = pItemWin->GetText(); + break; + } + } + } + + css::uno::Sequence< css::beans::PropertyValue > aArgs( 2 ); + aArgs[0].Name = SEARCHITEM_SEARCHSTRING; + aArgs[0].Value <<= sFindText; + aArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; + aArgs[1].Value <<= sal_True; + + // Execute dispatch asynchronously + ExecuteInfo* pExecuteInfo = new ExecuteInfo; + pExecuteInfo->xDispatch = xDispatch; + pExecuteInfo->aTargetURL = aTargetURL; + pExecuteInfo->aArgs = aArgs; + Application::PostUserEvent( STATIC_LINK(0, UpSearchToolboxController , ExecuteHdl_Impl), pExecuteInfo ); + + css::frame::FeatureStateEvent aEvent; + css::util::URL aCommand; + aCommand.Complete = COMMAND_APPENDSEARCHHISTORY; + aEvent.FeatureURL = aCommand; + aEvent.IsEnabled = sal_True; + + css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT); + xStatusListener->statusChanged( aEvent ); + } +} + +// XStatusListener +void SAL_CALL UpSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException ) +{ +} + +IMPL_STATIC_LINK_NOINSTANCE( UpSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) +{ + const sal_uInt32 nRef = Application::ReleaseSolarMutex(); + try + { + // Asynchronous execution as this can lead to our own destruction! + // Framework can recycle our current frame and the layout manager disposes all user interface + // elements if a component gets detached from its frame! + pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs ); + } + catch ( css::uno::Exception& ) + { + } + + Application::AcquireSolarMutex( nRef ); + delete pExecuteInfo; + + return 0; +} + +//----------------------------------------------------------------------------------------------------------- +// class FindbarDispatcher + +FindbarDispatcher::FindbarDispatcher(const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory) + : m_xFactory( xFactory ) +{ +} + +FindbarDispatcher::~FindbarDispatcher() +{ + m_xFactory = NULL; + m_xFrame = NULL; +} + +// XInterface +css::uno::Any SAL_CALL FindbarDispatcher::queryInterface( const css::uno::Type& aType ) throw( css::uno::RuntimeException ) +{ + css::uno::Any aReturn( ::cppu::queryInterface( aType, + static_cast< css::lang::XServiceInfo* >(this), + static_cast< css::lang::XInitialization* >(this), + static_cast< css::frame::XDispatchProvider* >(this), + static_cast< css::frame::XDispatch* >(this)) ); + + if ( aReturn.hasValue() ) + return aReturn; + + return OWeakObject::queryInterface( aType ); +} + +void SAL_CALL FindbarDispatcher::acquire() throw() +{ + OWeakObject::acquire(); +} + +void SAL_CALL FindbarDispatcher::release() throw() +{ + OWeakObject::release(); +} + +// XServiceInfo +::rtl::OUString SAL_CALL FindbarDispatcher::getImplementationName() throw( css::uno::RuntimeException ) +{ + return getImplementationName_Static(); +} + +sal_Bool SAL_CALL FindbarDispatcher::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ) +{ + return ( + ServiceName.equalsAscii("com.sun.star.comp.svx.FindbarDispatcher") || + ServiceName.equalsAscii("com.sun.star.frame.ProtocolHandler") + ); +} + +css::uno::Sequence< ::rtl::OUString > SAL_CALL FindbarDispatcher::getSupportedServiceNames() throw( css::uno::RuntimeException ) +{ + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< ::rtl::OUString > FindbarDispatcher::getSupportedServiceNames_Static() throw() +{ + css::uno::Sequence< ::rtl::OUString > aSNS( 2 ); + aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FindbarDispatcher" )); + aSNS.getArray()[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ProtocolHandler" )); + return aSNS; +} + +// XInitialization +void SAL_CALL FindbarDispatcher::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ) +{ + if ( aArguments.getLength() ) + { + aArguments[0] >>= m_xFrame; + } +} + +// XDispatchProvider +css::uno::Reference< css::frame::XDispatch > SAL_CALL FindbarDispatcher::queryDispatch( const css::util::URL& aURL, const ::rtl::OUString& /*sTargetFrameName*/, sal_Int32 /*nSearchFlags*/ ) throw( css::uno::RuntimeException ) +{ + css::uno::Reference< css::frame::XDispatch > xDispatch; + + if ( aURL.Protocol.equalsAscii("vnd.sun.star.findbar:") ) + xDispatch = this; + + return xDispatch; +} + +css::uno::Sequence < css::uno::Reference< css::frame::XDispatch > > SAL_CALL FindbarDispatcher::queryDispatches( const css::uno::Sequence < css::frame::DispatchDescriptor >& seqDescripts ) throw( css::uno::RuntimeException ) +{ + sal_Int32 nCount = seqDescripts.getLength(); + css::uno::Sequence < css::uno::Reference < XDispatch > > lDispatcher( nCount ); + + for( sal_Int32 i=0; i& /*lArgs*/ ) throw( css::uno::RuntimeException ) +{ + //vnd.sun.star.findbar:FocusToFindbar - set cursor to the FindTextFieldControl of the findbar + if ( aURL.Path.equalsAscii("FocusToFindbar") ) + { + css::uno::Reference< css::beans::XPropertySet > xPropSet(m_xFrame, css::uno::UNO_QUERY); + if(!xPropSet.is()) + return; + + css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; + css::uno::Any aValue = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii("LayoutManager") ); + aValue >>= xLayoutManager; + if (!xLayoutManager.is()) + return; + + const ::rtl::OUString sResourceURL = ::rtl::OUString::createFromAscii("private:resource/toolbar/findbar"); + css::uno::Reference< css::ui::XUIElement > xUIElement = xLayoutManager->getElement(sResourceURL); + if (!xUIElement.is()) + return; + + css::uno::Reference< css::awt::XWindow > xWindow(xUIElement->getRealInterface(), css::uno::UNO_QUERY); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) + { + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; iGetItemCommand(i); + if ( sItemCommand.equalsAscii(".uno:FindText") ) + { + Window* pItemWin = pToolBox->GetItemWindow( i ); + if ( pItemWin ) + { + pItemWin->GrabFocus(); + return; + } + } + } + } + + } +} + +void SAL_CALL FindbarDispatcher::addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& /*xControl*/, const css::util::URL& /*aURL*/ ) throw ( css::uno::RuntimeException ) +{ +} + +void SAL_CALL FindbarDispatcher::removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& /*xControl*/, const css::util::URL& /*aURL*/ ) throw ( css::uno::RuntimeException ) +{ +} + +//----------------------------------------------------------------------------------------------------------- +// create Instance + +css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) +{ + return *new FindTextToolbarController( rSMgr ); +} + +css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) +{ + return *new DownSearchToolboxController( rSMgr ); +} + +css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) +{ + return *new UpSearchToolboxController( rSMgr ); +} + +css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) +{ + return *new FindbarDispatcher( rSMgr ); +} + +//----------------------------------------------------------------------------------------------------------- +} diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 5dd4814c6ab5..8ebc27406676 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -39,6 +39,7 @@ #include "recoveryui.hxx" #include "xmlgrhlp.hxx" #include "tbunocontroller.hxx" +#include "tbunosearchcontrollers.hxx" using namespace ::com::sun::star; using namespace ::rtl; @@ -283,6 +284,12 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( writeInfo( pKey, svx::GraphicExporter_getImplementationName(), svx::GraphicExporter_getSupportedServiceNames() ); #endif writeInfo( pKey, svx::FontHeightToolBoxControl::getImplementationName_Static(), svx::FontHeightToolBoxControl::getSupportedServiceNames_Static() ); + + writeInfo( pKey, svx::FindTextToolbarController::getImplementationName_Static(), svx::FindTextToolbarController::getSupportedServiceNames_Static() ); + writeInfo( pKey, svx::DownSearchToolboxController::getImplementationName_Static(), svx::DownSearchToolboxController::getSupportedServiceNames_Static() ); + writeInfo( pKey, svx::UpSearchToolboxController::getImplementationName_Static(), svx::UpSearchToolboxController::getSupportedServiceNames_Static() ); + writeInfo( pKey, svx::FindbarDispatcher::getImplementationName_Static(), svx::FindbarDispatcher::getSupportedServiceNames_Static() ); + writeInfo( pKey, ::unogallery::GalleryThemeProvider_getImplementationName(),::unogallery::GalleryThemeProvider_getSupportedServiceNames() ); // XPrimitiveFactory2D @@ -354,6 +361,34 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( svx::FontHeightToolBoxControl_createInstance, svx::FontHeightToolBoxControl::getSupportedServiceNames_Static() ); } + else if ( svx::FindTextToolbarController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::FindTextToolbarController::getImplementationName_Static(), + svx::FindTextToolbarController_createInstance, + svx::FindTextToolbarController::getSupportedServiceNames_Static() ); + } + else if ( svx::DownSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::DownSearchToolboxController::getImplementationName_Static(), + svx::DownSearchToolboxController_createInstance, + svx::DownSearchToolboxController::getSupportedServiceNames_Static() ); + } + else if ( svx::UpSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::UpSearchToolboxController::getImplementationName_Static(), + svx::UpSearchToolboxController_createInstance, + svx::UpSearchToolboxController::getSupportedServiceNames_Static() ); + } + else if ( svx::FindbarDispatcher::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::FindbarDispatcher::getImplementationName_Static(), + svx::FindbarDispatcher_createInstance, + svx::FindbarDispatcher::getSupportedServiceNames_Static() ); + } else if( ::unogallery::GalleryThemeProvider_getImplementationName().equalsAscii( pImplName ) ) { xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), -- cgit v1.2.3 From 806700f86b2b9c96d4ca076545c5f263a8c1b9c3 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 28 Apr 2010 18:45:33 +0800 Subject: findbar01: enhancements for findbar --- svl/source/items/srchitem.cxx | 72 +++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index b7422c56224b..cc033bc6905e 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -151,40 +151,44 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) : rFlags |= TransliterationModules_IGNORE_CASE; if ( aOpt.IsMatchFullHalfWidthForms()) rFlags |= TransliterationModules_IGNORE_WIDTH; - if ( aOpt.IsMatchHiraganaKatakana()) - rFlags |= TransliterationModules_IGNORE_KANA; - if ( aOpt.IsMatchContractions()) - rFlags |= TransliterationModules_ignoreSize_ja_JP; - if ( aOpt.IsMatchMinusDashChoon()) - rFlags |= TransliterationModules_ignoreMinusSign_ja_JP; - if ( aOpt.IsMatchRepeatCharMarks()) - rFlags |= TransliterationModules_ignoreIterationMark_ja_JP; - if ( aOpt.IsMatchVariantFormKanji()) - rFlags |= TransliterationModules_ignoreTraditionalKanji_ja_JP; - if ( aOpt.IsMatchOldKanaForms()) - rFlags |= TransliterationModules_ignoreTraditionalKana_ja_JP; - if ( aOpt.IsMatchDiziDuzu()) - rFlags |= TransliterationModules_ignoreZiZu_ja_JP; - if ( aOpt.IsMatchBavaHafa()) - rFlags |= TransliterationModules_ignoreBaFa_ja_JP; - if ( aOpt.IsMatchTsithichiDhizi()) - rFlags |= TransliterationModules_ignoreTiJi_ja_JP; - if ( aOpt.IsMatchHyuiyuByuvyu()) - rFlags |= TransliterationModules_ignoreHyuByu_ja_JP; - if ( aOpt.IsMatchSesheZeje()) - rFlags |= TransliterationModules_ignoreSeZe_ja_JP; - if ( aOpt.IsMatchIaiya()) - rFlags |= TransliterationModules_ignoreIandEfollowedByYa_ja_JP; - if ( aOpt.IsMatchKiku()) - rFlags |= TransliterationModules_ignoreKiKuFollowedBySa_ja_JP; - if ( aOpt.IsIgnorePunctuation()) - rFlags |= TransliterationModules_ignoreSeparator_ja_JP; - if ( aOpt.IsIgnoreWhitespace()) - rFlags |= TransliterationModules_ignoreSpace_ja_JP; - if ( aOpt.IsIgnoreProlongedSoundMark()) - rFlags |= TransliterationModules_ignoreProlongedSoundMark_ja_JP; - if ( aOpt.IsIgnoreMiddleDot()) - rFlags |= TransliterationModules_ignoreMiddleDot_ja_JP; + if ( bAsianOptions ) + { + if ( aOpt.IsMatchHiraganaKatakana()) + rFlags |= TransliterationModules_IGNORE_KANA; + if ( aOpt.IsMatchContractions()) + rFlags |= TransliterationModules_ignoreSize_ja_JP; + if ( aOpt.IsMatchMinusDashChoon()) + rFlags |= TransliterationModules_ignoreMinusSign_ja_JP; + if ( aOpt.IsMatchRepeatCharMarks()) + rFlags |= TransliterationModules_ignoreIterationMark_ja_JP; + if ( aOpt.IsMatchVariantFormKanji()) + rFlags |= TransliterationModules_ignoreTraditionalKanji_ja_JP; + if ( aOpt.IsMatchOldKanaForms()) + rFlags |= TransliterationModules_ignoreTraditionalKana_ja_JP; + if ( aOpt.IsMatchDiziDuzu()) + rFlags |= TransliterationModules_ignoreZiZu_ja_JP; + if ( aOpt.IsMatchBavaHafa()) + rFlags |= TransliterationModules_ignoreBaFa_ja_JP; + if ( aOpt.IsMatchTsithichiDhizi()) + rFlags |= TransliterationModules_ignoreTiJi_ja_JP; + if ( aOpt.IsMatchHyuiyuByuvyu()) + rFlags |= TransliterationModules_ignoreHyuByu_ja_JP; + if ( aOpt.IsMatchSesheZeje()) + rFlags |= TransliterationModules_ignoreSeZe_ja_JP; + if ( aOpt.IsMatchIaiya()) + rFlags |= TransliterationModules_ignoreIandEfollowedByYa_ja_JP; + if ( aOpt.IsMatchKiku()) + rFlags |= TransliterationModules_ignoreKiKuFollowedBySa_ja_JP; + if ( aOpt.IsIgnorePunctuation()) + rFlags |= TransliterationModules_ignoreSeparator_ja_JP; + if ( aOpt.IsIgnoreWhitespace()) + rFlags |= TransliterationModules_ignoreSpace_ja_JP; + if ( aOpt.IsIgnoreProlongedSoundMark()) + rFlags |= TransliterationModules_ignoreProlongedSoundMark_ja_JP; + if ( aOpt.IsIgnoreMiddleDot()) + rFlags |= TransliterationModules_ignoreMiddleDot_ja_JP; + } + } // ----------------------------------------------------------------------- -- cgit v1.2.3 From 8f3e68257b1a81aca009384ffc8b5d15f572da2f Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 28 Apr 2010 18:47:48 +0800 Subject: findbar01: enhancements for findbar --- sd/uiconfig/sdraw/toolbar/findbar.xml | 8 ++++++++ sd/uiconfig/simpress/toolbar/findbar.xml | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 sd/uiconfig/sdraw/toolbar/findbar.xml create mode 100644 sd/uiconfig/simpress/toolbar/findbar.xml diff --git a/sd/uiconfig/sdraw/toolbar/findbar.xml b/sd/uiconfig/sdraw/toolbar/findbar.xml new file mode 100644 index 000000000000..a19743198c7d --- /dev/null +++ b/sd/uiconfig/sdraw/toolbar/findbar.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sd/uiconfig/simpress/toolbar/findbar.xml b/sd/uiconfig/simpress/toolbar/findbar.xml new file mode 100644 index 000000000000..a19743198c7d --- /dev/null +++ b/sd/uiconfig/simpress/toolbar/findbar.xml @@ -0,0 +1,8 @@ + + + + + + + + -- cgit v1.2.3 From 187db58dbb25b6ad7f6fbe236e52dc3a641464b3 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 28 Apr 2010 18:47:48 +0800 Subject: findbar01: enhancements for findbar --- sc/uiconfig/scalc/toolbar/findbar.xml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sc/uiconfig/scalc/toolbar/findbar.xml diff --git a/sc/uiconfig/scalc/toolbar/findbar.xml b/sc/uiconfig/scalc/toolbar/findbar.xml new file mode 100644 index 000000000000..a19743198c7d --- /dev/null +++ b/sc/uiconfig/scalc/toolbar/findbar.xml @@ -0,0 +1,8 @@ + + + + + + + + -- cgit v1.2.3 From 9ab1a3643a9aaaa59ae9251cf4637340c6823abf Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 28 Apr 2010 18:47:48 +0800 Subject: findbar01: enhancements for findbar --- sw/uiconfig/swriter/toolbar/findbar.xml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sw/uiconfig/swriter/toolbar/findbar.xml diff --git a/sw/uiconfig/swriter/toolbar/findbar.xml b/sw/uiconfig/swriter/toolbar/findbar.xml new file mode 100644 index 000000000000..a19743198c7d --- /dev/null +++ b/sw/uiconfig/swriter/toolbar/findbar.xml @@ -0,0 +1,8 @@ + + + + + + + + -- cgit v1.2.3 From 5da4175a84666da1663331714374a872cf39117a Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 28 Apr 2010 18:50:45 +0800 Subject: findbar01: enhancements for findbar --- .../data/org/openoffice/Office/Accelerators.xcu | 4 +++ .../data/org/openoffice/Office/ProtocolHandler.xcu | 5 ++++ .../org/openoffice/Office/UI/CalcWindowState.xcu | 20 +++++++++++++ .../data/org/openoffice/Office/UI/Controller.xcu | 33 ++++++++++++++++++++++ .../org/openoffice/Office/UI/DrawWindowState.xcu | 20 +++++++++++++ .../org/openoffice/Office/UI/GenericCommands.xcu | 24 ++++++++++++++++ .../openoffice/Office/UI/ImpressWindowState.xcu | 20 +++++++++++++ .../org/openoffice/Office/UI/WriterWindowState.xcu | 20 +++++++++++++ 8 files changed, 146 insertions(+) diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index 243079c3abf1..a79f0df22940 100755 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -577,6 +577,7 @@ I10N SHORTCUTS - NO TRANSLATE .uno:RepeatSearch + vnd.sun.star.findbar:FocusToFindbar .uno:Bold @@ -1097,6 +1098,7 @@ I10N SHORTCUTS - NO TRANSLATE + vnd.sun.star.findbar:FocusToFindbar .uno:Save .uno:Bold @@ -2061,6 +2063,7 @@ I10N SHORTCUTS - NO TRANSLATE + vnd.sun.star.findbar:FocusToFindbar .uno:Save .uno:Bold @@ -4451,6 +4454,7 @@ I10N SHORTCUTS - NO TRANSLATE .uno:RepeatSearch + vnd.sun.star.findbar:FocusToFindbar .uno:Bold diff --git a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu index 8ef8fcd259e0..0d5dd5e3b499 100644 --- a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu +++ b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu @@ -63,5 +63,10 @@ vnd.sun.star.popup:* + + + vnd.sun.star.findbar:* + + diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu index c5d32679b108..4a770576cd78 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu @@ -293,6 +293,26 @@ true + + + 1,0 + + + true + + + 0 + + + Find Toolbar + + + true + + + false + + 0,1 diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu index 553d94fc2fdb..fc23961b661b 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -218,6 +218,39 @@ com.sun.star.svx.FontHeightToolBoxController + + + .uno:FindText + + + + + + com.sun.star.svx.FindTextToolboxController + + + + + .uno:DownSearch + + + + + + com.sun.star.svx.DownSearchToolboxController + + + + + .uno:UpSearch + + + + + + com.sun.star.svx.UpSearchToolboxController + + .uno:ChartElementSelector diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu index 5373bf31b1fc..2a932d1dbfd6 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu @@ -106,6 +106,26 @@ true + + + 1,0 + + + true + + + 0 + + + Find Toolbar + + + true + + + false + + 0,1 diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 4f38244540c2..fe8127dd1a79 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -1459,6 +1459,30 @@ 1 + + + Find Text + + + 1 + + + + + Find Next + + + 1 + + + + + Find Previous + + + 1 + + What's ~This? diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu index 079855def699..b8c192e8de7a 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu @@ -594,6 +594,26 @@ true + + + 1,0 + + + true + + + 0 + + + Find Toolbar + + + true + + + false + + false diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu index 60417cae30fa..9ca2f5de6316 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu @@ -52,6 +52,26 @@ true + + + 1,0 + + + true + + + 0 + + + Find Toolbar + + + true + + + false + + 0,1 -- cgit v1.2.3 From 2407dade8651567edfec46b562ca6fedc412329d Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 28 Apr 2010 19:16:28 +0800 Subject: findbar01: enhancements for findbar --- default_images/res/commandimagelist/lc_downsearch.png | Bin 0 -> 4270 bytes default_images/res/commandimagelist/lc_upsearch.png | Bin 0 -> 4288 bytes default_images/res/commandimagelist/sc_downsearch.png | Bin 0 -> 3927 bytes default_images/res/commandimagelist/sc_upsearch.png | Bin 0 -> 583 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 default_images/res/commandimagelist/lc_downsearch.png create mode 100644 default_images/res/commandimagelist/lc_upsearch.png create mode 100644 default_images/res/commandimagelist/sc_downsearch.png create mode 100644 default_images/res/commandimagelist/sc_upsearch.png diff --git a/default_images/res/commandimagelist/lc_downsearch.png b/default_images/res/commandimagelist/lc_downsearch.png new file mode 100644 index 000000000000..e93b54c3fcc6 Binary files /dev/null and b/default_images/res/commandimagelist/lc_downsearch.png differ diff --git a/default_images/res/commandimagelist/lc_upsearch.png b/default_images/res/commandimagelist/lc_upsearch.png new file mode 100644 index 000000000000..8a0cbce6ffb7 Binary files /dev/null and b/default_images/res/commandimagelist/lc_upsearch.png differ diff --git a/default_images/res/commandimagelist/sc_downsearch.png b/default_images/res/commandimagelist/sc_downsearch.png new file mode 100644 index 000000000000..095242d902de Binary files /dev/null and b/default_images/res/commandimagelist/sc_downsearch.png differ diff --git a/default_images/res/commandimagelist/sc_upsearch.png b/default_images/res/commandimagelist/sc_upsearch.png new file mode 100644 index 000000000000..9921bb8409d4 Binary files /dev/null and b/default_images/res/commandimagelist/sc_upsearch.png differ -- cgit v1.2.3 From b1caadf8d9f10884f59f18ec1dc42b4fd99236c4 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 28 Apr 2010 22:21:12 -0400 Subject: koheiextref01: #i110595# Trim columns below the last non-empty row, to prevent Calc from adding the trailing empty cells. --- sc/source/ui/docshell/externalrefmgr.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 8ce3c621c09d..a095c8d036fa 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -574,6 +574,15 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData( } } #else + vector aRows; + pTab->getAllRows(aRows, nDataRow1, nDataRow2); + if (aRows.empty()) + // Cache is empty. + return TokenArrayRef(); + else + // Trim the column below the last non-empty row. + nDataRow2 = aRows.back(); + // Empty all matrix elements first, and fill only non-empty elements. for (SCROW nRow = nDataRow1; nRow <= nDataRow2; ++nRow) { -- cgit v1.2.3 From c22ef304c317170d3a224908cd4e7d7f967f9168 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 4 May 2010 12:15:53 +0200 Subject: #i110750# - remove unused method - thx cmc --- sw/source/core/inc/frame.hxx | 4 ---- sw/source/core/layout/layact.cxx | 18 ------------------ 2 files changed, 22 deletions(-) diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 552555e925f9..e1560a230d7a 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -250,10 +250,6 @@ class SwFrm: public SwClient friend SwFrm *SaveCntnt( SwLayoutFrm *, SwFrm* pStart = NULL ); friend void RestoreCntnt( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow ); - //Checkt ob sich beim MakePos die Pos des Frm aendert oder nicht - //layact.cxx - friend BOOL CheckPos( SwFrm *pFrm ); - #if OSL_DEBUG_LEVEL > 1 //entfernt leere SwSectionFrms aus einer Kette friend SwFrm* SwClearDummies( SwFrm* pFrm ); diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 14bc23bb97a4..7156faa17738 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1661,24 +1661,6 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly ) return bChanged || bTabChanged; } -// 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; -} - // OD 31.10.2002 #104100# // Implement vertical layout support BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect ) -- cgit v1.2.3 From 7aa662cde0ffa955fa68b72ba28052e33b6aa362 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 4 May 2010 15:01:14 +0200 Subject: #i101131# method - adjust conversion due to type mismatch --- sw/source/core/unocore/unosett.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 980306be3aec..ab486b71ed04 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1659,9 +1659,14 @@ uno::Sequence SwXNumberingRules::GetNumberingRuleByIndex( aPropertyValues.Insert(pData, aPropertyValues.Count()); } Size aSize = rFmt.GetGraphicSize(); - aSize.Width() = TWIP_TO_MM100( aSize.Width() ); - aSize.Height() = TWIP_TO_MM100( aSize.Height() ); - pData = new PropValData((void*)&aSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0)); + // --> OD 2010-05-04 #i101131# - applying patch from CMC + // adjust conversion due to type mismatch between and +// aSize.Width() = TWIP_TO_MM100( aSize.Width() ); +// aSize.Height() = TWIP_TO_MM100( aSize.Height() ); +// pData = new PropValData((void*)&aSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0)); + awt::Size aAwtSize(TWIP_TO_MM100(aSize.Width()), TWIP_TO_MM100(aSize.Height())); + pData = new PropValData((void*)&aAwtSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0)); + // <-- aPropertyValues.Insert(pData, aPropertyValues.Count()); const SwFmtVertOrient* pOrient = rFmt.GetGraphicOrientation(); -- cgit v1.2.3 From 7e7496bceecb366e9edaf885d41ece736218ceb5 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Wed, 5 May 2010 13:18:49 +0200 Subject: kfreebsdport01v2: fix odks settings.mk to add kfreebsd support and add amd64. Remove obsolete gcc version check --- odk/settings/settings.mk | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk index 3f84612e48c3..f03deaf7fa1d 100644 --- a/odk/settings/settings.mk +++ b/odk/settings/settings.mk @@ -498,13 +498,37 @@ ifneq (,$(findstring freebsd,$(PLATFORM))) PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) -# Default is freebsd on a intel machine +ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) +PLATFORM=kfreebsd +ifeq "$(PROCTYPE)" "x86_64" +PACKAGE_LIB_DIR=kfreebsd_x86_64.plt +UNOPKG_PLATFORM=kFreeBSD_x86_64 +else +PACKAGE_LIB_DIR=kfreebsd_x86.plt +UNOPKG_PLATFORM=kFreeBSD_x86 +endif +else PLATFORM=freebsd +ifeq "$(PROCTYPE)" "x86_64" +PACKAGE_LIB_DIR=freebsd_x86_64.plt +UNOPKG_PLATFORM=FreeBSD_x86_64 +else PACKAGE_LIB_DIR=freebsd_x86.plt UNOPKG_PLATFORM=FreeBSD_x86 +endif +endif + +ifeq "$(PROCTYPE)" "x86_64" +JAVA_PROC_TYPE=amd64 +else JAVA_PROC_TYPE=i386 +endif +ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) +OS=LINUX +else OS=FREEBSD +endif PS=/ ICL=\$$ CC=gcc @@ -520,13 +544,8 @@ SHAREDLIB_OUT=$(OUT_LIB) GCC_VERSION=$(shell $(CC) -dumpversion) -ifeq "$(shell echo $(GCC_VERSION) | cut -c 1)" "3" COMID=gcc3 CPPU_ENV=gcc3 -else -COMID=GCC -CPPU_ENV=gcc2 -endif OSEP=\< CSEP=\> -- cgit v1.2.3 From ec2b51bbf8c3f999703eee3a6da4db5075caf4de Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 5 May 2010 15:19:33 +0200 Subject: #i111284# method - correct treatment of list level indents --- sw/source/core/text/itrcrsr.cxx | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 438f7c246287..34c0a9843986 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -57,6 +57,9 @@ #include "pordrop.hxx" #include "crstate.hxx" // SwCrsrMoveState #include // SwMultiPortion +// --> OD 2010-05-05 #i111284# +#include +// <-- // Nicht reentrant !!! // wird in GetCharRect gesetzt und im UnitUp/Down ausgewertet. @@ -143,6 +146,27 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig, } } +// --> OD 2010-05-05 #i111284# +namespace { + bool AreListLevelIndentsApplicableAndLabelAlignmentActive( const SwTxtNode& rTxtNode ) + { + bool bRet( false ); + + if ( rTxtNode.AreListLevelIndentsApplicable() ) + { + const SwNumFmt& rNumFmt = + rTxtNode.GetNumRule()->Get( static_cast(rTxtNode.GetActualListLevel()) ); + if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + { + bRet = true; + } + } + + return bRet; + } +} // end of anonymous namespace +// <-- + /************************************************************************* * SwTxtMargin::CtorInitTxtMargin() *************************************************************************/ @@ -156,7 +180,9 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) const SvxLRSpaceItem &rSpace = pFrm->GetTxtNode()->GetSwAttrSet().GetLRSpace(); // --> OD 2009-09-08 #i95907#, #b6879723# - const bool bListLevelIndentsApplicable = pFrm->GetTxtNode()->AreListLevelIndentsApplicable(); + // --> OD 2010-05-05 #i111284# + const bool bListLevelIndentsApplicableAndLabelAlignmentActive( + AreListLevelIndentsApplicableAndLabelAlignmentActive( *(pFrm->GetTxtNode()) ) ); // <-- // @@ -181,9 +207,10 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) nLMWithNum - pNode->GetLeftMarginWithNum( sal_False ) - // --> OD 2009-09-08 #i95907#, #b6879723# + // --> OD 2010-05-05 #i111284# // rSpace.GetLeft() + // rSpace.GetTxtLeft(); - ( bListLevelIndentsApplicable + ( bListLevelIndentsApplicableAndLabelAlignmentActive ? 0 : ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) ); // <-- @@ -191,8 +218,9 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) else { // --> OD 2009-09-08 #i95907#, #b6879723# + // --> OD 2010-05-05 #i111284# // if ( !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) - if ( bListLevelIndentsApplicable || + if ( bListLevelIndentsApplicableAndLabelAlignmentActive || !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) // <-- { @@ -202,9 +230,10 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) nLMWithNum - pNode->GetLeftMarginWithNum( sal_False ) - // --> OD 2009-09-08 #i95907#, #b6879723# + // --> OD 2010-05-05 #i111284# // rSpace.GetLeft() + // rSpace.GetTxtLeft(); - ( bListLevelIndentsApplicable + ( bListLevelIndentsApplicableAndLabelAlignmentActive ? 0 : ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) ); // <-- @@ -292,10 +321,11 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) nFirstLineOfs = nFLOfst; // --> OD 2009-09-08 #i95907#, #b6879723# + // --> OD 2010-05-05 #i111284# // if ( pFrm->IsRightToLeft() || // !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) if ( pFrm->IsRightToLeft() || - bListLevelIndentsApplicable || + bListLevelIndentsApplicableAndLabelAlignmentActive || !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ) // <-- { -- cgit v1.2.3 From 0581e072a69d06abd1bdcc8b5cc14771b110e6f9 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 5 May 2010 18:16:33 +0200 Subject: chartpositioning: #i100778# simplify user interface: reduce sizing options to new excluding mode only --- .../controller/chartapiwrapper/DiagramWrapper.cxx | 6 + chart2/source/controller/dialogs/ResourceIds.hrc | 1 - chart2/source/controller/dialogs/Strings.src | 5 - .../controller/dialogs/dlg_ObjectProperties.cxx | 10 +- chart2/source/controller/dialogs/makefile.mk | 2 - .../controller/dialogs/tp_DiagramPosition.cxx | 786 --------------------- .../controller/dialogs/tp_DiagramPosition.hrc | 51 -- .../controller/dialogs/tp_DiagramPosition.hxx | 137 ---- .../controller/dialogs/tp_DiagramPosition.src | 217 ------ .../source/controller/inc/DiagramItemConverter.hxx | 78 -- .../itemsetwrapper/DiagramItemConverter.cxx | 223 ------ .../controller/itemsetwrapper/SchWhichPairs.hxx | 8 - .../source/controller/itemsetwrapper/makefile.mk | 3 +- .../controller/main/ChartController_Position.cxx | 21 +- .../controller/main/ChartController_Properties.cxx | 4 - chart2/source/inc/DiagramHelper.hxx | 2 - chart2/source/inc/ObjectIdentifier.hxx | 2 +- chart2/source/inc/Strings.hrc | 2 +- chart2/source/inc/chartview/ChartSfxItemIds.hxx | 11 +- chart2/source/tools/DiagramHelper.cxx | 52 +- chart2/source/view/main/ChartItemPool.cxx | 7 - chart2/source/view/main/ChartView.cxx | 43 +- 22 files changed, 51 insertions(+), 1620 deletions(-) delete mode 100644 chart2/source/controller/dialogs/tp_DiagramPosition.cxx delete mode 100644 chart2/source/controller/dialogs/tp_DiagramPosition.hrc delete mode 100644 chart2/source/controller/dialogs/tp_DiagramPosition.hxx delete mode 100644 chart2/source/controller/dialogs/tp_DiagramPosition.src delete mode 100644 chart2/source/controller/inc/DiagramItemConverter.hxx delete mode 100644 chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 61b258e2eb22..e05279b15aae 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -745,6 +745,7 @@ awt::Point SAL_CALL DiagramWrapper::getPosition() void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition ) throw (uno::RuntimeException) { + ControllerLockGuard aCtrlLockGuard( m_spChart2ModelContact->getChartModel() ); Reference< beans::XPropertySet > xProp( this->getInnerPropertySet() ); if( xProp.is() ) { @@ -778,6 +779,7 @@ void SAL_CALL DiagramWrapper::setSize( const awt::Size& aSize ) throw (beans::PropertyVetoException, uno::RuntimeException) { + ControllerLockGuard aCtrlLockGuard( m_spChart2ModelContact->getChartModel() ); Reference< beans::XPropertySet > xProp( this->getInnerPropertySet() ); if( xProp.is() ) { @@ -811,6 +813,7 @@ OUString SAL_CALL DiagramWrapper::getShapeType() void SAL_CALL DiagramWrapper::setAutomaticDiagramPositioning() throw (uno::RuntimeException) { + ControllerLockGuard aCtrlLockGuard( m_spChart2ModelContact->getChartModel() ); uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) { @@ -832,6 +835,7 @@ void SAL_CALL DiagramWrapper::setAutomaticDiagramPositioning() throw (uno::Runti } void SAL_CALL DiagramWrapper::setDiagramPositionExcludingAxes( const awt::Rectangle& rPositionRect ) throw (uno::RuntimeException) { + ControllerLockGuard aCtrlLockGuard( m_spChart2ModelContact->getChartModel() ); DiagramHelper::setDiagramPositioning( m_spChart2ModelContact->getChartModel(), rPositionRect ); uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) @@ -859,6 +863,7 @@ awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionExcludingAxes( } void SAL_CALL DiagramWrapper::setDiagramPositionIncludingAxes( const awt::Rectangle& rPositionRect ) throw (uno::RuntimeException) { + ControllerLockGuard aCtrlLockGuard( m_spChart2ModelContact->getChartModel() ); DiagramHelper::setDiagramPositioning( m_spChart2ModelContact->getChartModel(), rPositionRect ); uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) @@ -870,6 +875,7 @@ awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxes( } void SAL_CALL DiagramWrapper::setDiagramPositionIncludingAxesAndAxisTitles( const awt::Rectangle& rPositionRect ) throw (uno::RuntimeException) { + ControllerLockGuard aCtrlLockGuard( m_spChart2ModelContact->getChartModel() ); awt::Rectangle aRect( m_spChart2ModelContact->SubstractAxisTitleSizes(rPositionRect) ); DiagramWrapper::setDiagramPositionIncludingAxes( aRect ); } diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc index 5fd05388bfc3..2ab544c77ab1 100644 --- a/chart2/source/controller/dialogs/ResourceIds.hrc +++ b/chart2/source/controller/dialogs/ResourceIds.hrc @@ -63,7 +63,6 @@ #define TP_AXIS_LABEL 920 #define TP_SCALE 903 #define TP_AXIS_POSITIONS 904 -#define TP_DIAGRAM_POSITION 905 #define TP_CHARTTYPE 910 #define TP_RANGECHOOSER 911 #define TP_WIZARD_TITLEANDOBJECTS 912 diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src index e4792361b5ab..4b4cec65426e 100644 --- a/chart2/source/controller/dialogs/Strings.src +++ b/chart2/source/controller/dialogs/Strings.src @@ -121,11 +121,6 @@ String STR_PAGE_POSITIONING Text [ en-US ] = "Positioning" ; }; -String STR_PAGE_POSITIONANDSIZE -{ - Text [ en-US ] = "Position and Size" ; -}; - // String STR_PAGE_STATISTICS // { // Text [ en-US ] = "Statistics" ; diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index b2287437c377..2a41d35313e8 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -49,7 +49,6 @@ #include "tp_SeriesToAxis.hxx" #include "tp_TitleRotation.hxx" #include "tp_PolarOptions.hxx" -#include "tp_DiagramPosition.hxx" #include "ResId.hxx" #include "ViewElementListProvider.hxx" #include "macros.hxx" @@ -247,9 +246,6 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel else m_aLocalizedName = ObjectNameProvider::getName_ObjectForSeries( m_eObjectType, m_aObjectCID, m_xChartDocument ); break; - case OBJECTTYPE_DIAGRAM: - m_aLocalizedName = String(SchResId(STR_PAGE_POSITIONANDSIZE)); - break; default: m_aLocalizedName = ObjectNameProvider::getName(m_eObjectType,m_bAffectsMultipleObjects); break; @@ -463,14 +459,12 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent, AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE))); break; - case OBJECTTYPE_DIAGRAM: - AddTabPage(TP_DIAGRAM_POSITION, String(SchResId(STR_PAGE_POSITIONANDSIZE)), DiagramPositionTabPage::Create, NULL); - break; - case OBJECTTYPE_DIAGRAM_WALL: case OBJECTTYPE_DATA_STOCK_LOSS: case OBJECTTYPE_DATA_STOCK_GAIN: case OBJECTTYPE_PAGE: case OBJECTTYPE_DIAGRAM_FLOOR: + case OBJECTTYPE_DIAGRAM_WALL: + case OBJECTTYPE_DIAGRAM: AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER))); AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA))); AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY))); diff --git a/chart2/source/controller/dialogs/makefile.mk b/chart2/source/controller/dialogs/makefile.mk index 3121c2e3dfdd..d22f5c83b081 100644 --- a/chart2/source/controller/dialogs/makefile.mk +++ b/chart2/source/controller/dialogs/makefile.mk @@ -67,7 +67,6 @@ SLOFILES= \ $(SLO)$/tp_RangeChooser.obj \ $(SLO)$/tp_Wizard_TitlesAndObjects.obj \ $(SLO)$/tp_Location.obj \ - $(SLO)$/tp_DiagramPosition.obj \ $(SLO)$/tp_AxisLabel.obj \ $(SLO)$/tp_AxisPositions.obj \ $(SLO)$/tp_DataLabel.obj \ @@ -120,7 +119,6 @@ SRC1FILES= \ tp_RangeChooser.src \ tp_Wizard_TitlesAndObjects.src \ tp_Location.src \ - tp_DiagramPosition.src \ tp_AxisLabel.src \ tp_AxisPositions.src \ tp_DataLabel.src \ diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.cxx b/chart2/source/controller/dialogs/tp_DiagramPosition.cxx deleted file mode 100644 index b8d0df131f63..000000000000 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.cxx +++ /dev/null @@ -1,786 +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_chart2.hxx" -#include "tp_DiagramPosition.hxx" -#include "tp_DiagramPosition.hrc" - -#include "ConfigurationAccess.hxx" -#include "DiagramHelper.hxx" -#include "ResId.hxx" -#include "chartview/ChartSfxItemIds.hxx" - -#include -#include -#include -#include -#include -// header for class SvxDoubleItem -#include - -using namespace ::com::sun::star; - -//............................................................................. -namespace chart -{ -//............................................................................. - -void lcl_ConvertRect(basegfx::B2DRange& rRange, const sal_uInt16 nDigits, const MapUnit ePoolUnit, const FieldUnit eDlgUnit) -{ - const basegfx::B2DPoint aTopLeft( - (double)MetricField::ConvertValue(basegfx::fround(rRange.getMinX()), nDigits, ePoolUnit, eDlgUnit), - (double)MetricField::ConvertValue(basegfx::fround(rRange.getMinY()), nDigits, ePoolUnit, eDlgUnit)); - const basegfx::B2DPoint aBottomRight( - (double)MetricField::ConvertValue(basegfx::fround(rRange.getMaxX()), nDigits, ePoolUnit, eDlgUnit), - (double)MetricField::ConvertValue(basegfx::fround(rRange.getMaxY()), nDigits, ePoolUnit, eDlgUnit)); - - rRange = basegfx::B2DRange(aTopLeft, aBottomRight); -} - -void lcl_ScaleRect(basegfx::B2DRange& rRange, const Fraction aUIScale) -{ - const double fFactor(1.0 / double(aUIScale)); - rRange = basegfx::B2DRange(rRange.getMinimum() * fFactor, rRange.getMaximum() * fFactor); -} - -DiagramPositionTabPage::DiagramPositionTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : - SvxTabPage ( pParent, SchResId( TP_DIAGRAM_POSITION ), rInAttrs ), - - m_aFlPosMode( this, SchResId( FL_POSITIONING_MODE ) ), - - m_aRbPosMode_Auto( this, SchResId( RB_POSITIONING_MODE_AUTOMATIC ) ), - m_aRbPosMode_Excluding( this, SchResId( RB_POSITIONING_MODE_EXCLUDING ) ), - m_aRbPosMode_Including( this, SchResId( RB_POSITIONING_MODE_INCLUDING ) ), - - maFlPosition ( this, SchResId( FL_POSITION ) ), - maFtPosX ( this, SchResId( FT_POS_X ) ), - maMtrPosX ( this, SchResId( MTR_FLD_POS_X ) ), - maFtPosY ( this, SchResId( FT_POS_Y ) ), - maMtrPosY ( this, SchResId( MTR_FLD_POS_Y ) ), - maFtPosReference ( this, SchResId( FT_POSREFERENCE ) ), - maCtlPos ( this, SchResId( CTL_POSRECT ), RP_LT ), - - maFlSize ( this, SchResId( FL_SIZE ) ), - maFtWidth ( this, SchResId( FT_WIDTH ) ), - maMtrWidth ( this, SchResId( MTR_FLD_WIDTH ) ), - maFtHeight ( this, SchResId( FT_HEIGHT ) ), - maMtrHeight ( this, SchResId( MTR_FLD_HEIGHT ) ), - maCbxScale ( this, SchResId( CBX_SCALE ) ), - maFtSizeReference ( this, SchResId( FT_SIZEREFERENCE) ), - maCtlSize ( this, SchResId( CTL_SIZERECT ), RP_LT ), - m_aExcludingRect(1,2,3,4), - m_aIncludingRect(1,2,3,4), - m_aMaxRect(1,2,3,4), - m_fUIScale( 1.0 ), - m_aCurrentRect(1,2,3,4), - m_bRectChangedByUser( false ) -{ - FreeResource(); - - // this pege needs ExchangeSupport - // SetExchangeSupport(); - - // evaluate PoolUnit - SfxItemPool* pPool = rInAttrs.GetPool(); - DBG_ASSERT( pPool, "no pool (!)" ); - mePoolUnit = pPool->GetMetric( SID_ATTR_TRANSFORM_POS_X ); - - Construct(); - - m_aRbPosMode_Auto.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); - m_aRbPosMode_Excluding.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); - m_aRbPosMode_Including.SetClickHdl( LINK( this, DiagramPositionTabPage, ChangeModeHdl ) ); - - maMtrPosX.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangePosXHdl ) ); - maMtrPosY.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangePosYHdl ) ); - - maMtrWidth.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangeWidthHdl ) ); - maMtrHeight.SetModifyHdl( LINK( this, DiagramPositionTabPage, ChangeHeightHdl ) ); - maCbxScale.SetClickHdl( LINK( this, DiagramPositionTabPage, ClickScaleHdl ) ); -} - -// ----------------------------------------------------------------------- - -void DiagramPositionTabPage::Construct() -{ - // get range and work area - meDlgUnit = ConfigurationAccess::getFieldUnit(); - SetFieldUnit( maMtrPosX, meDlgUnit, TRUE ); - SetFieldUnit( maMtrPosY, meDlgUnit, TRUE ); - SetFieldUnit( maMtrWidth, meDlgUnit, TRUE ); - SetFieldUnit( maMtrHeight, meDlgUnit, TRUE ); - - if(FUNIT_MILE == meDlgUnit || FUNIT_KM == meDlgUnit) - { - maMtrPosX.SetDecimalDigits( 3 ); - maMtrPosY.SetDecimalDigits( 3 ); - maMtrWidth.SetDecimalDigits( 3 ); - maMtrHeight.SetDecimalDigits( 3 ); - } -} - -// ----------------------------------------------------------------------- - -void DiagramPositionTabPage::Reset( const SfxItemSet& rInAttrs ) -{ - //positioning mode - DiagramPositioningMode ePos = DiagramPositioningMode_AUTO; - const SfxPoolItem* pItem = NULL; - if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_POS_MODE, TRUE, &pItem ) == SFX_ITEM_SET ) - ePos = DiagramPositioningMode(((const SfxInt32Item*)pItem)->GetValue()); - if( ePos == DiagramPositioningMode_AUTO ) - m_aRbPosMode_Auto.Check(); - else if( ePos == DiagramPositioningMode_EXCLUDING ) - m_aRbPosMode_Excluding.Check(); - else if( ePos == DiagramPositioningMode_INCLUDING ) - m_aRbPosMode_Including.Check(); - - ReleaseBorders(); - maCtlPos.Reset(); - maCtlSize.Reset(); - - //rectangles - if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_RECT_MAX, TRUE, &pItem ) == SFX_ITEM_SET ) - { - m_aMaxRect = ((const SfxRectangleItem*)pItem)->GetValue(); - SetRectIn100thmm( m_aMaxRect ); - m_aMaxRect = GetRectIn100thmm(); - } - - if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_RECT_EXCLUDING, TRUE, &pItem ) == SFX_ITEM_SET ) - { - m_aExcludingRect = ((const SfxRectangleItem*)pItem)->GetValue(); - SetRectIn100thmm( m_aExcludingRect ); - m_aExcludingRect = GetRectIn100thmm(); - } - - if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_RECT_INCLUDING, TRUE, &pItem ) == SFX_ITEM_SET ) - { - m_aIncludingRect = ((const SfxRectangleItem*)pItem)->GetValue(); - SetRectIn100thmm( m_aIncludingRect ); - m_aIncludingRect = GetRectIn100thmm(); - } - - if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_UI_SCALE, TRUE, &pItem ) == SFX_ITEM_SET ) - m_fUIScale = ((const SvxDoubleItem*)pItem)->GetValue(); - - m_aCurrentRect = m_aIncludingRect; - if( rInAttrs.GetItemState( SCHATTR_DIAGRAM_RECT_TO_USE, TRUE, &pItem ) == SFX_ITEM_SET ) - { - m_aCurrentRect = ((const SfxRectangleItem*)pItem)->GetValue(); - SetRectIn100thmm( m_aCurrentRect ); - m_aCurrentRect = GetRectIn100thmm(); - } - - // scale - String aStr = GetUserData(); - maCbxScale.Check( (BOOL)aStr.ToInt32() ); - mfScaleSizeX = std::max( (double)GetCoreValue( maMtrWidth, mePoolUnit ), 1.0 ); - mfScaleSizeY = std::max( (double)GetCoreValue( maMtrHeight, mePoolUnit ), 1.0 ); - - - m_bRectChangedByUser = false; - SetMinMaxPosition(); - UpdateControlStates(); -} - -// ----------------------------------------------------------------------- - -BOOL DiagramPositionTabPage::FillItemSet( SfxItemSet& rOutAttrs ) -{ - BOOL bModified(TRUE); - - //positioning mode - sal_Int32 nMode = 0; - if( m_aRbPosMode_Excluding.IsChecked() ) - nMode = 1; - else if( m_aRbPosMode_Including.IsChecked() ) - nMode = 2; - - rOutAttrs.Put( SfxInt32Item( SCHATTR_DIAGRAM_POS_MODE, nMode ) ); - - rOutAttrs.Put( SfxRectangleItem( SCHATTR_DIAGRAM_RECT_TO_USE, GetRectIn100thmm() ) ); - - return bModified; -} - -// ----------------------------------------------------------------------- - -SfxTabPage* DiagramPositionTabPage::Create( Window* pWindow, const SfxItemSet& rOutAttrs ) -{ - return( new DiagramPositionTabPage( pWindow, rOutAttrs ) ); -} - -//------------------------------------------------------------------------ - -void DiagramPositionTabPage::ActivatePage( const SfxItemSet& /*rSet*/ ) -{ -} - -// ----------------------------------------------------------------------- - -int DiagramPositionTabPage::DeactivatePage( SfxItemSet* pItemSet ) -{ - if( pItemSet ) - FillItemSet( *pItemSet ); - return LEAVE_PAGE; -} - -//------------------------------------------------------------------------ - -long DiagramPositionTabPage::get1oothMMPosValue( MetricField& rField ) -{ - double fValue( GetCoreValue( rField, mePoolUnit ) * m_fUIScale); - return basegfx::fround(fValue); -} - -long DiagramPositionTabPage::get1oothMMSizeValue( MetricField& rField ) -{ - double fValue = static_cast(rField.GetValue( meDlgUnit )); - fValue = MetricField::ConvertDoubleValue( fValue, rField.GetBaseValue(), rField.GetDecimalDigits(), meDlgUnit, FUNIT_100TH_MM ); - long nValue = long(fValue*m_fUIScale); - nValue = OutputDevice::LogicToLogic( nValue, MAP_100TH_MM, (MapUnit)mePoolUnit ); - nValue = static_cast(rField.Denormalize( nValue )); - return nValue; -} - -/* -const double fTmp((((const SfxInt32Item*)pItem)->GetValue() - maAnchor.getY()) / fUIScale); -SetMetricValue(maMtrPosY, basegfx::fround(fTmp), mePoolUnit); - sal_Int64 nVal = OutputDevice::LogicToLogic( nCoreValue, (MapUnit)eUnit, MAP_100TH_MM ); - nVal = rField.Normalize( nVal ); - rField.SetValue( nVal, FUNIT_100TH_MM ); - */ - -void DiagramPositionTabPage::set1oothMMPosValue( MetricField& rField, long n100thMM ) -{ - const double fTmp( n100thMM / m_fUIScale ); - SetMetricValue(rField, basegfx::fround(fTmp), mePoolUnit); -} -void DiagramPositionTabPage::set1oothMMSizeValue( MetricField& rField, long n100thMM ) -{ - double fValue((OutputDevice::LogicToLogic( n100thMM, (MapUnit)mePoolUnit, MAP_100TH_MM)) ); - fValue /= m_fUIScale; - if(rField.GetDecimalDigits()) - fValue *= pow(10.0, rField.GetDecimalDigits()); - fValue = MetricField::ConvertDoubleValue(fValue, rField.GetBaseValue(), rField.GetDecimalDigits(), FUNIT_100TH_MM, meDlgUnit); - rField.SetValue(static_cast(fValue), meDlgUnit); -} - -sal_Int64 DiagramPositionTabPage::convert1oothMMValueToFieldUnit( MetricField& rField, long n100thMM ) -{ - double fValue((OutputDevice::LogicToLogic( n100thMM, (MapUnit)mePoolUnit, MAP_100TH_MM)) ); - fValue /= m_fUIScale; - if(rField.GetDecimalDigits()) - fValue *= pow(10.0, rField.GetDecimalDigits()); - fValue = MetricField::ConvertDoubleValue(fValue, rField.GetBaseValue(), rField.GetDecimalDigits(), FUNIT_100TH_MM, meDlgUnit); - return basegfx::fround64(fValue); -} - -//------------------------------------------------------------------------ - -void DiagramPositionTabPage::SetRectIn100thmm( const Rectangle& rRect ) -{ - ReleaseBorders(); - - m_aCurrentRect = rRect; - long nLeft = m_aCurrentRect.Left(); - long nTop = m_aCurrentRect.Top(); - long nWidth = m_aCurrentRect.getWidth(); - long nHeight = m_aCurrentRect.getHeight(); - - switch ( maCtlPos.GetActualRP() ) - { - case RP_LT: - { - break; - } - case RP_MT: - { - nLeft += nWidth / 2; - break; - } - case RP_RT: - { - nLeft += nWidth; - break; - } - case RP_LM: - { - nTop += nHeight / 2; - break; - } - case RP_MM: - { - nLeft += nWidth / 2; - nTop += nHeight / 2; - break; - } - case RP_RM: - { - nLeft += nWidth; - nTop += nHeight / 2; - break; - } - case RP_LB: - { - nTop += nHeight; - break; - } - case RP_MB: - { - nLeft += nWidth / 2; - nTop += nHeight; - break; - } - case RP_RB: - { - nLeft += nWidth; - nTop += nHeight; - break; - } - } - - set1oothMMPosValue( maMtrPosX, nLeft ); - set1oothMMPosValue( maMtrPosY, nTop ); - set1oothMMSizeValue( maMtrWidth, nWidth ); - set1oothMMSizeValue( maMtrHeight, nHeight ); - - SetMinMaxPosition(); -} - -//------------------------------------------------------------------------ - -Rectangle DiagramPositionTabPage::GetRectIn100thmm() -{ - long nX = get1oothMMPosValue( maMtrPosX ); - long nY = get1oothMMPosValue( maMtrPosY ); - long nWidth = get1oothMMSizeValue( maMtrWidth ); - long nHeight = get1oothMMSizeValue( maMtrHeight ); - - switch( maCtlPos.GetActualRP() ) - { - case RP_LT: - { - break; - } - case RP_MT: - { - nX -= nWidth/2; - break; - } - case RP_RT: - { - nX -= nWidth; - break; - } - case RP_LM: - { - nY -= nHeight/2; - break; - } - case RP_MM: - { - nX -= nWidth/2; - nY -= nHeight/2; - break; - } - case RP_RM: - { - nX -= nWidth; - nY -= nHeight/2; - break; - } - case RP_LB: - { - nY -= nHeight; - break; - } - case RP_MB: - { - nX -= nWidth/2; - nY -= nHeight; - break; - } - case RP_RB: - { - nX -= nWidth; - nY -= nHeight; - break; - } - } - - return Rectangle(nX,nY,nX+nWidth,nY+nHeight); -} - -//------------------------------------------------------------------------ - -void DiagramPositionTabPage::UpdateControlStates() -{ - bool bEnable = true; - - m_aRbPosMode_Auto.Enable( bEnable ); - m_aRbPosMode_Excluding.Enable( bEnable ); - m_aRbPosMode_Including.Enable( bEnable ); - - if( m_aRbPosMode_Auto.IsChecked() ) - bEnable = false; - - maFlPosition.Enable( bEnable ); - maFtPosX.Enable( bEnable ); - maMtrPosX.Enable( bEnable ); - maFtPosY.Enable( bEnable ); - maMtrPosY.Enable( bEnable ); - maFtPosReference.Enable( bEnable ); - maCtlPos.Enable( bEnable ); - - maFlSize.Enable( bEnable ); - maCtlSize.Enable( bEnable ); - maFtWidth.Enable( bEnable ); - maMtrWidth.Enable( bEnable ); - maFtHeight.Enable( bEnable ); - maMtrHeight.Enable( bEnable ); - maCbxScale.Enable( bEnable ); - maFtSizeReference.Enable( bEnable ); - - maCtlSize.Invalidate(); - maCtlPos.Invalidate(); -} - -//------------------------------------------------------------------------ - -void DiagramPositionTabPage::ReleaseBorders() -{ - //make it possible to set new values that will lead to different min max values afterwards - maMtrPosX.SetMin( convert1oothMMValueToFieldUnit( maMtrPosX, m_aMaxRect.Left() ), meDlgUnit); - maMtrPosX.SetMax( convert1oothMMValueToFieldUnit( maMtrPosX, m_aMaxRect.Right() ), meDlgUnit); - maMtrPosY.SetMin( convert1oothMMValueToFieldUnit( maMtrPosY, m_aMaxRect.Top() ), meDlgUnit); - maMtrPosY.SetMax( convert1oothMMValueToFieldUnit( maMtrPosY, m_aMaxRect.Bottom() ), meDlgUnit); - maMtrWidth.SetMax( convert1oothMMValueToFieldUnit( maMtrWidth, m_aMaxRect.GetWidth() ), meDlgUnit); - maMtrHeight.SetMax( convert1oothMMValueToFieldUnit( maMtrHeight, m_aMaxRect.GetHeight() ), meDlgUnit); -} - -//------------------------------------------------------------------------ - -void DiagramPositionTabPage::SetMinMaxPosition() -{ - // position - - long nLeft( m_aMaxRect.Left() ); - long nTop( m_aMaxRect.Top() ); - long nRight( m_aMaxRect.Right() ); - long nBottom( m_aMaxRect.Bottom() ); - - const long nWidth( m_aCurrentRect.GetWidth() ); - const long nHeight( m_aCurrentRect.GetHeight() ); - - switch ( maCtlPos.GetActualRP() ) - { - case RP_LT: - { - nRight -= nWidth; - nBottom -= nHeight; - break; - } - case RP_MT: - { - nLeft += nWidth / 2; - nRight -= nWidth / 2; - nBottom -= nHeight; - break; - } - case RP_RT: - { - nLeft += nWidth; - nBottom -= nHeight; - break; - } - case RP_LM: - { - nRight -= nWidth; - nTop += nHeight / 2; - nBottom -= nHeight / 2; - break; - } - case RP_MM: - { - nLeft += nWidth / 2; - nRight -= nWidth / 2; - nTop += nHeight / 2; - nBottom -= nHeight / 2; - break; - } - case RP_RM: - { - nLeft += nWidth; - nTop += nHeight / 2; - nBottom -= nHeight / 2; - break; - } - case RP_LB: - { - nRight -= nWidth; - nTop += nHeight; - break; - } - case RP_MB: - { - nLeft += nWidth / 2; - nRight -= nWidth / 2; - nTop += nHeight; - break; - } - case RP_RB: - { - nLeft += nWidth; - nTop += nHeight; - break; - } - } - - maMtrPosX.SetMin( convert1oothMMValueToFieldUnit( maMtrPosX, nLeft ), meDlgUnit); - maMtrPosX.SetFirst( convert1oothMMValueToFieldUnit( maMtrPosX, nLeft ), meDlgUnit); - maMtrPosX.SetMax( convert1oothMMValueToFieldUnit( maMtrPosX, nRight ), meDlgUnit); - maMtrPosX.SetLast( convert1oothMMValueToFieldUnit( maMtrPosX, nRight ), meDlgUnit); - maMtrPosY.SetMin( convert1oothMMValueToFieldUnit( maMtrPosY, nTop ), meDlgUnit); - maMtrPosY.SetFirst( convert1oothMMValueToFieldUnit( maMtrPosY, nTop ), meDlgUnit); - maMtrPosY.SetMax( convert1oothMMValueToFieldUnit( maMtrPosY, nBottom ), meDlgUnit); - maMtrPosY.SetLast( convert1oothMMValueToFieldUnit( maMtrPosY, nBottom ), meDlgUnit); - - // size - - nLeft = m_aMaxRect.Left(); - nTop = m_aMaxRect.Top(); - nRight = m_aMaxRect.Right(); - nBottom = m_aMaxRect.Bottom(); - - long nMaxWidth( m_aMaxRect.GetWidth() ); - long nMaxHeight( m_aMaxRect.GetHeight() ); - - switch ( maCtlSize.GetActualRP() ) - { - case RP_LT: - { - nMaxWidth -= ( m_aCurrentRect.Left() - nLeft ); - nMaxHeight -= ( m_aCurrentRect.Top() - nTop ); - break; - } - case RP_MT: - { - nMaxWidth = std::min( m_aCurrentRect.Center().X() - nLeft, nRight - m_aCurrentRect.Center().X() ) * 2; - nMaxHeight -= ( m_aCurrentRect.Top() - nTop ); - break; - } - case RP_RT: - { - nMaxWidth -= ( nRight - m_aCurrentRect.Right() ); - nMaxHeight -= ( m_aCurrentRect.Top() - nTop ); - break; - } - case RP_LM: - { - nMaxWidth -= ( m_aCurrentRect.Left() - nLeft ); - nMaxHeight = std::min( m_aCurrentRect.Center().Y() - nTop, nBottom - m_aCurrentRect.Center().Y() ) * 2; - break; - } - case RP_MM: - { - nMaxWidth = std::min( m_aCurrentRect.Center().X() - nLeft, nRight - m_aCurrentRect.Center().X() ) * 2; - nMaxHeight = std::min( m_aCurrentRect.Center().Y() - nTop, nBottom - m_aCurrentRect.Center().Y() ) * 2; - break; - } - case RP_RM: - { - nMaxWidth -= ( nRight - m_aCurrentRect.Right() ); - nMaxHeight = std::min( m_aCurrentRect.Center().Y() - nTop, nBottom - m_aCurrentRect.Center().Y() ) * 2; - break; - } - case RP_LB: - { - nMaxWidth -= ( m_aCurrentRect.Left() - nLeft ); - nMaxHeight -=( nBottom - m_aCurrentRect.Bottom() ); - break; - } - case RP_MB: - { - nMaxWidth = std::min( m_aCurrentRect.Center().X() - nLeft, nRight - m_aCurrentRect.Center().X() ) * 2; - nMaxHeight -= ( m_aCurrentRect.Bottom() - nBottom ); - break; - } - case RP_RB: - { - nMaxWidth -= ( nRight - m_aCurrentRect.Right() ); - nMaxHeight -= ( nBottom - m_aCurrentRect.Bottom() ); - break; - } - } - - if( maCbxScale.IsChecked() && maCbxScale.IsEnabled() ) - { - sal_Int64 nMaxHeightResultingFromScale(basegfx::fround64((mfScaleSizeY * (double)nMaxWidth) / mfScaleSizeX)); - if( nMaxHeightResultingFromScale > nMaxHeight ) - nMaxWidth = basegfx::fround64((mfScaleSizeX * (double)nMaxHeight / mfScaleSizeY)); - sal_Int64 nMaxWidthResultingFromScale(basegfx::fround64((mfScaleSizeX * (double)nMaxHeight) / mfScaleSizeY)); - if( nMaxWidthResultingFromScale > nMaxWidth ) - nMaxHeight = basegfx::fround64((mfScaleSizeY * (double)nMaxWidth / mfScaleSizeX)); - } - - maMtrWidth.SetMax( convert1oothMMValueToFieldUnit( maMtrWidth, nMaxWidth ), meDlgUnit); - maMtrWidth.SetLast( convert1oothMMValueToFieldUnit( maMtrWidth, nMaxWidth ), meDlgUnit); - maMtrHeight.SetMax( convert1oothMMValueToFieldUnit( maMtrHeight, nMaxHeight ), meDlgUnit); - maMtrHeight.SetLast( convert1oothMMValueToFieldUnit( maMtrHeight, nMaxHeight ), meDlgUnit); -} - -//------------------------------------------------------------------------ - -void DiagramPositionTabPage::PointChanged( Window* pWindow, RECT_POINT /*eRP*/ ) -{ - if( pWindow == &maCtlPos ) - SetRectIn100thmm( m_aCurrentRect ); - else - SetMinMaxPosition(); -} - -//------------------------------------------------------------------------ - -IMPL_LINK( DiagramPositionTabPage, ChangeModeHdl, RadioButton*, pButton ) -{ - UpdateControlStates(); - if( pButton == &m_aRbPosMode_Excluding ) - { - if( !m_bRectChangedByUser ) - SetRectIn100thmm( m_aExcludingRect ); - } - else if( pButton == &m_aRbPosMode_Including ) - { - if( !m_bRectChangedByUser ) - SetRectIn100thmm( m_aIncludingRect ); - } - - return( 0L ); -} - -//------------------------------------------------------------------------ - -IMPL_LINK( DiagramPositionTabPage, ChangePosXHdl, void *, EMPTYARG ) -{ - m_aCurrentRect = GetRectIn100thmm(); - SetMinMaxPosition(); - m_bRectChangedByUser = true; - return( 0L ); -} - -//------------------------------------------------------------------------ - -IMPL_LINK( DiagramPositionTabPage, ChangePosYHdl, void *, EMPTYARG ) -{ - m_aCurrentRect = GetRectIn100thmm(); - SetMinMaxPosition(); - m_bRectChangedByUser = true; - return( 0L ); -} - -//------------------------------------------------------------------------ - -IMPL_LINK( DiagramPositionTabPage, ChangeWidthHdl, void *, EMPTYARG ) -{ - if( maCbxScale.IsChecked() && maCbxScale.IsEnabled() ) - { - sal_Int64 nHeight(basegfx::fround64((mfScaleSizeY * (double)maMtrWidth.GetValue()) / mfScaleSizeX)); - - if(nHeight <= maMtrHeight.GetMax(FUNIT_NONE)) - { - maMtrHeight.SetUserValue(nHeight, FUNIT_NONE); - } - else - { - nHeight = maMtrHeight.GetMax(FUNIT_NONE); - maMtrHeight.SetUserValue(nHeight); - - const sal_Int64 nWidth(basegfx::fround64((mfScaleSizeX * (double)nHeight) / mfScaleSizeY)); - maMtrWidth.SetUserValue(nWidth, FUNIT_NONE); - } - } - m_bRectChangedByUser = true; - m_aCurrentRect = GetRectIn100thmm(); - SetMinMaxPosition(); - return( 0L ); -} - -//------------------------------------------------------------------------ - -IMPL_LINK( DiagramPositionTabPage, ChangeHeightHdl, void *, EMPTYARG ) -{ - if( maCbxScale.IsChecked() && maCbxScale.IsEnabled() ) - { - sal_Int64 nWidth(basegfx::fround64((mfScaleSizeX * (double)maMtrHeight.GetValue()) / mfScaleSizeY)); - - if(nWidth <= maMtrWidth.GetMax(FUNIT_NONE)) - { - maMtrWidth.SetUserValue(nWidth, FUNIT_NONE); - } - else - { - nWidth = maMtrWidth.GetMax(FUNIT_NONE); - maMtrWidth.SetUserValue(nWidth); - - const sal_Int64 nHeight(basegfx::fround64((mfScaleSizeY * (double)nWidth) / mfScaleSizeX)); - maMtrHeight.SetUserValue(nHeight, FUNIT_NONE); - } - } - m_bRectChangedByUser = true; - m_aCurrentRect = GetRectIn100thmm(); - SetMinMaxPosition(); - return( 0L ); -} - -//------------------------------------------------------------------------ - -IMPL_LINK( DiagramPositionTabPage, ClickScaleHdl, void *, EMPTYARG ) -{ - if( maCbxScale.IsChecked() ) - { - mfScaleSizeX = std::max( (double)GetCoreValue( maMtrWidth, mePoolUnit ), 1.0 ); - mfScaleSizeY = std::max( (double)GetCoreValue( maMtrHeight, mePoolUnit ), 1.0 ); - } - SetMinMaxPosition(); - return( 0L ); -} - -//------------------------------------------------------------------------ - -void DiagramPositionTabPage::FillUserData() -{ - // Abgleich wird in der Ini-Datei festgehalten - UniString aStr = UniString::CreateFromInt32( (sal_Int32) maCbxScale.IsChecked() ); - SetUserData( aStr ); -} - -//............................................................................. -} //namespace chart -//............................................................................. diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.hrc b/chart2/source/controller/dialogs/tp_DiagramPosition.hrc deleted file mode 100644 index b2a558636a18..000000000000 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.hrc +++ /dev/null @@ -1,51 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: ,v $ - * $Revision: $ - * - * 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 "ResourceIds.hrc" - -#define FL_POSITIONING_MODE 1 -#define RB_POSITIONING_MODE_AUTOMATIC 2 -#define RB_POSITIONING_MODE_EXCLUDING 3 -#define RB_POSITIONING_MODE_INCLUDING 4 -#define FL_POSITION 5 -#define FT_POS_X 6 -#define FT_POS_Y 7 -#define MTR_FLD_POS_X 8 -#define MTR_FLD_POS_Y 9 -#define FT_POSREFERENCE 10 -#define CTL_POSRECT 11 -#define FL_SIZE 12 -#define FT_WIDTH 13 -#define FT_HEIGHT 14 -#define MTR_FLD_WIDTH 15 -#define MTR_FLD_HEIGHT 16 -#define FT_SIZEREFERENCE 17 -#define CTL_SIZERECT 18 -#define CBX_SCALE 19 diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.hxx b/chart2/source/controller/dialogs/tp_DiagramPosition.hxx deleted file mode 100644 index 93dddb406500..000000000000 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.hxx +++ /dev/null @@ -1,137 +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 _CHART2_TP_DIAGRAMPOSITION_HXX -#define _CHART2_TP_DIAGRAMPOSITION_HXX - -// header for class FormattedField -#include -// header for FixedText -#include -// header for CheckBox -#include -// header for MetricField -#include -// header for SvxTabPage and SvxRectCtl -#include - -//............................................................................. -namespace chart -{ -//............................................................................. -class DiagramPositionTabPage : public SvxTabPage -{ - using TabPage::ActivatePage; - using TabPage::DeactivatePage; - -public: - DiagramPositionTabPage( Window* pParent, const SfxItemSet& rInAttrs ); - - static SfxTabPage* Create( Window*, const SfxItemSet& ); - - virtual BOOL FillItemSet( SfxItemSet& ); - virtual void Reset( const SfxItemSet & ); - - virtual void ActivatePage( const SfxItemSet& rSet ); - virtual int DeactivatePage( SfxItemSet* pSet ); - - //SvxTabPage communication interface with SvxRectCtl - virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); - - void Construct(); - - virtual void FillUserData(); - -private: - //methods - - DECL_LINK( ChangeModeHdl, RadioButton * ); - DECL_LINK( ChangePosXHdl, void * ); - DECL_LINK( ChangePosYHdl, void * ); - DECL_LINK( ChangeWidthHdl, void * ); - DECL_LINK( ChangeHeightHdl, void * ); - DECL_LINK( ClickScaleHdl, void * ); - - void SetRectIn100thmm( const Rectangle& rRect ); - Rectangle GetRectIn100thmm(); - long get1oothMMPosValue( MetricField& rField ); - long get1oothMMSizeValue( MetricField& rField ); - void set1oothMMPosValue( MetricField& rField, long n100thMM ); - void set1oothMMSizeValue( MetricField& rField, long n100thMM ); - sal_Int64 convert1oothMMValueToFieldUnit( MetricField& rField, long n100thMM ); - void ReleaseBorders(); - void SetMinMaxPosition(); - void UpdateControlStates(); - -private: - - //positioning mode - FixedLine m_aFlPosMode; - - RadioButton m_aRbPosMode_Auto; - RadioButton m_aRbPosMode_Excluding; - RadioButton m_aRbPosMode_Including; - - // position - FixedLine maFlPosition; - FixedText maFtPosX; - MetricField maMtrPosX; - FixedText maFtPosY; - MetricField maMtrPosY; - FixedText maFtPosReference; - SvxRectCtl maCtlPos; - - // size - FixedLine maFlSize; - FixedText maFtWidth; - MetricField maMtrWidth; - FixedText maFtHeight; - MetricField maMtrHeight; - CheckBox maCbxScale; - FixedText maFtSizeReference; - SvxRectCtl maCtlSize; - -private: - Rectangle m_aExcludingRect; - Rectangle m_aIncludingRect; - Rectangle m_aMaxRect; - double m_fUIScale; - Rectangle m_aCurrentRect; - bool m_bRectChangedByUser; - - SfxMapUnit mePoolUnit; - FieldUnit meDlgUnit; - - double mfScaleSizeX; - double mfScaleSizeY; -}; - -//............................................................................. -} //namespace chart -//............................................................................. - -#endif - diff --git a/chart2/source/controller/dialogs/tp_DiagramPosition.src b/chart2/source/controller/dialogs/tp_DiagramPosition.src deleted file mode 100644 index 4c98d13c7db4..000000000000 --- a/chart2/source/controller/dialogs/tp_DiagramPosition.src +++ /dev/null @@ -1,217 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: tp_DiagramPosition.src,v $ - * $Revision: 1.10 $ - * - * 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 "tp_DiagramPosition.hrc" -#include "TabPages.hrc" -#include - -#define LABELWIDTH 40 -#define LABELHEIGHT 10 - -#define Y_MODE_0 3 -#define Y_MODE_1 (Y_MODE_0+18) -#define Y_MODE_2 (Y_MODE_1+13) -#define Y_MODE_3 (Y_MODE_2+13) -#define Y_POSITION (Y_MODE_3+18) -#define Y_SIZE (Y_POSITION+53) - -#define X1 6 -#define X2 12 -#define X3 (X2+LABELWIDTH+4) -#define X4 178 - - -TabPage TP_DIAGRAM_POSITION -{ - Hide = TRUE ; - Size = MAP_APPFONT ( 260 , 185 ) ; - - FixedLine FL_POSITIONING_MODE - { - Pos = MAP_APPFONT ( X1 , Y_MODE_0 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDLINE_HEIGHT ) ; - Text [ en-US ] = "Positioning Mode" ; - }; - RadioButton RB_POSITIONING_MODE_AUTOMATIC - { - Pos = MAP_APPFONT ( X2 , Y_MODE_1 ) ; - Size = MAP_APPFONT ( 236 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Automatic" ; - }; - RadioButton RB_POSITIONING_MODE_EXCLUDING - { - Pos = MAP_APPFONT ( X2 , Y_MODE_2 ) ; - Size = MAP_APPFONT ( 236 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Exclude labels" ; - }; - RadioButton RB_POSITIONING_MODE_INCLUDING - { - Pos = MAP_APPFONT ( X2 , Y_MODE_3 ) ; - Size = MAP_APPFONT ( 236 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Include labels" ; - }; - - FixedLine FL_POSITION - { - Pos = MAP_APPFONT ( X1 , Y_POSITION ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDLINE_HEIGHT ) ; - Text [ en-US ] = "Position" ; - }; - FixedText FT_POS_X - { - Pos = MAP_APPFONT ( X2 , Y_POSITION - 3 + 16 + 8 ) ; - Size = MAP_APPFONT ( LABELWIDTH , LABELHEIGHT ) ; - Text [ en-US ] = "Position ~X" ; - }; - FixedText FT_POS_Y - { - Pos = MAP_APPFONT ( X2 , Y_POSITION - 3 + 32 + 8 ) ; - Size = MAP_APPFONT ( LABELWIDTH , LABELHEIGHT ) ; - Text [ en-US ] = "Position ~Y" ; - }; - MetricField MTR_FLD_POS_X - { - Border = TRUE ; - Pos = MAP_APPFONT ( X3 , Y_POSITION - 3 + 14 + 8 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -120000 ; - Maximum = 240000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - MetricField MTR_FLD_POS_Y - { - Border = TRUE ; - Pos = MAP_APPFONT ( X3 , Y_POSITION - 3 + 30 + 8 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -120000 ; - Maximum = 240000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - FixedText FT_POSREFERENCE - { - Pos = MAP_APPFONT ( X4 , Y_POSITION - 3 + 2 + 8 ) ; - Size = MAP_APPFONT ( 70 , LABELHEIGHT ) ; - Text [ en-US ] = "Base point"; - }; - Control CTL_POSRECT - { - Border = TRUE ; - Pos = MAP_APPFONT ( X4 , Y_POSITION - 3 + 12 + 8 ) ; - Size = MAP_APPFONT ( 48 , 34 ) ; - TabStop = TRUE ; - QuickHelpText [ en-US ] = "Base point" ; - }; - - // size - - FixedLine FL_SIZE - { - Pos = MAP_APPFONT ( X1 , Y_SIZE ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDLINE_HEIGHT ) ; - Text [ en-US ] = "Size" ; - }; - FixedText FT_WIDTH - { - Pos = MAP_APPFONT ( X2 , Y_SIZE - 56 + 16 + 61 ) ; - Size = MAP_APPFONT ( LABELWIDTH , LABELHEIGHT ) ; - Text [ en-US ] = "Wi~dth" ; - }; - FixedText FT_HEIGHT - { - Pos = MAP_APPFONT ( X2 , Y_SIZE - 56 + 32 + 61 ) ; - Size = MAP_APPFONT ( LABELWIDTH , LABELHEIGHT ) ; - Text [ en-US ] = "H~eight" ; - }; - MetricField MTR_FLD_WIDTH - { - Border = TRUE ; - Pos = MAP_APPFONT ( X3 , Y_SIZE - 56 + 14 + 61 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 120000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - MetricField MTR_FLD_HEIGHT - { - Border = TRUE ; - Pos = MAP_APPFONT ( X3 , Y_SIZE - 56 + 30 + 61 ) ; - Size = MAP_APPFONT ( 54 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 120000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_MM ; - SpinSize = 10 ; - }; - FixedText FT_SIZEREFERENCE - { - Pos = MAP_APPFONT ( X4 , Y_SIZE - 56 + 2 + 61 ) ; - Size = MAP_APPFONT ( 70 , LABELHEIGHT ) ; - Text [ en-US ] = "Base point"; - }; - Control CTL_SIZERECT - { - Border = TRUE ; - Pos = MAP_APPFONT ( X4 , Y_SIZE - 56 + 12 + 61 ) ; - Size = MAP_APPFONT ( 48 , 34 ) ; - TabStop = TRUE ; - QuickHelpText [ en-US ] = "Base point" ; - }; - CheckBox CBX_SCALE - { - Pos = MAP_APPFONT ( X2 , Y_SIZE - 56 + 47 + 61 ) ; - Size = MAP_APPFONT ( 162 , LABELHEIGHT ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Keep ratio" ; - }; -}; diff --git a/chart2/source/controller/inc/DiagramItemConverter.hxx b/chart2/source/controller/inc/DiagramItemConverter.hxx deleted file mode 100644 index 280b9cffb45b..000000000000 --- a/chart2/source/controller/inc/DiagramItemConverter.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. - * - ************************************************************************/ -#ifndef CHART_DIAGRAM_CONVERTER_HXX -#define CHART_DIAGRAM_CONVERTER_HXX - -#include "ItemConverter.hxx" -#include -#include - -#include -#include - -class SdrModel; - -namespace chart -{ -namespace wrapper -{ - -class DiagramItemConverter : public ::comphelper::ItemConverter -{ -public: - DiagramItemConverter( - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & rPropertySet, - SfxItemPool& rItemPool, - SdrModel& rDrawModel, - const ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XModel > & xChartModel, double fUIScale ); - virtual ~DiagramItemConverter(); - - virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; - virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); - -protected: - virtual const USHORT * GetWhichPairs() const; - virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const; - - virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const - throw( ::com::sun::star::uno::Exception ); - virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) - throw( ::com::sun::star::uno::Exception ); - -private: - ::std::vector< ItemConverter * > m_aConverters; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xChartModel; - double m_fUIScale; -}; - -} // namespace wrapper -} // namespace chart - -// CHART_DIAGRAM_CONVERTER_HXX -#endif diff --git a/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx deleted file mode 100644 index bc1cd71ed338..000000000000 --- a/chart2/source/controller/itemsetwrapper/DiagramItemConverter.cxx +++ /dev/null @@ -1,223 +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_chart2.hxx" -#include "DiagramItemConverter.hxx" -#include "DiagramHelper.hxx" -#include "ChartModelHelper.hxx" -#include "SchWhichPairs.hxx" -#include "macros.hxx" -#include "servicenames.hxx" -#include "chartview/ExplicitValueProvider.hxx" -#include -#include "ItemPropertyMap.hxx" -#include "GraphicPropertyItemConverter.hxx" -#include -#include - -#include -#include - -using namespace ::com::sun::star; - -namespace chart -{ -namespace wrapper -{ - -DiagramItemConverter::DiagramItemConverter( - const uno::Reference< beans::XPropertySet > & xPropertySet - , SfxItemPool& rItemPool - , SdrModel& rDrawModel - , const uno::Reference< frame::XModel >& xChartModel - , double fUIScale ) - : ItemConverter( xPropertySet, rItemPool ) - , m_xChartModel( xChartModel ) - , m_fUIScale( fUIScale ) -{ - m_aConverters.push_back( new GraphicPropertyItemConverter( - xPropertySet, rItemPool, rDrawModel, uno::Reference< lang::XMultiServiceFactory >( xChartModel, uno::UNO_QUERY ), - GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES )); -} - -DiagramItemConverter::~DiagramItemConverter() -{ - ::std::for_each( m_aConverters.begin(), m_aConverters.end(), - ::comphelper::DeleteItemConverterPtr() ); -} - -void DiagramItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const -{ - ::std::for_each( m_aConverters.begin(), m_aConverters.end(), - ::comphelper::FillItemSetFunc( rOutItemSet )); - - // own items - ItemConverter::FillItemSet( rOutItemSet ); -} - -bool DiagramItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) -{ - bool bResult = false; - - ::std::for_each( m_aConverters.begin(), m_aConverters.end(), - ::comphelper::ApplyItemSetFunc( rItemSet, bResult )); - - // own items - return ItemConverter::ApplyItemSet( rItemSet ) || bResult; -} - -const USHORT * DiagramItemConverter::GetWhichPairs() const -{ - // must span all used items! - return nDiagramWhichPairs; -} - -bool DiagramItemConverter::GetItemProperty( tWhichIdType /*nWhichId*/, tPropertyNameWithMemberId & /*rOutProperty*/ ) const -{ - // No own (non-special) properties - return false; -} - - -bool DiagramItemConverter::ApplySpecialItem( - USHORT nWhichId, const SfxItemSet & rItemSet ) - throw( uno::Exception ) -{ - bool bChanged = false; - - switch( nWhichId ) - { - case SCHATTR_DIAGRAM_POS_MODE: - { - try - { - sal_Int32 nValue = static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue(); - DiagramPositioningMode eMode = static_cast< DiagramPositioningMode >(nValue); - bChanged = DiagramHelper::setDiagramPositioningMode( ChartModelHelper::findDiagram( m_xChartModel ), eMode ); - } - catch( uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); - } - } - break; - case SCHATTR_DIAGRAM_RECT_TO_USE: - { - sal_Int32 nValue = static_cast< const SfxInt32Item & >( rItemSet.Get( SCHATTR_DIAGRAM_POS_MODE )).GetValue(); - DiagramPositioningMode ePosMode = static_cast< DiagramPositioningMode >(nValue); - if( ePosMode != DiagramPositioningMode_AUTO ) - { - Rectangle aRect = static_cast< const SfxRectangleItem & >( rItemSet.Get( nWhichId )).GetValue(); - bChanged = DiagramHelper::setDiagramPositioning( m_xChartModel, awt::Rectangle( aRect.getX(), aRect.getY(), aRect.getWidth(), aRect.getHeight() ) ); - } - } - break; - } - - return bChanged; -} - -void DiagramItemConverter::FillSpecialItem( - USHORT nWhichId, SfxItemSet & rOutItemSet ) const - throw( uno::Exception ) -{ - switch( nWhichId ) - { - case SCHATTR_DIAGRAM_POS_MODE: - { - DiagramPositioningMode eMode = DiagramHelper::getDiagramPositioningMode( ChartModelHelper::findDiagram( m_xChartModel ) ); - rOutItemSet.Put( SfxInt32Item( nWhichId, eMode ) ); - } - break; - case SCHATTR_DIAGRAM_RECT_TO_USE: - { - awt::Rectangle aRect(0,0,0,0); - DiagramPositioningMode eMode = DiagramHelper::getDiagramPositioningMode( ChartModelHelper::findDiagram( m_xChartModel ) ); - uno::Reference< lang::XMultiServiceFactory > xFact( m_xChartModel, uno::UNO_QUERY ); - if( xFact.is() ) - { - ExplicitValueProvider* pProvider = ExplicitValueProvider::getExplicitValueProvider( xFact->createInstance( CHART_VIEW_SERVICE_NAME ) ); - //test - awt::Rectangle aTestInclusive = pProvider->getRectangleOfObject( C2U("PlotAreaIncludingAxes") ); - awt::Rectangle aTestExclusive = pProvider->getDiagramRectangleExcludingAxes(); - awt::Rectangle aModelRect = DiagramHelper::getDiagramRectangleFromModel( m_xChartModel ); - //end test - - if( eMode == DiagramPositioningMode_EXCLUDING ) - aRect = pProvider->getDiagramRectangleExcludingAxes(); - else - aRect = pProvider->getRectangleOfObject( C2U("PlotAreaIncludingAxes") ); - rOutItemSet.Put( SfxRectangleItem( nWhichId, Rectangle( aRect.X, aRect.Y, aRect.X+aRect.Width, aRect.Y+aRect.Height ) ) ); - } - } - break; - case SCHATTR_DIAGRAM_RECT_INCLUDING: - { - uno::Reference< lang::XMultiServiceFactory > xFact( m_xChartModel, uno::UNO_QUERY ); - if( xFact.is() ) - { - ExplicitValueProvider* pProvider = ExplicitValueProvider::getExplicitValueProvider( xFact->createInstance( CHART_VIEW_SERVICE_NAME ) ); - if( pProvider ) - { - awt::Rectangle aRect = pProvider->getRectangleOfObject( C2U("PlotAreaIncludingAxes") ); - rOutItemSet.Put( SfxRectangleItem( nWhichId, Rectangle( aRect.X, aRect.Y, aRect.X+aRect.Width, aRect.Y+aRect.Height ) ) ); - } - } - } - break; - case SCHATTR_DIAGRAM_RECT_EXCLUDING: - { - uno::Reference< lang::XMultiServiceFactory > xFact( m_xChartModel, uno::UNO_QUERY ); - if( xFact.is() ) - { - ExplicitValueProvider* pProvider = ExplicitValueProvider::getExplicitValueProvider( xFact->createInstance( CHART_VIEW_SERVICE_NAME ) ); - if( pProvider ) - { - awt::Rectangle aRect = pProvider->getDiagramRectangleExcludingAxes(); - rOutItemSet.Put( SfxRectangleItem( nWhichId, Rectangle( aRect.X, aRect.Y, aRect.X+aRect.Width, aRect.Y+aRect.Height ) ) ); - } - } - } - break; - case SCHATTR_DIAGRAM_RECT_MAX: - { - awt::Size aPageSize( ChartModelHelper::getPageSize( m_xChartModel) ); - Rectangle aRect(0,0,aPageSize.Width,aPageSize.Height); - rOutItemSet.Put( SfxRectangleItem( nWhichId, aRect ) ); - } - break; - case SCHATTR_DIAGRAM_UI_SCALE: - { - rOutItemSet.Put( SvxDoubleItem( m_fUIScale, nWhichId ) ); - } - break; - } -} - -} // namespace wrapper -} // namespace chart diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx index bd971752954c..f7ddeb42c11e 100644 --- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx +++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx @@ -97,14 +97,6 @@ const USHORT nLegendWhichPairs[] = 0 }; -const USHORT nDiagramWhichPairs[] = -{ - SCHATTR_DIAGRAM_START, SCHATTR_DIAGRAM_END, - SID_ATTR_TRANSFORM_POS_Y, SID_ATTR_TRANSFORM_POS_Y, - SID_ATTR_TRANSFORM_WIDTH, SID_ATTR_TRANSFORM_HEIGHT, - 0 -}; - const USHORT nDataLabelWhichPairs[] = { SCHATTR_DATADESCR_START, SCHATTR_DATADESCR_END, diff --git a/chart2/source/controller/itemsetwrapper/makefile.mk b/chart2/source/controller/itemsetwrapper/makefile.mk index 80ee9b5fed0b..8f12443c13f6 100644 --- a/chart2/source/controller/itemsetwrapper/makefile.mk +++ b/chart2/source/controller/itemsetwrapper/makefile.mk @@ -52,8 +52,7 @@ SLOFILES= $(SLO)$/ItemConverter.obj \ $(SLO)$/TitleItemConverter.obj \ $(SLO)$/RegressionCurveItemConverter.obj \ $(SLO)$/RegressionEquationItemConverter.obj \ - $(SLO)$/ErrorBarItemConverter.obj \ - $(SLO)$/DiagramItemConverter.obj + $(SLO)$/ErrorBarItemConverter.obj # --- Targets ----------------------------------------------------------------- diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 83061be07fe5..3105ee53bf14 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -130,28 +130,17 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() if( !aCID.getLength() ) return; - ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID ); + awt::Size aSelectedSize; + ExplicitValueProvider* pProvider( ExplicitValueProvider::getExplicitValueProvider( m_xChartView ) ); + if( pProvider ) + aSelectedSize = ToSize( ( pProvider->getRectangleOfObject( aCID ) ) ); UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::POS_SIZE, - ObjectNameProvider::getName( eObjectType )), + ObjectNameProvider::getName( ObjectIdentifier::getObjectType( aCID ))), m_xUndoManager, m_aModel->getModel() ); - if( OBJECTTYPE_DIAGRAM == eObjectType || OBJECTTYPE_DIAGRAM_WALL == eObjectType ) - { - rtl::OUString aDiaCID = ObjectIdentifier::createClassifiedIdentifierForParticle( ObjectIdentifier::createParticleForDiagram( ChartModelHelper::findDiagram( m_aModel->getModel() ), m_aModel->getModel() ) ); - bool bSuccess = executeDlg_ObjectProperties_withoutUndoGuard( aDiaCID, false ); - if( bSuccess ) - aUndoGuard.commitAction(); - return; - } - - awt::Size aSelectedSize; - ExplicitValueProvider* pProvider( ExplicitValueProvider::getExplicitValueProvider( m_xChartView ) ); - if( pProvider ) - aSelectedSize = ToSize( ( pProvider->getRectangleOfObject( aCID ) ) ); - SfxAbstractTabDialog * pDlg = NULL; try { diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index 1b467cdbee7a..3c5a0b135622 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -60,7 +60,6 @@ #include "Strings.hrc" #include "ReferenceSizeProvider.hxx" #include "RegressionCurveHelper.hxx" -#include "DiagramItemConverter.hxx" #include //for auto_ptr @@ -152,9 +151,6 @@ namespace case OBJECTTYPE_LEGEND_ENTRY: break; case OBJECTTYPE_DIAGRAM: - pItemConverter = new wrapper::DiagramItemConverter( - xObjectProperties, rDrawModel.GetItemPool(), - rDrawModel, xChartModel, rDrawModel.GetUIScale() ); break; case OBJECTTYPE_DIAGRAM_WALL: case OBJECTTYPE_DIAGRAM_FLOOR: diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx index 541587cd0520..1886609d8600 100644 --- a/chart2/source/inc/DiagramHelper.hxx +++ b/chart2/source/inc/DiagramHelper.hxx @@ -327,8 +327,6 @@ public: static DiagramPositioningMode getDiagramPositioningMode( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > & xDiagram ); - static bool setDiagramPositioningMode( const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDiagram > & xDiagram, DiagramPositioningMode eMode ); static bool setDiagramPositioning( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel, const ::com::sun::star::awt::Rectangle& rPosRect /*100th mm*/ ); diff --git a/chart2/source/inc/ObjectIdentifier.hxx b/chart2/source/inc/ObjectIdentifier.hxx index ed598269a420..0765c9acf94a 100644 --- a/chart2/source/inc/ObjectIdentifier.hxx +++ b/chart2/source/inc/ObjectIdentifier.hxx @@ -135,7 +135,7 @@ public: ::com::sun::star::frame::XModel >& xChartModel , sal_Int32 nSubIndex = -1 );//-1: main grid, 0: first subgrid etc - static rtl::OUString createParticleForDiagram( + SAL_DLLPRIVATE static rtl::OUString createParticleForDiagram( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram , const ::com::sun::star::uno::Reference< diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc index a9b827407a99..47ed75e80a9a 100644 --- a/chart2/source/inc/Strings.hrc +++ b/chart2/source/inc/Strings.hrc @@ -31,6 +31,7 @@ #include //next free is 291 +//single free is: 134 //#define RID_APP_START 30000 ////#define STR_NULL (RID_APP_START + 1) @@ -297,7 +298,6 @@ #define STR_DLG_NUMBERFORMAT_FOR_PERCENTAGE_VALUE (RID_APP_START + 266) #define STR_PAGE_POSITIONING (RID_APP_START + 277) -#define STR_PAGE_POSITIONANDSIZE (RID_APP_START + 134) #define STR_PAGE_ASIAN (RID_APP_START + 281) //----------------------------------------------------------------------------- diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx index dc390791b81e..fbcce70bd1d6 100644 --- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx +++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx @@ -55,16 +55,7 @@ #define SCHATTR_LEGEND_POS SCHATTR_LEGEND_START #define SCHATTR_LEGEND_END SCHATTR_LEGEND_POS -#define SCHATTR_DIAGRAM_START (SCHATTR_LEGEND_END + 1) -#define SCHATTR_DIAGRAM_POS_MODE SCHATTR_DIAGRAM_START -#define SCHATTR_DIAGRAM_RECT_TO_USE SCHATTR_DIAGRAM_START + 1 -#define SCHATTR_DIAGRAM_RECT_INCLUDING SCHATTR_DIAGRAM_START + 2 -#define SCHATTR_DIAGRAM_RECT_EXCLUDING SCHATTR_DIAGRAM_START + 3 -#define SCHATTR_DIAGRAM_RECT_MAX SCHATTR_DIAGRAM_START + 4 -#define SCHATTR_DIAGRAM_UI_SCALE SCHATTR_DIAGRAM_START + 5 -#define SCHATTR_DIAGRAM_END SCHATTR_DIAGRAM_UI_SCALE - -#define SCHATTR_TEXT_START (SCHATTR_DIAGRAM_END + 1) +#define SCHATTR_TEXT_START (SCHATTR_LEGEND_END + 1) // #define SCHATTR_TEXT_ORIENT SCHATTR_TEXT_START // name changed: #define SCHATTR_TEXT_STACKED SCHATTR_TEXT_START diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 146f45ed0c63..a71daa4139eb 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -41,6 +41,7 @@ #include "servicenames_charttypes.hxx" #include "ChartModelHelper.hxx" #include "RelativePositionHelper.hxx" +#include "ControllerLockGuard.hxx" #include #include @@ -1435,55 +1436,6 @@ DiagramPositioningMode DiagramHelper::getDiagramPositioningMode( const uno::Refe return eMode; } -//static -bool DiagramHelper::setDiagramPositioningMode( const uno::Reference< - chart2::XDiagram > & xDiagram, DiagramPositioningMode eMode ) -{ - bool bChanged = false; - uno::Reference< beans::XPropertySet > xDiaProps( xDiagram, uno::UNO_QUERY ); - if( !xDiaProps.is() ) - return bChanged; - - bool bOld = false; - xDiaProps->getPropertyValue(C2U("PosSizeExcludeAxes")) >>= bOld; - bool bNew = bOld; - - if( eMode == DiagramPositioningMode_AUTO ) - { - - RelativePosition aPos; - if( (xDiaProps->getPropertyValue(C2U("RelativePosition") ) >>= aPos) ) - bChanged = true; - if( !bChanged ) - { - RelativeSize aSize; - if( (xDiaProps->getPropertyValue(C2U("RelativeSize") ) >>= aSize) ) - bChanged = true; - } - - if( bChanged ) - { - xDiaProps->setPropertyValue(C2U("RelativePosition"), uno::Any() ); - xDiaProps->setPropertyValue(C2U("RelativeSize"), uno::Any() ); - } - } - else if( eMode == DiagramPositioningMode_EXCLUDING ) - { - bNew = true; - bChanged = (bNew!=bOld); - if(bChanged) - xDiaProps->setPropertyValue(C2U("PosSizeExcludeAxes"), uno::makeAny(bNew) ); - } - else if( eMode == DiagramPositioningMode_INCLUDING) - { - bNew = false; - bChanged = (bNew!=bOld); - if(bChanged) - xDiaProps->setPropertyValue(C2U("PosSizeExcludeAxes"), uno::makeAny(bNew) ); - } - return bChanged; -} - void lcl_ensureRange0to1( double& rValue ) { if(rValue<0.0) @@ -1496,6 +1448,8 @@ void lcl_ensureRange0to1( double& rValue ) bool DiagramHelper::setDiagramPositioning( const uno::Reference< frame::XModel >& xChartModel, const awt::Rectangle& rPosRect /*100th mm*/ ) { + ControllerLockGuard aCtrlLockGuard( xChartModel ); + bool bChanged = false; awt::Size aPageSize( ChartModelHelper::getPageSize(xChartModel) ); uno::Reference< beans::XPropertySet > xDiaProps( ChartModelHelper::findDiagram( xChartModel ), uno::UNO_QUERY ); diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx index 222345f016e4..d8f997d36da9 100644 --- a/chart2/source/view/main/ChartItemPool.cxx +++ b/chart2/source/view/main/ChartItemPool.cxx @@ -67,13 +67,6 @@ ChartItemPool::ChartItemPool(): 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_DIAGRAM_POS_MODE - SCHATTR_START] = new SfxInt32Item( SCHATTR_DIAGRAM_POS_MODE,0 ); - ppPoolDefaults[SCHATTR_DIAGRAM_RECT_TO_USE - SCHATTR_START] = new SfxRectangleItem( SCHATTR_DIAGRAM_RECT_TO_USE, Rectangle(0,0,100,100) ); - ppPoolDefaults[SCHATTR_DIAGRAM_RECT_INCLUDING - SCHATTR_START] = new SfxRectangleItem( SCHATTR_DIAGRAM_RECT_INCLUDING, Rectangle(0,0,100,100) ); - ppPoolDefaults[SCHATTR_DIAGRAM_RECT_EXCLUDING - SCHATTR_START] = new SfxRectangleItem( SCHATTR_DIAGRAM_RECT_EXCLUDING, Rectangle(0,0,100,100) ); - ppPoolDefaults[SCHATTR_DIAGRAM_RECT_MAX - SCHATTR_START] = new SfxRectangleItem( SCHATTR_DIAGRAM_RECT_MAX, Rectangle(0,0,100,100) ); - ppPoolDefaults[SCHATTR_DIAGRAM_UI_SCALE - SCHATTR_START] = new SvxDoubleItem(1.0, SCHATTR_DIAGRAM_UI_SCALE); - // 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/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index d36c20837f95..534c24cae1ad 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -72,12 +72,15 @@ #include #include #include +#include #include #include #include #include +#include +#include #include #include #include @@ -314,7 +317,7 @@ uno::Any SAL_CALL ChartView::getTransferData( const datatransfer::DataFlavor& aF if( ! (bHighContrastMetaFile || aFlavor.MimeType.equals(lcl_aGDIMetaFileMIMEType)) ) return aRet; - impl_updateView(); + update(); SvMemoryStream aStream( 1024, 1024 ); utl::OStreamWrapper* pStreamWrapper = new utl::OStreamWrapper( aStream ); @@ -2815,17 +2818,6 @@ void ChartView::impl_updateView() //create chart view { - /* - ::vos::OGuard aGuard( Application::GetSolarMutex()); - while( m_bViewDirty ) - { - createShapes(); - m_bViewDirty = m_bViewUpdatePending; - m_bViewUpdatePending = false; - m_bInViewUpdate = false; - } - */ - m_bViewDirty = false; m_bViewUpdatePending = false; createShapes(); @@ -2991,6 +2983,33 @@ void SAL_CALL ChartView::removeModeChangeApproveListener( const uno::Reference< void SAL_CALL ChartView::update() throw (uno::RuntimeException) { impl_updateView(); + + //#i100778# migrate all imported or old documents to a plot area sizing exclusive axes (in case the save settings allow for this): + //Although in general it is a bad idea to change the model from within the view this is exceptionally the best place to do this special conversion. + //When a view update is requested (what happens for creating the metafile or displaying + //the chart in edit mode or printing) it is most likely that all necessary informations are available - like the underlying spreadsheet data for example. + //Those data is important for the correct axis lable sizes which are needed during conversion. + const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); + if( nCurrentODFVersion == SvtSaveOptions::ODFVER_LATEST )//#i100778# todo: change this dependent on fileformat evolution + { + uno::Reference< ::com::sun::star::chart::XChartDocument > xOldDoc( m_xChartModel, uno::UNO_QUERY ) ; + if( xOldDoc.is() ) + { + uno::Reference< ::com::sun::star::chart::XDiagramPositioning > xDiagramPositioning( xOldDoc->getDiagram(), uno::UNO_QUERY ); + if( xDiagramPositioning.is() && !xDiagramPositioning->isAutomaticDiagramPositioning() && !xDiagramPositioning->isExcludingDiagramPositioning() ) + { + { + ControllerLockGuard aCtrlLockGuard( m_xChartModel ); + uno::Reference< util::XModifiable > xModifiable( m_xChartModel, uno::UNO_QUERY ); + bool bModelWasModified = xModifiable.is() && xModifiable->isModified(); + xDiagramPositioning->setDiagramPositionExcludingAxes( xDiagramPositioning->calculateDiagramPositionExcludingAxes() ); + if(!bModelWasModified && xModifiable.is() ) + xModifiable->setModified(sal_False); + } + impl_updateView(); + } + } + } } // ____ XPropertySet ____ -- cgit v1.2.3 From e5fca8fd92fed0b7b719645c461ffe89401ff62a Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 5 May 2010 18:16:33 +0200 Subject: chartpositioning: #i100778# simplify user interface: reduce sizing options to new excluding mode only --- xmloff/inc/xmloff/xmltoken.hxx | 1 - xmloff/source/chart/SchXMLExport.cxx | 16 ++++-------- xmloff/source/chart/SchXMLPlotAreaContext.cxx | 35 ++++++++++----------------- xmloff/source/chart/SchXMLPlotAreaContext.hxx | 6 ++--- xmloff/source/core/xmltoken.cxx | 1 - 5 files changed, 21 insertions(+), 38 deletions(-) diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 60e8d054ac8e..06b057a3e91d 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3099,7 +3099,6 @@ namespace xmloff { namespace token { XML_NP_CHART_EXT, XML_N_CHART_EXT, XML_COORDINATE_REGION, - XML_PREFER_COORDINATE_REGION, XML_TOKEN_END }; diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 9f0653cd44d9..03ef351b2047 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -199,7 +199,7 @@ public: const ::com::sun::star::awt::Size & rPageSize, sal_Bool bExportContent, sal_Bool bIncludeTable ); - void exportExcludingPosition( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram >& xDiagram ); + void exportCoordinateRegion( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram >& xDiagram ); void exportAxes( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > & xDiagram, const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, sal_Bool bExportContent ); @@ -1921,7 +1921,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( pElPlotArea = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_PLOT_AREA, sal_True, sal_True ); //inner position rectangle element - exportExcludingPosition( xDiagram ); + exportCoordinateRegion( xDiagram ); // light sources (inside plot area element) if( bIs3DChart && @@ -2083,12 +2083,12 @@ void SchXMLExportHelper_Impl::exportPlotArea( delete pElPlotArea; } -void SchXMLExportHelper_Impl::exportExcludingPosition( const uno::Reference< chart::XDiagram >& xDiagram ) +void SchXMLExportHelper_Impl::exportCoordinateRegion( const uno::Reference< chart::XDiagram >& xDiagram ) { const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older return; - if( nCurrentODFVersion != SvtSaveOptions::ODFVER_LATEST )//export only if extensions are enabled //todo: change this dependent on fileformat evolution + if( nCurrentODFVersion != SvtSaveOptions::ODFVER_LATEST )//export only if extensions are enabled //#i100778# todo: change this dependent on fileformat evolution return; Reference< chart::XDiagramPositioning > xDiaPos( xDiagram, uno::UNO_QUERY ); @@ -2100,13 +2100,7 @@ void SchXMLExportHelper_Impl::exportExcludingPosition( const uno::Reference< cha addPosition( awt::Point(aRect.X,aRect.Y) ); addSize( awt::Size(aRect.Width,aRect.Height) ); - sal_Bool bPreferExcludingPositioning = xDiaPos->isExcludingDiagramPositioning(); - rtl::OUStringBuffer sStringBuffer; - SvXMLUnitConverter::convertBool( sStringBuffer, bPreferExcludingPositioning ); - String aString( sStringBuffer.makeStringAndClear() ); - mrExport.AddAttribute( XML_NAMESPACE_CHART_EXT, XML_PREFER_COORDINATE_REGION, aString );//todo: change to chart namespace in future - dependent on fileformat - - SvXMLElementExport aExcludingPosition( mrExport, XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, sal_True, sal_True );//todo: change to chart namespace in future - dependent on fileformat + SvXMLElementExport aCoordinateRegion( mrExport, XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, sal_True, sal_True );//#i100778# todo: change to chart namespace in future - dependent on fileformat } void SchXMLExportHelper_Impl::exportAxes( diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 75fc4b2b5cdb..011e9228612e 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -523,7 +523,7 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( case XML_TOK_PA_COORDINATE_REGION_EXT: case XML_TOK_PA_COORDINATE_REGION: { - pContext = new SchXMLExcludingPositionContext( GetImport(), nPrefix, rLocalName, m_aInnerPositioning ); + pContext = new SchXMLCoordinateRegionContext( GetImport(), nPrefix, rLocalName, m_aInnerPositioning ); } break; @@ -694,20 +694,17 @@ void SchXMLPlotAreaContext::EndElement() uno::Reference< chart::XDiagramPositioning > xDiaPos( mxDiagram, uno::UNO_QUERY ); if( xDiaPos.is()) { - bool bOuterSize = m_aOuterPositioning.hasPosSize() && !m_aOuterPositioning.isAutomatic(); - if( m_aInnerPositioning.hasPosSize() ) + if( !m_aOuterPositioning.isAutomatic() ) { - if( !m_aInnerPositioning.isAutomatic() ) + if( m_aInnerPositioning.hasPosSize() ) xDiaPos->setDiagramPositionExcludingAxes( m_aInnerPositioning.getRectangle() ); - else if( bOuterSize ) - xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() ); - } - else if( bOuterSize ) - { - if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_3( GetImport().GetModel() ) ) //old version of OOo did write a wrong rectangle for the diagram size - xDiaPos->setDiagramPositionIncludingAxesAndAxisTitles( m_aOuterPositioning.getRectangle() ); - else - xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() ); + else if( m_aOuterPositioning.hasPosSize() ) + { + if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_3( GetImport().GetModel() ) ) //old version of OOo did write a wrong rectangle for the diagram size + xDiaPos->setDiagramPositionIncludingAxesAndAxisTitles( m_aOuterPositioning.getRectangle() ); + else + xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() ); + } } } @@ -1744,12 +1741,6 @@ bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix else bReturn = false; } - else if( IsXMLToken( rLocalName, XML_PREFER_COORDINATE_REGION ) ) - { - sal_Bool bPreferExcludingPosition = false; - m_rImport.GetMM100UnitConverter().convertBool( bPreferExcludingPosition, rValue ); - m_bAutoPosition = m_bAutoSize = !bPreferExcludingPosition; - } else bReturn = false; @@ -1771,7 +1762,7 @@ void SchXMLPositonAttributesHelper::readAutomaticPositioningProperties( XMLPropS // ======================================== -SchXMLExcludingPositionContext::SchXMLExcludingPositionContext( +SchXMLCoordinateRegionContext::SchXMLCoordinateRegionContext( SvXMLImport& rImport , sal_uInt16 nPrefix , const rtl::OUString& rLocalName @@ -1781,11 +1772,11 @@ SchXMLExcludingPositionContext::SchXMLExcludingPositionContext( { } -SchXMLExcludingPositionContext::~SchXMLExcludingPositionContext() +SchXMLCoordinateRegionContext::~SchXMLCoordinateRegionContext() { } -void SchXMLExcludingPositionContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) +void SchXMLCoordinateRegionContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { // parse attributes sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index cb986d7e7a3d..1f0de466dcb1 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -251,15 +251,15 @@ public: // ---------------------------------------- -class SchXMLExcludingPositionContext : public SvXMLImportContext +class SchXMLCoordinateRegionContext : public SvXMLImportContext { public: - SchXMLExcludingPositionContext( + SchXMLCoordinateRegionContext( SvXMLImport& rImport , sal_uInt16 nPrefix , const rtl::OUString& rLocalName , SchXMLPositonAttributesHelper& rPositioning ); - virtual ~SchXMLExcludingPositionContext(); + virtual ~SchXMLCoordinateRegionContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); private: diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 2ee9176bb080..2af9966bc351 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3099,7 +3099,6 @@ namespace xmloff { namespace token { TOKEN( "chartooo", XML_NP_CHART_EXT ), TOKEN( "http://openoffice.org/2010/chart", XML_N_CHART_EXT ), TOKEN( "coordinate-region", XML_COORDINATE_REGION ), - TOKEN( "prefer-coordinate-region", XML_PREFER_COORDINATE_REGION ), #if OSL_DEBUG_LEVEL > 0 { 0, NULL, NULL, XML_TOKEN_END } -- cgit v1.2.3 From 770b45622ec89c3fe430f379a05737841e979bdd Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Thu, 6 May 2010 09:01:43 +0200 Subject: #i11054# #i111272# fix graphite line breaking and expanded/condensed text (thanks kstribley) --- vcl/inc/vcl/graphite_cache.hxx | 19 +-- vcl/inc/vcl/graphite_layout.hxx | 9 ++ vcl/source/glyphs/graphite_layout.cxx | 227 ++++++++++++++++++++++++++-------- 3 files changed, 194 insertions(+), 61 deletions(-) diff --git a/vcl/inc/vcl/graphite_cache.hxx b/vcl/inc/vcl/graphite_cache.hxx index eba5109c7446..5472b32dd62f 100644 --- a/vcl/inc/vcl/graphite_cache.hxx +++ b/vcl/inc/vcl/graphite_cache.hxx @@ -127,7 +127,7 @@ public: } m_segMap.clear(); }; - GrSegRecord * getSegment(ImplLayoutArgs & layoutArgs, bool bIsRtl) + GrSegRecord * getSegment(ImplLayoutArgs & layoutArgs, bool bIsRtl, int segCharLimit) { GrSegRecord * found = NULL; // try to find a segment starting at correct place, if not, try to find a @@ -152,8 +152,6 @@ public: if (found->m_seg->startCharacter() <= layoutArgs.mnMinCharPos && found->m_seg->stopCharacter() >= layoutArgs.mnEndCharPos) { - const size_t seg_char_limit = min(layoutArgs.mnLength, layoutArgs.mnEndCharPos - + GraphiteLayout::EXTRA_CONTEXT_LENGTH); DBG_ASSERT(found && found->m_seg, "null entry in GraphiteSegmentCache"); // restore original start character, in case it has changed found->m_seg->setTextSourceOffset(found->m_startChar); @@ -161,7 +159,7 @@ public: // interest // We could use substr and ==, but substr does a copy, // so its probably faster to do it like this - for (size_t i = layoutArgs.mnMinCharPos; i < seg_char_limit; i++) + for (int i = layoutArgs.mnMinCharPos; i < segCharLimit; i++) { //if (!found->m_rope->match(rtl::OUString(layoutArgs.mpStr[i], layoutArgs.mnLength), i - found->m_seg->startCharacter())) if (found->m_rope->getStr()[i-found->m_seg->startCharacter()] != layoutArgs.mpStr[i]) @@ -171,6 +169,15 @@ public: { return NULL; } + if (found->m_seg->stopCharacter() > layoutArgs.mnEndCharPos && + static_cast(found->char2BaseGlyph().size()) > layoutArgs.mnEndCharPos) + { + // check that the requested end character isn't mid cluster + if (found->char2BaseGlyph()[layoutArgs.mnEndCharPos-layoutArgs.mnMinCharPos] == -1) + { + return NULL; + } + } // if (found->m_lockCount != 0) // OutputDebugString("Multple users of SegRecord!"); found->m_lockCount++; @@ -183,10 +190,8 @@ public: // this is expecially needed when editing a large paragraph // each edit changes the pointers, but if we don't reuse any segments it gets very // slow. - const size_t seg_char_limit = min(layoutArgs.mnLength, layoutArgs.mnEndCharPos - + GraphiteLayout::EXTRA_CONTEXT_LENGTH); rtl::OUString * rope = new rtl::OUString(layoutArgs.mpStr + layoutArgs.mnMinCharPos, - seg_char_limit - layoutArgs.mnMinCharPos); + segCharLimit - layoutArgs.mnMinCharPos); if (!rope) return NULL; size_t nHash = (*(rope)).hashCode(); GrRMEntry range = m_ropeMap.equal_range(nHash); diff --git a/vcl/inc/vcl/graphite_layout.hxx b/vcl/inc/vcl/graphite_layout.hxx index 1fbb11211ca0..520f4620cd90 100644 --- a/vcl/inc/vcl/graphite_layout.hxx +++ b/vcl/inc/vcl/graphite_layout.hxx @@ -75,6 +75,14 @@ namespace grutils { class GrFeatureParser; } class VCL_DLLPUBLIC GraphiteLayout : public SalLayout { public: + // Mask to allow Word break status to be stored within mvChar2BaseGlyph + enum { + WORD_BREAK_BEFORE = 0x40000000, + HYPHEN_BREAK_BEFORE = 0x80000000, + BREAK_MASK = 0xC0000000, + GLYPH_INDEX_MASK = 0x3FFFFFFF + } LineBreakMask; + class Glyphs : public std::vector { public: @@ -159,6 +167,7 @@ private: std::pair glyph_to_chars(const GlyphItem &) const; std::pair caret_positions(size_t) const; + void expandOrCondense(ImplLayoutArgs &rArgs); }; diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 6e75d1fde868..a0aa20a73fde 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -353,6 +353,46 @@ std::pair GraphiteLayout::Glyphs::appendCluster(gr::Segment & rSeg, assert(size() < rGlyph2Char.size()); rChar2Base[nFirstCharInCluster-rArgs.mnMinCharPos] = size(); rGlyph2Char[size()] = nFirstCharInCluster; + + // can we break before this cluster? + // Glyphs may have either a positive or negative breakWeight refering to + // the position after or before the glyph respectively + int nPrevBreakWeight = 0; + if (nFirstGlyphInCluster > 0) + { + nPrevBreakWeight = (iGlyphs.first + (nFirstGlyphInCluster - 1))->breakweight(); + } + int nBreakWeight = aFirstGlyph.breakweight(); + if (nBreakWeight < 0) + { + // negative means it applies to the position before the glyph's character + nBreakWeight *= -1; + if (nPrevBreakWeight > 0 && nPrevBreakWeight < nBreakWeight) + { + // prevBreakWeight wins + nBreakWeight = nPrevBreakWeight; + } + } + else + { + nBreakWeight = 0; + // positive means break after + if (nPrevBreakWeight > 0) + nBreakWeight = nPrevBreakWeight; + } + if (nBreakWeight > gr::klbNoBreak/*0*/ && + // nBreakWeight <= gr::klbHyphenBreak) // uses Graphite hyphenation + nBreakWeight <= gr::klbLetterBreak) // Needed for issue 111272 + { + if (nBreakWeight < gr::klbHyphenBreak) + rChar2Base[nFirstCharInCluster-rArgs.mnMinCharPos] |= WORD_BREAK_BEFORE; + else + rChar2Base[nFirstCharInCluster-rArgs.mnMinCharPos] |= HYPHEN_BREAK_BEFORE; + } + // always allow a break before a space even if graphite doesn't + if (rArgs.mpStr[nFirstCharInCluster] == 0x20) + rChar2Base[nFirstCharInCluster-rArgs.mnMinCharPos] |= WORD_BREAK_BEFORE; + bool bBaseGlyph = true; for (int j = nFirstGlyphInCluster; j != nNextGlyph; j += nDelta) @@ -409,7 +449,7 @@ std::pair GraphiteLayout::Glyphs::appendCluster(gr::Segment & rSeg, } } #ifdef GRLAYOUT_DEBUG - fprintf(grLog(),"Cluster g[%d-%d) c[%d-%d)%x x%ld y%f\n", nFirstGlyphInCluster, nNextGlyph, nFirstCharInCluster, nNextChar, rArgs.mpStr[nFirstCharInCluster], nXPos, aFirstGlyph.yOffset()); + fprintf(grLog(),"Cluster g[%d-%d) c[%d-%d)%x x%ld y%f bw%d\n", nFirstGlyphInCluster, nNextGlyph, nFirstCharInCluster, nNextChar, rArgs.mpStr[nFirstCharInCluster], nXPos, aFirstGlyph.yOffset(), nBreakWeight); #endif return aBounds; } @@ -641,6 +681,19 @@ gr::Segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs) if (bRtl && (mrFont.getSupportedScriptDirections() & gr::kfsdcHorizRtl)) maLayout.setRightToLeft(bRtl); + // Context is often needed beyond the specified end, however, we don't + // want it if there has been a direction change, since it is hard + // to tell between reordering within one direction and multi-directional + // text. Extra context, can also cause problems with ligatures stradling + // a hyphenation point, so disable if CTL is disabled. + const int nSegCharLimit = min(rArgs.mnLength, mnEndCharPos + EXTRA_CONTEXT_LENGTH); + int limit = rArgs.mnEndCharPos; + if ((nSegCharLimit > limit) && !(SAL_LAYOUT_COMPLEX_DISABLED & rArgs.mnFlags)) + { + limit += findSameDirLimit(rArgs.mpStr + rArgs.mnEndCharPos, + nSegCharLimit - rArgs.mnEndCharPos, bRtl); + } + #ifdef GRCACHE GrFontHasher hasher(mrFont); sal_Int32 aFontHash = hasher.hashCode(mpFeatures); @@ -648,7 +701,7 @@ gr::Segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs) (GraphiteCacheHandler::instance).getCache(aFontHash); if (pCache) { - *pSegRecord = pCache->getSegment(rArgs, bRtl); + *pSegRecord = pCache->getSegment(rArgs, bRtl, nSegCharLimit); if (*pSegRecord) { pSegment = (*pSegRecord)->getSegment(); @@ -667,18 +720,6 @@ gr::Segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs) } #endif - // Context is often needed beyond the specified end, however, we don't - // want it if there has been a direction change, since it is hard - // to tell between reordering within one direction and multi-directional - // text. - const int segCharLimit = min(rArgs.mnLength, mnEndCharPos + EXTRA_CONTEXT_LENGTH); - int limit = rArgs.mnEndCharPos; - if (segCharLimit > limit) - { - limit += findSameDirLimit(rArgs.mpStr + rArgs.mnEndCharPos, - segCharLimit - rArgs.mnEndCharPos, bRtl); - } - // Create a new TextSource object for the engine. mpTextSrc = new TextSourceAdaptor(rArgs, limit); if (mpFeatures) mpTextSrc->setFeatures(mpFeatures); @@ -795,27 +836,35 @@ bool GraphiteLayout::LayoutGlyphs(ImplLayoutArgs& rArgs, gr::Segment * pSegment) int GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int factor) const { - // Adjust maxmnWidth so FindNextBreakPoint returns a sensible answer. - maxmnWidth -= (mnEndCharPos-mnMinCharPos-1)*char_extra; // extra character spacing. - maxmnWidth /= factor; // scaling factor. +#ifdef GRLAYOUT_DEBUG + fprintf(grLog(),"Gr::GetTextBreak c[%d-%d) maxWidth %ld char extra %ld factor %d\n", + mnMinCharPos, mnEndCharPos, maxmnWidth, char_extra, factor); +#endif - // Ask the segment for the nearest whole letter break for the width. - //float width; - float targetWidth = maxmnWidth/mfScaling; // return quickly if this segment is narrower than the target width - // (sometimes graphite doesn't seem to realise this!) - if (targetWidth > mnWidth) + if (maxmnWidth > mnWidth * factor + char_extra * (mnEndCharPos - mnMinCharPos - 1)) return STRING_LEN; - //int nBreak = mpSegment->findNextBreakPoint(mnMinCharPos, - // gr::klbWordBreak, gr::klbLetterBreak, targetWidth, &width); - // LineFillSegment seems to give better results that findNextBreakPoint - // though it may be slower - gr::LayoutEnvironment aLE; - gr::LineFillSegment lineSeg(const_cast(&mrFont), mpTextSrc, &aLE, - mnMinCharPos, mpTextSrc->getContextLength(), - targetWidth); - int nBreak = lineSeg.stopCharacter(); + long nWidth = mvCharDxs[0] * factor; + int nLastBreak = -1; + for (size_t i = 1; i < mvCharDxs.size(); i++) + { + nWidth += char_extra; + if (nWidth > maxmnWidth) break; + if (mvChar2BaseGlyph[i] != -1) + { + if (mvChar2BaseGlyph[i] & (WORD_BREAK_BEFORE | HYPHEN_BREAK_BEFORE)) + nLastBreak = static_cast(i); + } + nWidth += (mvCharDxs[i] - mvCharDxs[i-1]) * factor; + } + int nBreak = mnMinCharPos; + if (nLastBreak > -1) + nBreak += nLastBreak; + +#ifdef GRLAYOUT_DEBUG + fprintf(grLog(), "Gr::GetTextBreak break after %d\n", nBreak - mnMinCharPos); +#endif if (nBreak > mnEndCharPos) nBreak = STRING_LEN; else if (nBreak < mnMinCharPos) nBreak = mnMinCharPos; @@ -833,9 +882,10 @@ long GraphiteLayout::FillDXArray( sal_Int32* pDXArray ) const { for (size_t i = 0; i < mvCharDxs.size(); i++) { - assert((mvChar2BaseGlyph[i] >= -1) && (mvChar2BaseGlyph[i] < (signed)mvGlyphs.size())); + assert((mvChar2BaseGlyph[i] >= -1) && + ((mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK) < (signed)mvGlyphs.size())); if (mvChar2BaseGlyph[i] != -1 && - mvGlyphs[mvChar2BaseGlyph[i]].mnGlyphIndex == GF_DROPPED) + mvGlyphs[mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK].mnGlyphIndex == GF_DROPPED) { // when used in MultiSalLayout::GetTextBreak dropped glyphs // must have zero width @@ -865,7 +915,6 @@ long GraphiteLayout::FillDXArray( sal_Int32* pDXArray ) const void GraphiteLayout::AdjustLayout(ImplLayoutArgs& rArgs) { SalLayout::AdjustLayout(rArgs); - if(rArgs.mpDXArray) { std::vector vDeltaWidths(mvGlyphs.size(), 0); @@ -894,8 +943,75 @@ void GraphiteLayout::AdjustLayout(ImplLayoutArgs& rArgs) } } } + else if (rArgs.mnLayoutWidth > 0) + { +#ifdef GRLAYOUT_DEBUG + fprintf(grLog(), "AdjustLayout width %ld=>%ld\n", mnWidth, rArgs.mnLayoutWidth); +#endif + expandOrCondense(rArgs); + } } +void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs) +{ + int nDeltaWidth = rArgs.mnLayoutWidth - mnWidth; + if (nDeltaWidth > 0) // expand, just expand between clusters + { + int nClusterCount = 0; + for (size_t j = 0; j < mvGlyphs.size(); j++) + { + if (mvGlyphs[j].IsClusterStart()) + { + ++nClusterCount; + } + } + if (nClusterCount > 1) + { + float fExtraPerCluster = static_cast(nDeltaWidth) / static_cast(nClusterCount - 1); + int nCluster = 0; + int nOffset = 0; + for (size_t i = 0; i < mvGlyphs.size(); i++) + { + if (mvGlyphs[i].IsClusterStart()) + { + nOffset = fExtraPerCluster * nCluster; + size_t nCharIndex = mvGlyph2Char[i]; + mvCharDxs[nCharIndex] += nOffset; + // adjust char dxs for rest of characters in cluster + while (++nCharIndex < mvGlyph2Char.size()) + { + int nChar2Base = (mvChar2BaseGlyph[nCharIndex] == -1)? -1 : mvChar2BaseGlyph[nCharIndex] & GLYPH_INDEX_MASK; + if (nChar2Base == -1 || nChar2Base == static_cast(i)) + mvCharDxs[nCharIndex] += nOffset; + } + ++nCluster; + } + mvGlyphs[i].maLinearPos.X() += nOffset; + } + } + } + else // condense - apply a factor to all glyph positions + { + if (mvGlyphs.size() == 0) return; + Glyphs::iterator iLastGlyph = mvGlyphs.begin() + (mvGlyphs.size() - 1); + // position last glyph using original width + float fXFactor = static_cast(rArgs.mnLayoutWidth - iLastGlyph->mnOrigWidth) / static_cast(iLastGlyph->maLinearPos.X()); +#ifdef GRLAYOUT_DEBUG + fprintf(grLog(), "Condense by factor %f\n", fXFactor); +#endif + iLastGlyph->maLinearPos.X() = rArgs.mnLayoutWidth - iLastGlyph->mnOrigWidth; + Glyphs::iterator iGlyph = mvGlyphs.begin(); + while (iGlyph != iLastGlyph) + { + iGlyph->maLinearPos.X() = static_cast(iGlyph->maLinearPos.X()) * fXFactor; + ++iGlyph; + } + for (size_t i = 0; i < mvCharDxs.size(); i++) + { + mvCharDxs[i] = fXFactor * static_cast(mvCharDxs[i]); + } + } +} void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector & rDeltaWidth) { @@ -917,37 +1033,39 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector & rDelt int nPrevClusterLastChar = -1; for (size_t i = 0; i < nChars; i++) { - if (mvChar2BaseGlyph[i] > -1 && mvChar2BaseGlyph[i] != nPrevClusterGlyph) + int nChar2Base = (mvChar2BaseGlyph[i] == -1)? -1 : mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK; + if ((nChar2Base > -1) && (nChar2Base != nPrevClusterGlyph)) { - assert((mvChar2BaseGlyph[i] > -1) && (mvChar2BaseGlyph[i] < (signed)mvGlyphs.size())); - GlyphItem & gi = mvGlyphs[mvChar2BaseGlyph[i]]; + assert((nChar2Base > -1) && (nChar2Base < (signed)mvGlyphs.size())); + GlyphItem & gi = mvGlyphs[nChar2Base]; if (!gi.IsClusterStart()) continue; // find last glyph of this cluster size_t j = i + 1; int nLastChar = i; - int nLastGlyph = mvChar2BaseGlyph[i]; + int nLastGlyph = nChar2Base; for (; j < nChars; j++) { - assert((mvChar2BaseGlyph[j] >= -1) && (mvChar2BaseGlyph[j] < (signed)mvGlyphs.size())); - if (mvChar2BaseGlyph[j] != -1 && mvGlyphs[mvChar2BaseGlyph[j]].IsClusterStart()) + int nChar2BaseJ = (mvChar2BaseGlyph[j] == -1)? -1 : mvChar2BaseGlyph[j] & GLYPH_INDEX_MASK; + assert((nChar2BaseJ >= -1) && (nChar2BaseJ < (signed)mvGlyphs.size())); + if (nChar2BaseJ != -1 && mvGlyphs[nChar2BaseJ].IsClusterStart()) { - nLastGlyph = mvChar2BaseGlyph[j] + ((bRtl)? 1 : -1); + nLastGlyph = nChar2BaseJ + ((bRtl)? 1 : -1); nLastChar = j - 1; break; } } if (nLastGlyph < 0) { - nLastGlyph = mvChar2BaseGlyph[i]; + nLastGlyph = nChar2Base; } // Its harder to find the last glyph rtl, since the first of // cluster is still on the left so we need to search towards // the previous cluster to the right if (bRtl) { - nLastGlyph = mvChar2BaseGlyph[i]; + nLastGlyph = nChar2Base; while (nLastGlyph + 1 < (signed)mvGlyphs.size() && !mvGlyphs[nLastGlyph+1].IsClusterStart()) { @@ -983,7 +1101,7 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector & rDelt // update glyph positions if (bRtl) { - for (int n = mvChar2BaseGlyph[i]; n <= nLastGlyph; n++) + for (int n = nChar2Base; n <= nLastGlyph; n++) { assert((n > - 1) && (n < (signed)mvGlyphs.size())); mvGlyphs[n].maLinearPos.X() += -nDGlyphOrigin + nXOffset; @@ -991,17 +1109,17 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector & rDelt } else { - for (int n = mvChar2BaseGlyph[i]; n <= nLastGlyph; n++) + for (int n = nChar2Base; n <= nLastGlyph; n++) { assert((n > - 1) && (n < (signed)mvGlyphs.size())); mvGlyphs[n].maLinearPos.X() += nDGlyphOrigin + nXOffset; } } - rDeltaWidth[mvChar2BaseGlyph[i]] = nDWidth; + rDeltaWidth[nChar2Base] = nDWidth; #ifdef GRLAYOUT_DEBUG - fprintf(grLog(),"c%d g%d-%d dW%ld-%ld=%ld dX%ld x%ld\t", (int)i, mvChar2BaseGlyph[i], nLastGlyph, nNewClusterWidth, nOrigClusterWidth, nDWidth, nDGlyphOrigin, mvGlyphs[mvChar2BaseGlyph[i]].maLinearPos.X()); + fprintf(grLog(),"c%d g%d-%d dW%ld-%ld=%ld dX%ld x%ld\t", (int)i, nChar2Base, nLastGlyph, nNewClusterWidth, nOrigClusterWidth, nDWidth, nDGlyphOrigin, mvGlyphs[nChar2Base].maLinearPos.X()); #endif - nPrevClusterGlyph = mvChar2BaseGlyph[i]; + nPrevClusterGlyph = nChar2Base; nPrevClusterLastChar = nLastChar; i = nLastChar; } @@ -1043,7 +1161,7 @@ void GraphiteLayout::kashidaJustify(std::vector& rDeltaWidths, sal_GlyphId continue; } // calculate gap, ignore if too small - int nGapWidth = rDeltaWidths[nOrigGlyphIndex];; + int nGapWidth = rDeltaWidths[nOrigGlyphIndex]; // worst case is one kashida even for mini-gaps if( 3 * nGapWidth < nKashidaWidth ) { @@ -1104,13 +1222,14 @@ void GraphiteLayout::GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray { if (mvChar2BaseGlyph[nCharSlot] != -1) { - assert((mvChar2BaseGlyph[nCharSlot] > -1) && (mvChar2BaseGlyph[nCharSlot] < (signed)mvGlyphs.size())); - GlyphItem gi = mvGlyphs[mvChar2BaseGlyph[nCharSlot]]; + int nChar2Base = mvChar2BaseGlyph[nCharSlot] & GLYPH_INDEX_MASK; + assert((mvChar2BaseGlyph[nCharSlot] > -1) && (nChar2Base < (signed)mvGlyphs.size())); + GlyphItem gi = mvGlyphs[nChar2Base]; if (gi.mnGlyphIndex == GF_DROPPED) { continue; } - int nCluster = mvChar2BaseGlyph[nCharSlot]; + int nCluster = nChar2Base; long origClusterWidth = gi.mnNewWidth; long nMin = gi.maLinearPos.X(); long nMax = gi.maLinearPos.X() + gi.mnNewWidth; @@ -1135,7 +1254,7 @@ void GraphiteLayout::GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray pCaretXArray[i] = nMin; pCaretXArray[i+1] = nMax; } - prevBase = mvChar2BaseGlyph[nCharSlot]; + prevBase = nChar2Base; prevClusterWidth = origClusterWidth; } else if (prevBase > -1) @@ -1268,7 +1387,7 @@ int GraphiteLayout::GetNextGlyphs( int length, sal_GlyphId * glyph_out, #ifdef GRLAYOUT_DEBUG fprintf(grLog(),"GetNextGlyphs g%d c%d x%ld,%ld adv%ld, pos %ld,%ld\n", glyph_slot - 1, - mvGlyph2Char[glyph_slot-1], glyph_itr->maLinearPos.X(), glyph_itr->maLinearPos.Y(), nGlyphAdvance, + GLYPH_INDEX_MASK&mvGlyph2Char[glyph_slot-1], glyph_itr->maLinearPos.X(), glyph_itr->maLinearPos.Y(), nGlyphAdvance, aPosOut.X(), aPosOut.Y()); #endif -- cgit v1.2.3 From 5acd245bc94d176c2ab9692a3351b34e70ad82e7 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 6 May 2010 09:02:51 +0200 Subject: #i111172# method - adjust handling of existing indent in case that the text node is already inside a list. --- sw/source/ui/wrtsh/wrtsh1.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 57e76a9cff61..68eb67e8b219 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -1387,7 +1387,17 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) // <-- if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 ) { - const SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs; + // --> OD 2010-05-05 #i111172# + // If text node is already inside a list, assure that the indents + // are the same. Thus, adjust the indent change value by subtracting + // indents of to be applied list style. + SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs; + if ( pTxtNode->GetNumRule() ) + { + const SwNumFmt aFmt( aNumRule.Get( 0 ) ); + nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent(); + } + // <-- aNumRule.ChangeIndent( nIndentChange ); } } -- cgit v1.2.3 From f7a9e946427e9ba8878c2617362aa4a17d20e490 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 6 May 2010 17:02:44 +0200 Subject: #i103711# - workaround in case that a paragraph only overrules the left indent, but not the first line indent of the applied list style --- sw/source/filter/ww8/ww8par.cxx | 45 +++++++++++++++++++++++++++++----------- sw/source/filter/ww8/ww8par.hxx | 13 ++++++++++-- sw/source/filter/ww8/ww8par3.cxx | 4 +++- sw/source/filter/ww8/ww8par6.cxx | 27 ++++++++++++++++++++++-- 4 files changed, 72 insertions(+), 17 deletions(-) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index a290e8f30790..e1b623b2d5c5 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -844,13 +844,28 @@ long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, return nExtraListIndent > 0 ? nExtraListIndent : 0; } -void SyncIndentWithList(SvxLRSpaceItem &rLR, const SwNumFmt &rFmt) +// --> OD 2010-05-06 #i103711# +void SyncIndentWithList( SvxLRSpaceItem &rLR, + const SwNumFmt &rFmt, + const bool bFirstLineOfstSet ) { - long nWantedFirstLinePos; - long nExtraListIndent = lcl_GetTrueMargin(rLR, rFmt, nWantedFirstLinePos); - rLR.SetTxtLeft(nWantedFirstLinePos - nExtraListIndent); - rLR.SetTxtFirstLineOfst(0); + if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + { + long nWantedFirstLinePos; + long nExtraListIndent = lcl_GetTrueMargin(rLR, rFmt, nWantedFirstLinePos); + rLR.SetTxtLeft(nWantedFirstLinePos - nExtraListIndent); + rLR.SetTxtFirstLineOfst(0); + } + else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + { + if ( !bFirstLineOfstSet && + rFmt.GetFirstLineIndent() != 0 ) + { + rLR.SetTxtFirstLineOfst( rFmt.GetFirstLineIndent() ); + } + } } +// <-- const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos, const SwTxtNode &rTxtNode) @@ -907,16 +922,19 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, pNum = GetNumFmtFromStack(*aRegion.GetPoint(), *pTxtNode); if (!pNum) + { pNum = GetNumFmtFromTxtNode(*pTxtNode); + } - // --> OD 2008-06-03 #i86652# -// if (pNum) - if ( pNum && - pNum->GetPositionAndSpaceMode() == - SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) - // <-- + if ( pNum ) { - SyncIndentWithList(aNewLR, *pNum); + // --> OD 2010-05-06 #i103711# + const bool bFirstLineIndentSet = + ( rReader.maTxtNodesHavingFirstLineOfstSet.end() != + rReader.maTxtNodesHavingFirstLineOfstSet.find( pNode ) ); + SyncIndentWithList( aNewLR, *pNum, + bFirstLineIndentSet ); + // <-- } if (aNewLR == aOldLR) @@ -3185,6 +3203,9 @@ SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage, maGrfNameGenerator(bNewDoc,String('G')), maParaStyleMapper(rD), maCharStyleMapper(rD), + // --> OD 2010-05-06 #i103711# + maTxtNodesHavingFirstLineOfstSet(), + // <-- pMSDffManager(0), mpAtnNames(0), pAuthorInfos(0), diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 099ecca83d6a..15817c1eb2c1 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -956,6 +956,10 @@ private: WW8PLCFMan* pPlcxMan; std::map aLinkStringMap; + // --> OD 2010-05-06 #i103711# + std::set maTxtNodesHavingFirstLineOfstSet; + // <-- + WW8RStyle* pStyles; // Pointer auf die Style-Einleseklasse SwFmt* pAktColl; // gerade zu erzeugende Collection // ( ist ausserhalb einer Style-Def immer 0 ) @@ -1155,7 +1159,10 @@ private: void ImportTox( int nFldId, String aStr ); void EndSprm( USHORT nId ); - void NewAttr( const SfxPoolItem& rAttr ); + // --> OD 2010-05-06 #i103711# + void NewAttr( const SfxPoolItem& rAttr, + const bool bFirstLineOfStSet = false ); + // <-- bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&, rtl_TextEncoding&); @@ -1612,7 +1619,9 @@ public: // eigentlich private, geht aber leider nur public bool CanUseRemoteLink(const String &rGrfName); void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt); void SetStyleIndent(SwWW8StyInf &rStyleInfo, const SwNumFmt &rFmt); -void SyncIndentWithList(SvxLRSpaceItem &rLR, const SwNumFmt &rFmt); +void SyncIndentWithList( SvxLRSpaceItem &rLR, + const SwNumFmt &rFmt, + const bool bFirstLineOfStSet ); long GetListFirstLineIndent(const SwNumFmt &rFmt); String BookmarkToWriter(const String &rBookmark); bool RTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 465d07c0d2b5..9437495439f7 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1697,7 +1697,9 @@ void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt) { SvxLRSpaceItem aLR(ItemGet(*rStyle.pFmt, RES_LR_SPACE)); if (rStyle.bListReleventIndentSet) - SyncIndentWithList(aLR, rFmt); + { + SyncIndentWithList( aLR, rFmt, false ); + } else { aLR.SetTxtLeft(0); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 5c10a7b005bd..210618134280 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2715,7 +2715,8 @@ bool SwWW8ImplReader::TestSameApo(const ApoTestResults &rApo, # Attribut - Verwaltung #**************************************************************************/ -void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr ) +void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, + const bool bFirstLineOfStSet ) { if( !bNoAttrImport ) // zum Ignorieren von Styles beim Doc-Einfuegen { @@ -2725,11 +2726,24 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr ) pAktColl->SetFmtAttr(rAttr); } else if (pAktItemSet) + { pAktItemSet->Put(rAttr); + } else if (rAttr.Which() == RES_FLTR_REDLINE) + { mpRedlineStack->open(*pPaM->GetPoint(), rAttr); + } else + { pCtrlStck->NewAttr(*pPaM->GetPoint(), rAttr); + // --> OD 2010-05-06 #i103711# + if ( bFirstLineOfStSet ) + { + const SwNode* pNd = &(pPaM->GetPoint()->nNode.GetNode()); + maTxtNodesHavingFirstLineOfstSet.insert( pNd ); + } + // <-- + } if (mpPostProcessAttrsInfo && mpPostProcessAttrsInfo->mbCopy) mpPostProcessAttrsInfo->mItemSet.Put(rAttr); @@ -3958,6 +3972,10 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) } } + // --> OD 2010-05-06 #i103711# + bool bFirstLinOfstSet( false ); + // <-- + switch (nId) { //sprmPDxaLeft @@ -3998,7 +4016,10 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) aLR.SetTxtFirstLineOfst(nPara); if (pAktColl) + { pCollA[nAktColl].bListReleventIndentSet = true; + } + bFirstLinOfstSet = true; break; //sprmPDxaRight case 16: @@ -4010,7 +4031,9 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) return; } - NewAttr(aLR); + // --> OD 2010-05-06 #i103711# + NewAttr( aLR, bFirstLinOfstSet ); + // <-- } // Sprm 20 -- cgit v1.2.3 From ec097e0b381b6b9d126d77c47ba89f6da70687a3 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Fri, 7 May 2010 09:30:53 +0200 Subject: #100000# fix compile warning and assertion --- vcl/source/glyphs/graphite_layout.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index a0aa20a73fde..ff2fd8f306b1 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -882,8 +882,8 @@ long GraphiteLayout::FillDXArray( sal_Int32* pDXArray ) const { for (size_t i = 0; i < mvCharDxs.size(); i++) { - assert((mvChar2BaseGlyph[i] >= -1) && - ((mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK) < (signed)mvGlyphs.size())); + assert( (mvChar2BaseGlyph[i] == -1) || + ((signed)(mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK) < (signed)mvGlyphs.size())); if (mvChar2BaseGlyph[i] != -1 && mvGlyphs[mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK].mnGlyphIndex == GF_DROPPED) { -- cgit v1.2.3 From 16953b1821c4cc394942012c9ff74cf6f9380d9e Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 7 May 2010 09:35:48 +0200 Subject: cws tl74: #158766# problem with test tool fixed --- starmath/source/dialog.cxx | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index be866c2e0957..222b02f5cd4a 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1893,10 +1893,17 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton ) // add symbol // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality - const SmSym aSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(), + const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(), sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ), aSymbolSets.GetText() ); - aSymbolMgrCopy.AddOrReplaceSymbol( aSymbol ); + DBG_ASSERT( aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL, "symbol already exists" ); + aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol ); + + // update display of new symbol + aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() ); + aSymbolDisplay.SetFont( aNewSymbol.GetFace() ); + aSymbolName.SetText( aNewSymbol.GetName() ); + aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() ); // update list box entries FillSymbolSets(aOldSymbolSets, FALSE); @@ -1922,17 +1929,26 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton ) //! get font from symbol-disp lay since charset-display does not keep //! the bold attribut. // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality - const SmSym aNewSymbol( aSymbols.GetText(), aSymbolDisplay.GetFont(), + const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(), sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ), aSymbolSets.GetText() ); // remove old symbol if the name was changed then add new one - if (aOldSymbols.GetText() != aSymbols.GetText()) + const bool bSetNameChanged = aOldSymbolSets.GetText() != aSymbolSets.GetText(); + const bool bNameChanged = aOldSymbols.GetText() != aSymbols.GetText(); + if (bNameChanged) aSymbolMgrCopy.RemoveSymbol( aOldSymbols.GetText() ); aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol, true ); - // clear display for original symbol - SetOrigSymbol(NULL, XubString()); + // clear display for original symbol if necessary + if (bNameChanged) + SetOrigSymbol(NULL, XubString()); + + // update display of new symbol + aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() ); + aSymbolDisplay.SetFont( aNewSymbol.GetFace() ); + aSymbolName.SetText( aNewSymbol.GetName() ); + aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() ); // update list box entries FillSymbolSets(aOldSymbolSets, FALSE); @@ -2005,9 +2021,12 @@ void SmSymDefineDialog::UpdateButtons() // aendern wenn bei gleichem Namen mindestens eine Einstellung anders ist // oder wenn es noch kein Symbol des neuen Namens gibt (wuerde implizites // loeschen des bereits vorhandenen Symbols erfordern) - BOOL bEqualName = pOrigSymbol && aTmpSymbolName == pOrigSymbol->GetName(); - bChange = pOrigSymbol && ( (bEqualName && !bEqual) || (!bEqualName && bAdd) ); - } +// BOOL bEqualName = pOrigSymbol && aTmpSymbolName == pOrigSymbol->GetName(); +// bChange = pOrigSymbol && ( (bEqualName && !bEqual) || (!bEqualName && bAdd) ); + + // aendern nur falls altes Symbol vorhanden und am neuen etwas anders ist + bChange = pOrigSymbol && !bEqual; +} aAddBtn .Enable(bAdd); aChangeBtn.Enable(bChange); -- cgit v1.2.3 From 95838cf7eb35c98e0beec89043352eca276df85e Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 7 May 2010 09:38:57 +0200 Subject: cws tl74: #158766# problem with test tool fixed --- starmath/source/dialog.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 222b02f5cd4a..453e265cb46b 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1934,7 +1934,7 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton ) aSymbolSets.GetText() ); // remove old symbol if the name was changed then add new one - const bool bSetNameChanged = aOldSymbolSets.GetText() != aSymbolSets.GetText(); +// const bool bSetNameChanged = aOldSymbolSets.GetText() != aSymbolSets.GetText(); const bool bNameChanged = aOldSymbols.GetText() != aSymbols.GetText(); if (bNameChanged) aSymbolMgrCopy.RemoveSymbol( aOldSymbols.GetText() ); -- cgit v1.2.3 From 992e939b91b536886d31be16bf5b0d303b35a290 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Fri, 7 May 2010 12:58:00 +0200 Subject: #100000# fix compile for case sensitive wntmsci12 --- solenv/config/sdev300.ini | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index 878ae45c99f0..9e50b42e4395 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -2893,7 +2893,7 @@ wntmsci12 NSIS_PATH %SOL_TMP%$/r$/NSIS_242_unicode PCLEAN_PATH %SOLARROOT%$/etw PERL %SOL_TMP%$/r$/%PERLDIR% - PSDK %SOL_TMP%$/r$/msvc9p$/PlatformSDK$/V6.1 + PSDK %SOL_TMP%$/r$/msvc9p$/PlatformSDK$/v6.1 SHARED_COM_SDK_PATH %SOL_TMP%$/r$/msvc9p$/Common7$/IDE SOLARENV %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%$/solenv SOLARROOT %SOL_TMP%$/r @@ -2916,7 +2916,7 @@ wntmsci12 NSIS_PATH %SOL_TMP%$/r$/NSIS_242_unicode PCLEAN_PATH %SOL_TMP%$/r$/etw PERL %SOL_TMP%$/r$/%PERLDIR% - PSDK %COMPATH%$/PlatformSDK$/V6.1 + PSDK %COMPATH%$/PlatformSDK$/v6.1 SHARED_COM_SDK_PATH %COMPATH%$/Common7$/IDE SOLARENV %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%$/solenv SOLARROOT %SOL_TMP%$/r @@ -2991,7 +2991,7 @@ wntmsci12 NSIS_PATH %SOLAR_ENV_ROOT%$/NSIS_242_unicode PERL %SOLAR_ENV_ROOT%$/%PERLDIR% PKGFORMAT msi - PSDK %SOLAR_ENV_ROOT%$/msvc9p$/PlatformSDK$/V6.1 + PSDK %SOLAR_ENV_ROOT%$/msvc9p$/PlatformSDK$/v6.1 SHARED_COM_SDK_PATH %SOLAR_ENV_ROOT%$/msvc9p$/Common7$/ide SHARED_SOLARENV %SOLAR_SOURCE_ROOT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%$/solenv SHARED_SOLARVERSION %SOLAR_SOURCE_ROOT%$/%WORK_STAMP% @@ -3235,7 +3235,7 @@ wntmsci13 NSIS_PATH %SOL_TMP%$/r$/NSIS_242_unicode PCLEAN_PATH %SOLARROOT%$/etw PERL %SOL_TMP%$/r$/%PERLDIR% - PSDK %SOL_TMP%$/r$/msvc9p$/PlatformSDK$/V6.1 + PSDK %SOL_TMP%$/r$/msvc9p$/PlatformSDK$/v6.1 SHARED_COM_SDK_PATH %SOL_TMP%$/r$/msvc9p$/Common7$/IDE SOLARENV %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%$/solenv SOLARROOT %SOL_TMP%$/r @@ -3258,7 +3258,7 @@ wntmsci13 NSIS_PATH %SOL_TMP%$/r$/NSIS_242_unicode PCLEAN_PATH %SOL_TMP%$/r$/etw PERL %SOL_TMP%$/r$/%PERLDIR% - PSDK %COMPATH%$/PlatformSDK$/V6.1 + PSDK %COMPATH%$/PlatformSDK$/v6.1 SHARED_COM_SDK_PATH %COMPATH%$/Common7$/IDE SOLARENV %SOL_TMP%$/o%CWS_WORK_STAMP_EXT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%$/solenv SOLARROOT %SOL_TMP%$/r @@ -3333,7 +3333,7 @@ wntmsci13 NSIS_PATH %SOLAR_ENV_ROOT%$/NSIS_242_unicode PERL %SOLAR_ENV_ROOT%$/%PERLDIR% PKGFORMAT msi - PSDK %SOLAR_ENV_ROOT%$/msvc9p$/PlatformSDK$/V6.1 + PSDK %SOLAR_ENV_ROOT%$/msvc9p$/PlatformSDK$/v6.1 SHARED_COM_SDK_PATH %SOLAR_ENV_ROOT%$/msvc9p$/Common7$/ide SHARED_SOLARENV %SOLAR_SOURCE_ROOT%$/%WORK_STAMP%$/ooo%UPDMINOREXT%$/solenv SHARED_SOLARVERSION %SOLAR_SOURCE_ROOT%$/%WORK_STAMP% -- cgit v1.2.3 From e0a1128c4b13e2f32a76e0b5f55839b705798da0 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 10 May 2010 16:30:45 +0200 Subject: chartpositioning: #i100778# switch to manual positioning if shapes are added via user interface --- chart2/source/controller/main/ChartController.hxx | 2 ++ .../controller/main/ChartController_Tools.cxx | 15 ++++++++++ .../controller/main/ChartController_Window.cxx | 1 + chart2/source/inc/DiagramHelper.hxx | 5 ++++ chart2/source/tools/DiagramHelper.cxx | 35 +++++++++++++++++++++- chart2/source/view/main/ChartView.cxx | 26 ++-------------- 6 files changed, 59 insertions(+), 25 deletions(-) diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx index 8deffe47396f..81f4ba5a549e 100644 --- a/chart2/source/controller/main/ChartController.hxx +++ b/chart2/source/controller/main/ChartController.hxx @@ -725,6 +725,8 @@ private: void impl_SetMousePointer( const MouseEvent & rEvent ); void impl_ClearSelection(); + + void impl_switchDiagramPositioningToExcludingPositioning(); }; //............................................................................. diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index be9bc092ba4c..11fa5e74054e 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -50,6 +50,7 @@ #include "RegressionCurveHelper.hxx" #include "ShapeController.hxx" #include "DiagramHelper.hxx" +#include "ObjectNameProvider.hxx" #include #include @@ -469,6 +470,8 @@ void ChartController::impl_PasteShapes( SdrModel* pModel ) m_aSelection.applySelection( m_pDrawViewWrapper ); m_pDrawViewWrapper->EndUndo(); + + impl_switchDiagramPositioningToExcludingPositioning(); } } } @@ -515,6 +518,8 @@ void ChartController::impl_PasteStringAsTextShape( const OUString& rString, cons m_pDrawViewWrapper->BegUndo( SVX_RESSTR( RID_SVX_3D_UNDO_EXCHANGE_PASTE ) ); m_pDrawViewWrapper->AddUndo( new SdrUndoInsertObj( *pObj ) ); m_pDrawViewWrapper->EndUndo(); + + impl_switchDiagramPositioningToExcludingPositioning(); } } catch ( const uno::Exception& ex ) @@ -903,4 +908,14 @@ void ChartController::impl_ShapeControllerDispatch( const util::URL& rURL, const } } +void ChartController::impl_switchDiagramPositioningToExcludingPositioning() +{ + UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( + ActionDescriptionProvider::POS_SIZE, + ObjectNameProvider::getName( OBJECTTYPE_DIAGRAM)), + m_xUndoManager, m_aModel->getModel() ); + if( DiagramHelper::switchDiagramPositioningToExcludingPositioning( m_aModel->getModel(), true, true ) ) + aUndoGuard.commitAction(); +} + } // namespace chart diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 176d38aa5fc3..91531683f7c5 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -796,6 +796,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) if ( m_eDrawMode == CHARTDRAW_INSERT && pDrawViewWrapper->IsCreateObj() ) { pDrawViewWrapper->EndCreateObj( SDRCREATE_FORCEEND ); + impl_switchDiagramPositioningToExcludingPositioning(); if ( pDrawViewWrapper->AreObjectsMarked() ) { if ( pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT ) diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx index 1886609d8600..c7cda6189680 100644 --- a/chart2/source/inc/DiagramHelper.hxx +++ b/chart2/source/inc/DiagramHelper.hxx @@ -333,6 +333,11 @@ public: static ::com::sun::star::awt::Rectangle getDiagramRectangleFromModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel ); + static bool switchDiagramPositioningToExcludingPositioning( const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel >& xChartModel + , bool bResetModifiedState //set model back to unchanged if it was unchanged before + , bool bConvertAlsoFromAutoPositioning ); + private: // not implemented DiagramHelper(); diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index a71daa4139eb..4ce623ae460c 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -44,6 +44,8 @@ #include "ControllerLockGuard.hxx" #include +#include +#include #include #include #include @@ -54,10 +56,12 @@ #include #include #include -#include +#include #include +#include + using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; using namespace ::std; @@ -1521,4 +1525,33 @@ awt::Rectangle DiagramHelper::getDiagramRectangleFromModel( const uno::Reference return aRet; } +//static +bool DiagramHelper::switchDiagramPositioningToExcludingPositioning( + const uno::Reference< frame::XModel >& xChartModel + , bool bResetModifiedState, bool bConvertAlsoFromAutoPositioning ) +{ + //return true if something was changed + const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); + if( nCurrentODFVersion == SvtSaveOptions::ODFVER_LATEST )//#i100778# todo: change this dependent on fileformat evolution + { + uno::Reference< ::com::sun::star::chart::XChartDocument > xOldDoc( xChartModel, uno::UNO_QUERY ) ; + if( xOldDoc.is() ) + { + uno::Reference< ::com::sun::star::chart::XDiagramPositioning > xDiagramPositioning( xOldDoc->getDiagram(), uno::UNO_QUERY ); + if( xDiagramPositioning.is() && ( bConvertAlsoFromAutoPositioning || !xDiagramPositioning->isAutomaticDiagramPositioning() ) + && !xDiagramPositioning->isExcludingDiagramPositioning() ) + { + ControllerLockGuard aCtrlLockGuard( xChartModel ); + uno::Reference< util::XModifiable > xModifiable( xChartModel, uno::UNO_QUERY ); + bool bModelWasModified = xModifiable.is() && xModifiable->isModified(); + xDiagramPositioning->setDiagramPositionExcludingAxes( xDiagramPositioning->calculateDiagramPositionExcludingAxes() ); + if(bResetModifiedState && !bModelWasModified && xModifiable.is() ) + xModifiable->setModified(sal_False); + return true; + } + } + } + return false; +} + } // namespace chart diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 534c24cae1ad..886bab7ced29 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -72,15 +72,12 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include #include @@ -2989,27 +2986,8 @@ void SAL_CALL ChartView::update() throw (uno::RuntimeException) //When a view update is requested (what happens for creating the metafile or displaying //the chart in edit mode or printing) it is most likely that all necessary informations are available - like the underlying spreadsheet data for example. //Those data is important for the correct axis lable sizes which are needed during conversion. - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); - if( nCurrentODFVersion == SvtSaveOptions::ODFVER_LATEST )//#i100778# todo: change this dependent on fileformat evolution - { - uno::Reference< ::com::sun::star::chart::XChartDocument > xOldDoc( m_xChartModel, uno::UNO_QUERY ) ; - if( xOldDoc.is() ) - { - uno::Reference< ::com::sun::star::chart::XDiagramPositioning > xDiagramPositioning( xOldDoc->getDiagram(), uno::UNO_QUERY ); - if( xDiagramPositioning.is() && !xDiagramPositioning->isAutomaticDiagramPositioning() && !xDiagramPositioning->isExcludingDiagramPositioning() ) - { - { - ControllerLockGuard aCtrlLockGuard( m_xChartModel ); - uno::Reference< util::XModifiable > xModifiable( m_xChartModel, uno::UNO_QUERY ); - bool bModelWasModified = xModifiable.is() && xModifiable->isModified(); - xDiagramPositioning->setDiagramPositionExcludingAxes( xDiagramPositioning->calculateDiagramPositionExcludingAxes() ); - if(!bModelWasModified && xModifiable.is() ) - xModifiable->setModified(sal_False); - } - impl_updateView(); - } - } - } + if( DiagramHelper::switchDiagramPositioningToExcludingPositioning( m_xChartModel, true, false ) ) + impl_updateView(); } // ____ XPropertySet ____ -- cgit v1.2.3 From 017f1bc3f7b1810f2cbf1ba5971184920be87cf8 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 10 May 2010 18:52:14 +0200 Subject: chartpositioning: #i100778# for exploded pie charts use the offset of the series as radius for excluding positioning --- chart2/source/view/charttypes/PieChart.cxx | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index 93f9440d2317..eee13848b11b 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -280,18 +280,21 @@ double PieChart::getMaxOffset() if(fExplodePercentage>m_fMaxOffset) m_fMaxOffset=fExplodePercentage; - uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if(!m_bSizeExcludesLabelsAndExplodedSegments) { - for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) + uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; + if( xSeriesProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) { - uno::Reference< beans::XPropertySet > xPointProp( pSeries->getPropertiesOfPoint(aAttributedDataPointIndexList[nN]) ); - if(xPointProp.is()) + for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) { - fExplodePercentage=0.0; - xPointProp->getPropertyValue( C2U( "Offset" )) >>= fExplodePercentage; - if(fExplodePercentage>m_fMaxOffset) - m_fMaxOffset=fExplodePercentage; + uno::Reference< beans::XPropertySet > xPointProp( pSeries->getPropertiesOfPoint(aAttributedDataPointIndexList[nN]) ); + if(xPointProp.is()) + { + fExplodePercentage=0.0; + xPointProp->getPropertyValue( C2U( "Offset" )) >>= fExplodePercentage; + if(fExplodePercentage>m_fMaxOffset) + m_fMaxOffset=fExplodePercentage; + } } } } @@ -299,7 +302,7 @@ double PieChart::getMaxOffset() } double PieChart::getMaximumX() { - double fMaxOffset = m_bSizeExcludesLabelsAndExplodedSegments ? 0.0 : getMaxOffset(); + double fMaxOffset = getMaxOffset(); if( m_aZSlots.size()>0 && m_bUseRings) return m_aZSlots[0].size()+0.5+fMaxOffset; return 1.5+fMaxOffset; @@ -403,7 +406,7 @@ void PieChart::createShapes() for( nPointIndex = 0; nPointIndex < nPointCount; nPointIndex++ ) { double fLogicInnerRadius, fLogicOuterRadius; - double fOffset = m_bSizeExcludesLabelsAndExplodedSegments ? 0.0 : getMaxOffset(); + double fOffset = getMaxOffset(); bool bIsVisible = m_pPosHelper->getInnerAndOuterRadius( fSlotX+1.0, fLogicInnerRadius, fLogicOuterRadius, m_bUseRings, fOffset ); if( !bIsVisible ) continue; -- cgit v1.2.3 From 3bf9010a46b16a7927ccf20537157387e79f8565 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 10 May 2010 18:54:44 +0200 Subject: sw33bf04: #i111381#: OValuePropertiesMetaData: apply patch by tono --- xmloff/source/forms/valueproperties.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx index 3515dcf96010..1c44db963944 100644 --- a/xmloff/source/forms/valueproperties.cxx +++ b/xmloff/source/forms/valueproperties.cxx @@ -116,7 +116,7 @@ namespace xmloff void OValuePropertiesMetaData::getValueLimitPropertyNames(sal_Int16 _nFormComponentType, sal_Char const * & _rpMinValuePropertyName, sal_Char const * & _rpMaxValuePropertyName) { - _rpMinValuePropertyName = _rpMinValuePropertyName = NULL; + _rpMinValuePropertyName = _rpMaxValuePropertyName = NULL; switch (_nFormComponentType) { case FormComponentType::DATEFIELD: -- cgit v1.2.3 From 4a43faa47e43285d044bffb6719702e3c1aee501 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 10 May 2010 19:01:40 +0200 Subject: sw33bf04: #i111286#: crash when pasting footnote into frame (patch by dtardon) --- sw/source/core/txtnode/ndtxt.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index d6770321768f..bf50d63be411 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1588,6 +1588,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, // Del-Array fuer alle RefMarks ohne Ausdehnung SwpHts aRefMrkArr; + USHORT nDeletedDummyChars(0); //Achtung: kann ungueltig sein!! for (USHORT n = 0; ( n < nSize ); ++n) { @@ -1681,9 +1682,19 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, } else { - pNewHt = pDest->InsertItem( pHt->GetAttr(), nAttrStt, - nAttrEnd, nsSetAttrMode::SETATTR_NOTXTATRCHR ); - lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest ); + pNewHt = pDest->InsertItem( pHt->GetAttr(), nAttrStt - nDeletedDummyChars, + nAttrEnd - nDeletedDummyChars, nsSetAttrMode::SETATTR_NOTXTATRCHR ); + if (pNewHt) + { + lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest ); + } + else if (pHt->HasDummyChar()) + { + // The attribute that has failed to be copied would insert + // dummy char, so positions of the following attributes have + // to be shifted by one to compensate for that missing char. + ++nDeletedDummyChars; + } } if( RES_TXTATR_REFMARK == nWhich && !pEndIdx && !bCopyRefMark ) -- cgit v1.2.3 From 21305385b5bfb9392b7368852a048c5393c62e96 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 10 May 2010 19:07:52 +0200 Subject: sw33bf04: #i111286#: clean up footnote cruft in SwTxtNode::CopyText() --- sw/inc/txtftn.hxx | 2 +- sw/source/core/txtnode/atrftn.cxx | 38 ++++++++++++++++++++++---------------- sw/source/core/txtnode/ndtxt.cxx | 25 ++++--------------------- 3 files changed, 27 insertions(+), 38 deletions(-) diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx index 0b55053d03dd..07043a9263bc 100644 --- a/sw/inc/txtftn.hxx +++ b/sw/inc/txtftn.hxx @@ -49,7 +49,7 @@ public: inline SwNodeIndex *GetStartNode() const { return m_pStartNode; } void SetStartNode( const SwNodeIndex *pNode, BOOL bDelNodes = TRUE ); void SetNumber( const USHORT nNumber, const String* = 0 ); - void CopyFtn( SwTxtFtn *pDest ) const; + void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const; // get and set TxtNode pointer inline const SwTxtNode& GetTxtNode() const; diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 7d6b8959787b..45f6c5da2baf 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -289,39 +289,45 @@ void SwTxtFtn::SetNumber( const USHORT nNewNum, const XubString* pStr ) } // Die Fussnoten duplizieren -void SwTxtFtn::CopyFtn( SwTxtFtn *pDest ) const +void SwTxtFtn::CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const { - if ( m_pStartNode && pDest->GetStartNode() ) + if (m_pStartNode && !rDest.GetStartNode()) { - // die Fussnoten koennen in unterschiedlichen Dokumenten stehen !! - SwDoc* pDstDoc = pDest->m_pTxtNode->GetDoc(); + // dest missing node section? create it here! + // (happens in SwTxtNode::CopyText if pDest == this) + rDest.MakeNewTextSection( rDestNode.GetNodes() ); + } + if (m_pStartNode && rDest.GetStartNode()) + { + // footnotes not necessarily in same document! + SwDoc *const pDstDoc = rDestNode.GetDoc(); SwNodes &rDstNodes = pDstDoc->GetNodes(); - // Wir kopieren nur den Inhalt der Sektion + // copy only the content of the section SwNodeRange aRg( *m_pStartNode, 1, *m_pStartNode->GetNode().EndOfSectionNode() ); - // Wir fuegen auf dem Ende von pDest ein, d.h. die Nodes - // werden angehaengt. nDestLen haelt die Anzahl der CntNodes - // in pDest _vor_ dem Kopieren. - SwNodeIndex aStart( *(pDest->GetStartNode()) ); + // insert at the end of rDest, i.e., the nodes are appended. + // nDestLen contains number of CntntNodes in rDest _before_ copy. + SwNodeIndex aStart( *(rDest.GetStartNode()) ); SwNodeIndex aEnd( *aStart.GetNode().EndOfSectionNode() ); ULONG nDestLen = aEnd.GetIndex() - aStart.GetIndex() - 1; m_pTxtNode->GetDoc()->CopyWithFlyInFly( aRg, 0, aEnd, TRUE ); - // Wenn die Dest-Sektion nicht leer war, so muessen die alten - // Nodes geloescht werden: - // Vorher: Src: SxxxE, Dst: SnE - // Nachher: Src: SxxxE, Dst: SnxxxE - // und Src: SxxxE, Dst: SxxxE + // in case the destination section was not empty, delete the old nodes + // before: Src: SxxxE, Dst: SnE + // now: Src: SxxxE, Dst: SnxxxE + // after: Src: SxxxE, Dst: SxxxE aStart++; rDstNodes.Delete( aStart, nDestLen ); } - // Der benutzerdefinierte String muss auch uebertragen werden. + // also copy user defined number string if( GetFtn().aNumber.Len() ) - ((SwFmtFtn&)pDest->GetFtn()).aNumber = GetFtn().aNumber; + { + const_cast(rDest.GetFtn()).aNumber = GetFtn().aNumber; + } } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index bf50d63be411..29afeae8725d 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1278,11 +1278,11 @@ void lcl_CopyHint( const USHORT nWhich, const SwTxtAttr * const pHt, ASSERT( nWhich == pHt->Which(), "Falsche Hint-Id" ); switch( nWhich ) { - // Wenn wir es mit einem Fussnoten-Attribut zu tun haben, - // muessen wir natuerlich auch den Fussnotenbereich kopieren. + // copy nodesarray section with footnote content case RES_TXTATR_FTN : + ASSERT(pDest, "lcl_CopyHint: no destination text node?"); static_cast(pHt)->CopyFtn( - static_cast(pNewHt)); + *static_cast(pNewHt), *pDest); break; // Beim Kopieren von Feldern in andere Dokumente @@ -1660,24 +1660,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(), nAttrStt, nAttrEnd ); -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -//JP 23.04.95: erstmal so gesondert hier behandeln. Am Besten ist es -// aber im CopyFtn wenn die pDestFtn keinen StartNode hat, -// sich diesen dann anlegt. -// Aber so kurz vor der BETA besser nicht anfassen. - if( RES_TXTATR_FTN == nWhich ) - { - SwTxtFtn* pFtn = (SwTxtFtn*)pNewHt; - pFtn->ChgTxtNode( this ); - pFtn->MakeNewTextSection( GetNodes() ); - lcl_CopyHint( nWhich, pHt, pFtn, 0, 0 ); - pFtn->ChgTxtNode( 0 ); - } - else -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - { - lcl_CopyHint( nWhich, pHt, pNewHt, 0, pDest ); - } + lcl_CopyHint(nWhich, pHt, pNewHt, 0, pDest); aArr.C40_INSERT( SwTxtAttr, pNewHt, aArr.Count() ); } else -- cgit v1.2.3 From e624b9d8b2fceac0652033619d8a607d58068b57 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 11 May 2010 09:38:26 +0200 Subject: findbar01: #i10000# Fix build problem with gcc --- svx/source/tbxctrls/tbunosearchcontrollers.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 8dcf2ceed0f0..487c6f2359ef 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -245,7 +245,7 @@ void SearchToolbarControllersManager::registryController( const css::uno::Refere } -void SearchToolbarControllersManager::freeController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL ) +void SearchToolbarControllersManager::freeController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& /*xStatusListener*/, const ::rtl::OUString& sCommandURL ) { SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame); if (pIt != aSearchToolbarControllersMap.end()) -- cgit v1.2.3 From 8883e76b265da21a3b42f6906bc4f62e0b8a4684 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 11 May 2010 15:33:35 +0200 Subject: #i105414# workaround in case that a paragraph only overrules the first line indent, but not the left indent of the applied list style --- sw/source/filter/ww8/ww8par.cxx | 21 ++++++++++++++++++--- sw/source/filter/ww8/ww8par.hxx | 13 +++++++++++-- sw/source/filter/ww8/ww8par3.cxx | 5 ++++- sw/source/filter/ww8/ww8par6.cxx | 23 +++++++++++++++++++++-- 4 files changed, 54 insertions(+), 8 deletions(-) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index e1b623b2d5c5..5698627ef580 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -845,9 +845,11 @@ long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, } // --> OD 2010-05-06 #i103711# +// --> OD 2010-05-11 #i105414# void SyncIndentWithList( SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, - const bool bFirstLineOfstSet ) + const bool bFirstLineOfstSet, + const bool bLeftIndentSet ) { if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { @@ -858,11 +860,16 @@ void SyncIndentWithList( SvxLRSpaceItem &rLR, } else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - if ( !bFirstLineOfstSet && + if ( !bFirstLineOfstSet && bLeftIndentSet && rFmt.GetFirstLineIndent() != 0 ) { rLR.SetTxtFirstLineOfst( rFmt.GetFirstLineIndent() ); } + else if ( bFirstLineOfstSet && !bLeftIndentSet && + rFmt.GetIndentAt() != 0 ) + { + rLR.SetTxtLeft( rFmt.GetIndentAt() ); + } } } // <-- @@ -932,8 +939,13 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, const bool bFirstLineIndentSet = ( rReader.maTxtNodesHavingFirstLineOfstSet.end() != rReader.maTxtNodesHavingFirstLineOfstSet.find( pNode ) ); + // --> OD 2010-05-11 #i105414# + const bool bLeftIndentSet = + ( rReader.maTxtNodesHavingLeftIndentSet.end() != + rReader.maTxtNodesHavingLeftIndentSet.find( pNode ) ); SyncIndentWithList( aNewLR, *pNum, - bFirstLineIndentSet ); + bFirstLineIndentSet, + bLeftIndentSet ); // <-- } @@ -3206,6 +3218,9 @@ SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage, // --> OD 2010-05-06 #i103711# maTxtNodesHavingFirstLineOfstSet(), // <-- + // --> OD 2010-05-11 #i105414# + maTxtNodesHavingLeftIndentSet(), + // <-- pMSDffManager(0), mpAtnNames(0), pAuthorInfos(0), diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 15817c1eb2c1..25db4954daa3 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -959,6 +959,9 @@ private: // --> OD 2010-05-06 #i103711# std::set maTxtNodesHavingFirstLineOfstSet; // <-- + // --> OD 2010-05-11 #i105414# + std::set maTxtNodesHavingLeftIndentSet; + // <-- WW8RStyle* pStyles; // Pointer auf die Style-Einleseklasse SwFmt* pAktColl; // gerade zu erzeugende Collection @@ -1160,8 +1163,10 @@ private: void EndSprm( USHORT nId ); // --> OD 2010-05-06 #i103711# + // --> OD 2010-05-11 #i105414# void NewAttr( const SfxPoolItem& rAttr, - const bool bFirstLineOfStSet = false ); + const bool bFirstLineOfStSet = false, + const bool bLeftIndentSet = false ); // <-- bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&, @@ -1619,9 +1624,13 @@ public: // eigentlich private, geht aber leider nur public bool CanUseRemoteLink(const String &rGrfName); void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt); void SetStyleIndent(SwWW8StyInf &rStyleInfo, const SwNumFmt &rFmt); +// --> OD 2010-05-06 #i103711# +// --> OD 2010-05-11 #i105414# void SyncIndentWithList( SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, - const bool bFirstLineOfStSet ); + const bool bFirstLineOfStSet, + const bool bLeftIndentSet ); +// <-- long GetListFirstLineIndent(const SwNumFmt &rFmt); String BookmarkToWriter(const String &rBookmark); bool RTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 9437495439f7..0b8616d54652 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1698,7 +1698,10 @@ void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt) SvxLRSpaceItem aLR(ItemGet(*rStyle.pFmt, RES_LR_SPACE)); if (rStyle.bListReleventIndentSet) { - SyncIndentWithList( aLR, rFmt, false ); + // --> OD 2010-05-06 #i103711# + // --> OD 2010-05-11 #i105414# + SyncIndentWithList( aLR, rFmt, false, false ); + // <-- } else { diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 210618134280..86d644a94356 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2716,7 +2716,8 @@ bool SwWW8ImplReader::TestSameApo(const ApoTestResults &rApo, #**************************************************************************/ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, - const bool bFirstLineOfStSet ) + const bool bFirstLineOfStSet, + const bool bLeftIndentSet ) { if( !bNoAttrImport ) // zum Ignorieren von Styles beim Doc-Einfuegen { @@ -2743,6 +2744,13 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, maTxtNodesHavingFirstLineOfstSet.insert( pNd ); } // <-- + // --> OD 2010-05-11 #i105414# + if ( bLeftIndentSet ) + { + const SwNode* pNd = &(pPaM->GetPoint()->nNode.GetNode()); + maTxtNodesHavingLeftIndentSet.insert( pNd ); + } + // <-- } if (mpPostProcessAttrsInfo && mpPostProcessAttrsInfo->mbCopy) @@ -3975,6 +3983,9 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) // --> OD 2010-05-06 #i103711# bool bFirstLinOfstSet( false ); // <-- + // --> OD 2010-05-11 #i105414# + bool bLeftIndentSet( false ); + // <-- switch (nId) { @@ -3984,7 +3995,12 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) case 0x845E: aLR.SetTxtLeft( nPara ); if (pAktColl) + { pCollA[nAktColl].bListReleventIndentSet = true; + } + // --> OD 2010-05-11 #i105414# + bLeftIndentSet = true; + // <-- break; //sprmPDxaLeft1 case 19: @@ -4019,7 +4035,9 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) { pCollA[nAktColl].bListReleventIndentSet = true; } + // --> OD 2010-05-06 #i103711# bFirstLinOfstSet = true; + // <-- break; //sprmPDxaRight case 16: @@ -4032,7 +4050,8 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen ) } // --> OD 2010-05-06 #i103711# - NewAttr( aLR, bFirstLinOfstSet ); + // --> OD 2010-05-11 #i105414# + NewAttr( aLR, bFirstLinOfstSet, bLeftIndentSet ); // <-- } -- cgit v1.2.3 From 7a39ca8220816b276c111b23a37ab88a12c1578c Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 12 May 2010 12:44:10 +0200 Subject: sw33bf04: #i105562# - correct handling of empty set list style due to outline level attribute --- sw/source/core/txtnode/ndtxt.cxx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index d6770321768f..765e142a3edd 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -4386,6 +4386,10 @@ namespace { if ( pNumRuleItem.GetValue().Len() > 0 ) { mbAddTxtNodeToList = true; + // --> OD 2010-05-12 #i105562# + // + mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr(); + // <-- } } break; @@ -4397,10 +4401,6 @@ namespace { dynamic_cast(pItem); ASSERT( pListIdItem.GetValue().Len() > 0, " - empty list id attribute not excepted. Serious defect -> please inform OD." ); -// const SfxStringItem& rListIdItemOfTxtNode = -// dynamic_cast( -// rTxtNode.GetAttr( RES_PARATR_LIST_ID )); -// if ( pListIdItem.GetValue() != rListIdItemOfTxtNode.GetValue() ) const String sListIdOfTxtNode = rTxtNode.GetListId(); if ( pListIdItem.GetValue() != sListIdOfTxtNode ) { @@ -4514,11 +4514,6 @@ namespace { { const SfxStringItem* pListIdItem = dynamic_cast(pItem); -// const SfxStringItem& rListIdItemOfTxtNode = -// dynamic_cast( -// mrTxtNode.GetAttr( RES_PARATR_LIST_ID )); -// if ( pListIdItem && -// pListIdItem->GetValue() != rListIdItemOfTxtNode.GetValue() ) const String sListIdOfTxtNode = mrTxtNode.GetListId(); if ( pListIdItem && pListIdItem->GetValue() != sListIdOfTxtNode ) @@ -4923,7 +4918,9 @@ namespace { mrTxtNode.AddToList(); } // --> OD 2008-11-19 #i70748# - else if ( dynamic_cast(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 ) + // --> OD 2010-05-12 #i105562# + else if ( mrTxtNode.GetpSwAttrSet() && + dynamic_cast(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 ) { mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr(); } -- cgit v1.2.3 From 907de08acf34563b376f895d66f05c29310366bd Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 12 May 2010 16:03:59 +0200 Subject: sw33bf04: #i91658# method - remove unnecessary assertion --- sw/inc/htmltbl.hxx | 2 +- sw/source/core/doc/htmltbl.cxx | 34 +++++++--------------------------- sw/source/core/docnode/swbaslnk.cxx | 10 ++++++---- sw/source/filter/html/htmlform.cxx | 8 +++++--- sw/source/filter/html/swhtml.cxx | 2 +- 5 files changed, 20 insertions(+), 36 deletions(-) diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index 941e6bc43eb2..ef16a2a89b86 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -267,6 +267,7 @@ class SwHTMLTableLayout DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* ); + static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc ); public: SwHTMLTableLayout( const SwTable *pSwTbl, @@ -348,7 +349,6 @@ public: // oder eine ViewShell vorhanden ist. Sonst wird 0 zurueckgegeben. // (Wird vom HTML-Filter benoetigt, da der nicht an das Layout kommt.) static USHORT GetBrowseWidth( const SwDoc& rDoc ); - static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc ); // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame USHORT GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const; diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index e762de8489e3..a3e28fc0e425 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -377,32 +377,12 @@ USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc ) return (USHORT)pPageFrm->Prt().Width(); } - // Sonst versuchen wir es ueber die ViewShell - USHORT nWidth = GetBrowseWidthByVisArea( rDoc ); - if( !nWidth ) - { - // Und wenn das auch nicht geht, gibt es noch die ActualSize an der - // DocShell. - if( rDoc.GetDocShell() && GetpApp() && GetpApp()->GetDefaultDevice() ) - { - // this case shouldn't happen because the filter always waits until - // a view has been created -/* - nWidth = (USHORT)Application::GetDefaultDevice() - ->PixelToLogic( rDoc.GetDocShell()->GetActualSize(), - MapMode( MAP_TWIP ) ).Width(); -*/ - ASSERT( nWidth, "No browse width available" ); - } -#ifdef DBG_UTIL - else - { - // und wenn das auch nicht klappt, gibt es zur Zeit keine Breite - ASSERT( nWidth, "No browse width available" ); - } -#endif - } - return nWidth; + // --> OD 2010-05-12 #i91658# + // Assertion removed which state that no browse width is available. + // Investigation reveals that all calls can handle the case that no browse + // width is provided. + return GetBrowseWidthByVisArea( rDoc ); + // <-- } USHORT SwHTMLTableLayout::GetBrowseWidthByTabFrm( @@ -1859,7 +1839,7 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc, // weil sond die Umschaltung von relativ nach absolut nicht funktioniert. if( pDoc->GetRootFrm() && pDoc->get(IDocumentSettingAccess::BROWSE_MODE) ) { - USHORT nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc ); + const USHORT nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc ); if( nVisAreaWidth < nAbsAvail && !FindFlyFrmFmt() ) nAbsAvail = nVisAreaWidth; } diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index df6c8dc8c9f2..cb804b102c0e 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -357,17 +357,19 @@ BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd ) 0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) && 0 != (pTblNd = pANd->FindTableNode()) ) { - BOOL bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); + const BOOL bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); SwHTMLTableLayout *pLayout = pTblNd->GetTable().GetHTMLTableLayout(); if( pLayout ) { - USHORT nBrowseWidth = - pLayout->GetBrowseWidthByTable( *pDoc ); - if( nBrowseWidth ) + const USHORT nBrowseWidth = + pLayout->GetBrowseWidthByTable( *pDoc ); + if ( nBrowseWidth ) + { pLayout->Resize( nBrowseWidth, TRUE, TRUE, bLastGrf ? HTMLTABLE_RESIZE_NOW : 500 ); + } } } } diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 4fd450cbffd5..bb1567d978f6 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -547,18 +547,20 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height ) 0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) && 0 != (pTblNd = pANd->FindTableNode()) ) { - sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); + const sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); SwHTMLTableLayout *pLayout = pTblNd->GetTable().GetHTMLTableLayout(); if( pLayout ) { - sal_uInt16 nBrowseWidth = + const sal_uInt16 nBrowseWidth = pLayout->GetBrowseWidthByTable( *pDoc ); - if( nBrowseWidth ) + if ( nBrowseWidth ) + { pLayout->Resize( nBrowseWidth, sal_True, sal_True, bLastGrf ? HTMLTABLE_RESIZE_NOW : 500 ); + } } } } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 1e4f975ba3ec..fba6a477757d 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -4957,7 +4957,7 @@ USHORT SwHTMLParser::ToTwips( USHORT nPixel ) const SwTwips SwHTMLParser::GetCurrentBrowseWidth() { - SwTwips nWidth = SwHTMLTableLayout::GetBrowseWidth( *pDoc ); + const SwTwips nWidth = SwHTMLTableLayout::GetBrowseWidth( *pDoc ); if( nWidth ) return nWidth; -- cgit v1.2.3 From 99ee7093162c1922a2740e4731b82a1528283e3c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 14 May 2010 13:52:41 +0200 Subject: sw33bf04: #i111177#: work around unxsols4 compiler bug --- sw/source/core/unocore/unoftn.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 44991960ac25..d0d74fa023c7 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -78,7 +78,9 @@ public: , m_rThis(rThis) , m_bIsEndnote(bIsEndnote) , m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis)) - , m_bIsDescriptor(0 == pFootnote) +// #i111177#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this +// , m_bIsDescriptor(0 == pFootnote) + , m_bIsDescriptor((0 == pFootnote) ? true : false) , m_pFmtFtn(pFootnote) { } -- cgit v1.2.3 From c9d620f5dd472902fe6d5aed93ed55dec6dd7f7b Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 14 May 2010 16:36:40 +0200 Subject: sw33bf04: #160026# method - property "Help" does not exist and asking for it causes exception --> asking for property "HelpText" --- sw/source/filter/ww8/wrtw8esh.cxx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 6686ae5b13d7..004eef715822 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -170,10 +170,20 @@ void WW8Export::DoComboBox(uno::Reference xPropSet) rtl::OUString sHelp; { - uno::Any aTmp = xPropSet->getPropertyValue(C2U("Help")); - const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue(); - if (pStr) - sHelp = *pStr; + // --> OD 2010-05-14 #160026# + // property "Help" does not exist and due to the no-existence an exception is thrown. +// uno::Any aTmp = xPropSet->getPropertyValue(C2U("Help")); + try + { + uno::Any aTmp = xPropSet->getPropertyValue(C2U("HelpText")); + // <-- + const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue(); + if (pStr) + sHelp = *pStr; + } + catch( uno::Exception& ) + {} + // <-- } rtl::OUString sToolTip; -- cgit v1.2.3 From f4609c4c294a62023b6cd6baeb6a73d44992dec3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 17 May 2010 15:50:18 +0200 Subject: sw33bf04: #i101009#: doccomp.cxx: avoid creating redlines including EndOfContent --- sw/source/core/doc/doccomp.cxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 6451aebd4251..6e7d125e6d1d 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1480,6 +1480,17 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo ) pTmp->GetPoint()->nNode++; pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 ); } + // --> mst 2010-05-17 #i101009# + // prevent redlines that end on structural end node + if (& rDoc.GetNodes().GetEndOfContent() == + & pTmp->GetPoint()->nNode.GetNode()) + { + pTmp->GetPoint()->nNode--; + SwCntntNode *const pContentNode( pTmp->GetCntntNode() ); + pTmp->GetPoint()->nContent.Assign( pContentNode, + (pContentNode) ? pContentNode->Len() : 0 ); + } + // <-- rDoc.DeleteRedline( *pTmp, false, USHRT_MAX ); @@ -1499,6 +1510,17 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo ) pTmp->GetPoint()->nNode++; pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 ); } + // --> mst 2010-05-17 #i101009# + // prevent redlines that end on structural end node + if (& rDoc.GetNodes().GetEndOfContent() == + & pTmp->GetPoint()->nNode.GetNode()) + { + pTmp->GetPoint()->nNode--; + SwCntntNode *const pContentNode( pTmp->GetCntntNode() ); + pTmp->GetPoint()->nContent.Assign( pContentNode, + (pContentNode) ? pContentNode->Len() : 0 ); + } + // <-- } while( pInsRing != ( pTmp = (SwPaM*)pTmp->GetNext() )); SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp, aEmptyStr, 0, 0 ); -- cgit v1.2.3 From 33ddea2d2bdb996a7f8eb7189b311bafa0de367e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 18 May 2010 14:22:07 +0200 Subject: sw33bf04: #i97421#: fix loop in AppendRedline: SwUndoDelete::Redo(): recreate redline save data (based on patch by majun51). SwDoc::AppendRedline(): fix loop on DELETE/INSERT without extent. --- sw/source/core/doc/docredln.cxx | 19 +++++++++++++------ sw/source/core/undo/undel.cxx | 10 +++++++++- sw/source/core/undo/undobj.cxx | 7 ++++++- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 000da4987cbf..6d8ac96b94c2 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -914,17 +914,24 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) case POS_INSIDE: { - pNewRedl->PushData( *pRedl, FALSE ); if( *pRStt == *pStt ) { - pRedl->SetStart( *pEnd, pRStt ); - // neu einsortieren - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl, n ); - bDec = true; + // --> mst 2010-05-17 #i97421# + // redline w/out extent loops + if (*pStt != *pEnd) + // <-- + { + pNewRedl->PushData( *pRedl, FALSE ); + pRedl->SetStart( *pEnd, pRStt ); + // re-insert + pRedlineTbl->Remove( n ); + pRedlineTbl->Insert( pRedl, n ); + bDec = true; + } } else { + pNewRedl->PushData( *pRedl, FALSE ); if( *pREnd != *pEnd ) { pNew = new SwRedline( *pRedl ); diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 593382fd999e..b0860e3a7816 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -863,7 +863,15 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter ) SetPaM( rPam ); if( pRedlSaveData ) - rDoc.DeleteRedline( rPam, false, USHRT_MAX ); + { + bool bSuccess = FillSaveData(rPam, *pRedlSaveData, TRUE); + OSL_ENSURE(bSuccess, + "SwUndoDelete::Redo: used to have redline data, but now none?"); + if (!bSuccess) + { + delete pRedlSaveData, pRedlSaveData = 0; + } + } if( !bDelFullPara ) { diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 2c341cb53bf5..1a71a705b2fb 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1120,7 +1120,12 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM& rPam ) if (rDoc.GetDocShell() && (pRedl->GetComment() != String(::rtl::OUString::createFromAscii(""))) ) rDoc.GetDocShell()->Broadcast(SwRedlineHint(pRedl,SWREDLINE_INSERTED)); // - rDoc.AppendRedline( pRedl, true ); +#if OSL_DEBUG_LEVEL > 0 + bool const bSuccess = +#endif + rDoc.AppendRedline( pRedl, true ); + OSL_ENSURE(bSuccess, + "SwRedlineSaveData::RedlineToDoc: insert redline failed"); rDoc.SetRedlineMode_intern( eOld ); } -- cgit v1.2.3 From 6a538f36e80f7fffde074aa2f521434a7a35e8eb Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 19 May 2010 16:56:19 +0200 Subject: findbar01: #i111672# Fix crash on searching next/previous on single text object --- sd/source/ui/view/Outliner.cxx | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 5314f6dbe768..b757ca3ede27 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -566,7 +566,8 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) void Outliner::Initialize (bool bDirectionIsForward) { - bool bOldDirectionIsForward = mbDirectionIsForward; + const bool bIsAtEnd (maObjectIterator == ::sd::outliner::OutlinerContainer(this).end()); + const bool bOldDirectionIsForward = mbDirectionIsForward; mbDirectionIsForward = bDirectionIsForward; if (maObjectIterator == ::sd::outliner::Iterator()) @@ -601,10 +602,19 @@ void Outliner::Initialize (bool bDirectionIsForward) { // Requested iteration direction has changed. Turn arround the iterator. maObjectIterator.Reverse(); - // The iterator has pointed to the object one ahead/before the current - // one. Now move it to the one before/ahead the current one. - ++maObjectIterator; - ++maObjectIterator; + if (bIsAtEnd) + { + // The iterator has pointed to end(), which after the search + // direction is reversed, becomes begin(). + maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin(); + } + else + { + // The iterator has pointed to the object one ahead/before the current + // one. Now move it to the one before/ahead the current one. + ++maObjectIterator; + ++maObjectIterator; + } mbMatchMayExist = true; } -- cgit v1.2.3 From 874bb80f4fe59a5920084b92edf0f583a22cb8f5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 19 May 2010 18:35:11 +0200 Subject: sw33bf04: #i111712#: sax: convert crude test in converter.cxx to cppunit test --- sax/inc/sax/tools/converter.hxx | 1 + sax/prj/build.lst | 1 + sax/qa/cppunit/makefile.mk | 71 +++++++++++ sax/qa/cppunit/test_converter.cxx | 244 ++++++++++++++++++++++++++++++++++++++ sax/qa/cppunit/version.map | 34 ++++++ sax/source/tools/converter.cxx | 165 -------------------------- 6 files changed, 351 insertions(+), 165 deletions(-) create mode 100644 sax/qa/cppunit/makefile.mk create mode 100644 sax/qa/cppunit/test_converter.cxx create mode 100644 sax/qa/cppunit/version.map diff --git a/sax/inc/sax/tools/converter.hxx b/sax/inc/sax/tools/converter.hxx index 1e783b4a4ec9..4b65c1dc83b2 100644 --- a/sax/inc/sax/tools/converter.hxx +++ b/sax/inc/sax/tools/converter.hxx @@ -32,6 +32,7 @@ #include +#include #include diff --git a/sax/prj/build.lst b/sax/prj/build.lst index e3f70c484610..653d77ce9e25 100644 --- a/sax/prj/build.lst +++ b/sax/prj/build.lst @@ -3,3 +3,4 @@ ax sax usr1 - all ax_mkout NULL ax sax\source\expatwrap nmake - all ax_expatwrap NULL ax sax\source\tools nmake - all ax_tools NULL ax sax\source\fastparser nmake - all ax_fastparser ax_expatwrap ax_tools NULL +ax sax\qa\cppunit nmake - all ax_qa_cppunit ax_tools NULL diff --git a/sax/qa/cppunit/makefile.mk b/sax/qa/cppunit/makefile.mk new file mode 100644 index 000000000000..e06eca25a737 --- /dev/null +++ b/sax/qa/cppunit/makefile.mk @@ -0,0 +1,71 @@ +#************************************************************************* +# +# 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=sax +TARGET=qa_cppunit + +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +CFLAGSCXX += $(CPPUNIT_CFLAGS) +DLLPRE = # no leading "lib" on .so files + +# --- Libs --------------------------------------------------------- + +SHL1OBJS= \ + $(SLO)/test_converter.obj \ + + +SHL1STDLIBS= \ + $(SAXLIB) \ + $(SALLIB) \ + $(CPPUNITLIB) \ + + +SHL1TARGET= test_converter +SHL1RPATH = NONE +SHL1IMPLIB= i$(SHL1TARGET) +# SHL1DEF= $(MISC)/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +# DEF1EXPORTFILE= export.exp +SHL1VERSIONMAP= version.map + +# --- All object files --------------------------------------------- + +SLOFILES= \ + $(SHL1OBJS) \ + + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk +.INCLUDE : _cppunit.mk + diff --git a/sax/qa/cppunit/test_converter.cxx b/sax/qa/cppunit/test_converter.cxx new file mode 100644 index 000000000000..1ea781afff95 --- /dev/null +++ b/sax/qa/cppunit/test_converter.cxx @@ -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. + * + ************************************************************************/ + +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "sax/tools/converter.hxx" + + +using namespace ::com::sun::star; +using sax::Converter; + + +namespace { + +class ConverterTest + : public ::CppUnit::TestFixture +{ +public: + virtual void setUp(); + virtual void tearDown(); + + void testDuration(); + void testDateTime(); + + CPPUNIT_TEST_SUITE(ConverterTest); + CPPUNIT_TEST(testDuration); + CPPUNIT_TEST(testDateTime); + CPPUNIT_TEST_SUITE_END(); + +private: +}; + +void ConverterTest::setUp() +{ +} + +void ConverterTest::tearDown() +{ +} + +static bool eqDuration(util::Duration a, util::Duration b) { + return a.Years == b.Years && a.Months == b.Months && a.Days == b.Days + && a.Hours == b.Hours && a.Minutes == b.Minutes + && a.Seconds == b.Seconds + && a.MilliSeconds == b.MilliSeconds + && a.Negative == b.Negative; +} + +static void doTest(util::Duration const & rid, char const*const pis, + char const*const i_pos = 0) +{ + char const*const pos((i_pos) ? i_pos : pis); + util::Duration od; + ::rtl::OUString is(::rtl::OUString::createFromAscii(pis)); + bool bSuccess = Converter::convertDuration(od, is); + OSL_TRACE("%d %dY %dM %dD %dH %dM %dS %dm", + od.Negative, od.Years, od.Months, od.Days, + od.Hours, od.Minutes, od.Seconds, od.MilliSeconds); + CPPUNIT_ASSERT(bSuccess); + CPPUNIT_ASSERT(eqDuration(rid, od)); + ::rtl::OUStringBuffer buf; + Converter::convertDuration(buf, od); + OSL_TRACE( + ::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8)); + CPPUNIT_ASSERT(buf.makeStringAndClear().equalsAscii(pos)); +} + +static void doTestDurationF(char const*const pis) +{ + util::Duration od; + bool bSuccess = Converter::convertDuration(od, + ::rtl::OUString::createFromAscii(pis)); + OSL_TRACE("%d %dY %dM %dD %dH %dM %dS %dH", + od.Negative, od.Years, od.Months, od.Days, + od.Hours, od.Minutes, od.Seconds, od.MilliSeconds); + CPPUNIT_ASSERT(!bSuccess); +} + +void ConverterTest::testDuration() +{ + OSL_TRACE("\nSAX CONVERTER TEST BEGIN\n"); + doTest( util::Duration(false, 1, 0, 0, 0, 0, 0, 0), "P1Y" ); + doTest( util::Duration(false, 0, 42, 0, 0, 0, 0, 0), "P42M" ); + doTest( util::Duration(false, 0, 0, 111, 0, 0, 0, 0), "P111D" ); + doTest( util::Duration(false, 0, 0, 0, 52, 0, 0, 0), "PT52H" ); + doTest( util::Duration(false, 0, 0, 0, 0, 717, 0, 0), "PT717M" ); + doTest( util::Duration(false, 0, 0, 0, 0, 0, 121, 0), "PT121S" ); + doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 190), "PT0.19S" ); + doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 90), "PT0.09S" ); + doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 9), "PT0.009S" ); + doTest( util::Duration(false, 0, 0, 0, 0, 0, 9, 999), + "PT9.999999999999999999999999999999S", "PT9.999S" ); + doTest( util::Duration(true , 0, 0, 9999, 0, 0, 0, 0), "-P9999D" ); + doTest( util::Duration(true , 7, 6, 5, 4, 3, 2, 10), + "-P7Y6M5DT4H3M2.01S" ); + doTest( util::Duration(false, 0, 6, 0, 0, 3, 0, 0), "P6MT3M" ); + doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 0), "P0D" ); + doTestDurationF("1Y1M"); // invalid: no ^P + doTestDurationF("P-1Y1M"); // invalid: - after P + doTestDurationF("P1M1Y"); // invalid: Y after M + doTestDurationF("PT1Y"); // invalid: Y after T + doTestDurationF("P1Y1M1M"); // invalid: M twice, no T + doTestDurationF("P1YT1MT1M"); // invalid: T twice + doTestDurationF("P1YT"); // invalid: T but no H,M,S + doTestDurationF("P99999999999Y"); // cannot parse so many Ys + doTestDurationF("PT.1S"); // invalid: no 0 preceding . + doTestDurationF("PT5M.134S"); // invalid: no 0 preceding . + doTestDurationF("PT1.S"); // invalid: no digit following . + OSL_TRACE("\nSAX CONVERTER TEST END\n"); +} + + +static bool eqDateTime(util::DateTime a, util::DateTime b) { + return a.Year == b.Year && a.Month == b.Month && a.Day == b.Day + && a.Hours == b.Hours && a.Minutes == b.Minutes + && a.Seconds == b.Seconds + && a.HundredthSeconds == b.HundredthSeconds; +} + +static void doTest(util::DateTime const & rdt, char const*const pis, + char const*const i_pos = 0) +{ + char const*const pos((i_pos) ? i_pos : pis); + ::rtl::OUString is(::rtl::OUString::createFromAscii(pis)); + util::DateTime odt; + bool bSuccess( Converter::convertDateTime(odt, is) ); + OSL_TRACE("Y:%d M:%d D:%d H:%d M:%d S:%d H:%d", + odt.Year, odt.Month, odt.Day, + odt.Hours, odt.Minutes, odt.Seconds, odt.HundredthSeconds); + CPPUNIT_ASSERT(bSuccess); + CPPUNIT_ASSERT(eqDateTime(rdt, odt)); + ::rtl::OUStringBuffer buf; + Converter::convertDateTime(buf, odt, true); + OSL_TRACE( + ::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8)); + CPPUNIT_ASSERT(buf.makeStringAndClear().equalsAscii(pos)); +} + +static void doTestDateTimeF(char const*const pis) +{ + util::DateTime odt; + bool bSuccess = Converter::convertDateTime(odt, + ::rtl::OUString::createFromAscii(pis)); + OSL_TRACE("Y:%d M:%d D:%d H:%dH M:%d S:%d H:%d", + odt.Year, odt.Month, odt.Day, + odt.Hours, odt.Minutes, odt.Seconds, odt.HundredthSeconds); + CPPUNIT_ASSERT(!bSuccess); +} + +void ConverterTest::testDateTime() +{ + OSL_TRACE("\nSAX CONVERTER TEST BEGIN\n"); + doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1), "0001-01-01T00:00:00" ); + doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1), + "0001-01-01T00:00:00Z", "0001-01-01T00:00:00" ); +// doTest( util::DateTime(0, 0, 0, 0, 1, 1, -1), "-0001-01-01T00:00:00" ); +// doTest( util::DateTime(0, 0, 0, 0, 1, 1, -1), "-0001-01-01T00:00:00Z" ); + doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1), + "0001-01-01T00:00:00-00:00", "0001-01-01T00:00:00" ); + doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1), + "0001-01-01T00:00:00+00:00", "0001-01-01T00:00:00" ); + doTest( util::DateTime(0, 0, 0, 0, 2, 1, 1)/*(0, 0, 12, 0, 2, 1, 1)*/, + "0001-01-02T00:00:00-12:00", "0001-01-02T00:00:00" ); +// "0001-02-01T12:00:00" ); + doTest( util::DateTime(0, 0, 0, 0, 2, 1, 1)/*(0, 0, 12, 0, 1, 1, 1)*/, + "0001-01-02T00:00:00+12:00", "0001-01-02T00:00:00" ); +// "0001-01-01T12:00:00" ); + doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999), + "9999-12-31T23:59:59.99" ); + doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999), + "9999-12-31T23:59:59.99Z", "9999-12-31T23:59:59.99" ); + doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999), + "9999-12-31T23:59:59.9999999999999999999999999999999999999", + "9999-12-31T23:59:59.99" ); + doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999), + "9999-12-31T23:59:59.9999999999999999999999999999999999999Z", + "9999-12-31T23:59:59.99" ); + doTest( util::DateTime(0, 0, 0, 24, 1, 1, 333) + /*(0, 0, 0, 0, 2, 1, 333)*/, + "0333-01-01T24:00:00"/*, "0333-01-02T00:00:00"*/ ); + doTestDateTimeF( "+0001-01-01T00:00:00" ); // invalid: ^+ + doTestDateTimeF( "1-01-01T00:00:00" ); // invalid: < 4 Y + doTestDateTimeF( "0001-1-01T00:00:00" ); // invalid: < 2 M + doTestDateTimeF( "0001-01-1T00:00:00" ); // invalid: < 2 D + doTestDateTimeF( "0001-01-01T0:00:00" ); // invalid: < 2 H + doTestDateTimeF( "0001-01-01T00:0:00" ); // invalid: < 2 M + doTestDateTimeF( "0001-01-01T00:00:0" ); // invalid: < 2 S + doTestDateTimeF( "0001-01-01T00:00:00." ); // invalid: .$ + doTestDateTimeF( "0001-01-01T00:00:00+1:00" ); // invalid: < 2 TZ H + doTestDateTimeF( "0001-01-01T00:00:00+00:1" ); // invalid: < 2 TZ M + doTestDateTimeF( "0001-13-01T00:00:00" ); // invalid: M > 12 + doTestDateTimeF( "0001-01-32T00:00:00" ); // invalid: D > 31 + doTestDateTimeF( "0001-01-01T25:00:00" ); // invalid: H > 24 + doTestDateTimeF( "0001-01-01T00:60:00" ); // invalid: H > 59 + doTestDateTimeF( "0001-01-01T00:00:60" ); // invalid: S > 59 + doTestDateTimeF( "0001-01-01T24:01:00" ); // invalid: H=24, but M != 0 + doTestDateTimeF( "0001-01-01T24:00:01" ); // invalid: H=24, but S != 0 + doTestDateTimeF( "0001-01-01T24:00:00.1" ); // invalid: H=24, but H != 0 + doTestDateTimeF( "0001-01-02T00:00:00+15:00" ); // invalid: TZ > +14:00 + doTestDateTimeF( "0001-01-02T00:00:00+14:01" ); // invalid: TZ > +14:00 + doTestDateTimeF( "0001-01-02T00:00:00-15:00" ); // invalid: TZ < -14:00 + doTestDateTimeF( "0001-01-02T00:00:00-14:01" ); // invalid: TZ < -14:00 + OSL_TRACE("\nSAX CONVERTER TEST END\n"); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(ConverterTest); + +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + diff --git a/sax/qa/cppunit/version.map b/sax/qa/cppunit/version.map new file mode 100644 index 000000000000..3308588ef6f8 --- /dev/null +++ b/sax/qa/cppunit/version.map @@ -0,0 +1,34 @@ +#************************************************************************* +# +# 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. +# +#************************************************************************* + +UDK_3_0_0 { + global: + cppunitTestPlugIn; + + local: + *; +}; diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index 35bfba29c904..5df3044bd6d3 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -1217,78 +1217,6 @@ bool Converter::convertDuration(util::Duration& rDuration, return bSuccess; } -#if 0 -//FIXME -struct Test { - static bool eqDuration(util::Duration a, util::Duration b) { - return a.Years == b.Years && a.Months == b.Months && a.Days == b.Days - && a.Hours == b.Hours && a.Minutes == b.Minutes - && a.Seconds == b.Seconds - && a.MilliSeconds == b.MilliSeconds - && a.Negative == b.Negative; - } - static void doTest(util::Duration const & rid, char const*const pis, - char const*const i_pos = 0) - { - char const*const pos((i_pos) ? i_pos : pis); - util::Duration od; - ::rtl::OUString is(::rtl::OUString::createFromAscii(pis)); - bool bSuccess = Converter::convertDuration(od, is); - OSL_TRACE("%d %dY %dM %dD %dH %dM %dS %dm", - od.Negative, od.Years, od.Months, od.Days, - od.Hours, od.Minutes, od.Seconds, od.MilliSeconds); - OSL_ASSERT(bSuccess); - OSL_ASSERT(eqDuration(rid, od)); - ::rtl::OUStringBuffer buf; - Converter::convertDuration(buf, od); - OSL_TRACE( - ::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8)); - OSL_ASSERT(buf.makeStringAndClear().equalsAscii(pos)); - } - static void doTestF(const char * pis) - { - util::Duration od; - bool bSuccess = Converter::convertDuration(od, - ::rtl::OUString::createFromAscii(pis)); - OSL_TRACE("%d %dY %dM %dD %dH %dM %dS %dH", - od.Negative, od.Years, od.Months, od.Days, - od.Hours, od.Minutes, od.Seconds, od.MilliSeconds); - OSL_ASSERT(!bSuccess); - } - Test() { - OSL_TRACE("\nSAX CONVERTER TEST BEGIN\n"); - doTest( util::Duration(false, 1, 0, 0, 0, 0, 0, 0), "P1Y" ); - doTest( util::Duration(false, 0, 42, 0, 0, 0, 0, 0), "P42M" ); - doTest( util::Duration(false, 0, 0, 111, 0, 0, 0, 0), "P111D" ); - doTest( util::Duration(false, 0, 0, 0, 52, 0, 0, 0), "PT52H" ); - doTest( util::Duration(false, 0, 0, 0, 0, 717, 0, 0), "PT717M" ); - doTest( util::Duration(false, 0, 0, 0, 0, 0, 121, 0), "PT121S" ); - doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 190), "PT0.19S" ); - doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 90), "PT0.09S" ); - doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 9), "PT0.009S" ); - doTest( util::Duration(false, 0, 0, 0, 0, 0, 9, 999), - "PT9.999999999999999999999999999999S", "PT9.999S" ); - doTest( util::Duration(true , 0, 0, 9999, 0, 0, 0, 0), "-P9999D" ); - doTest( util::Duration(true , 7, 6, 5, 4, 3, 2, 10), - "-P7Y6M5DT4H3M2.01S" ); - doTest( util::Duration(false, 0, 6, 0, 0, 3, 0, 0), "P6MT3M" ); - doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 0), "P0D" ); - doTestF("1Y1M"); // invalid: no ^P - doTestF("P-1Y1M"); // invalid: - after P - doTestF("P1M1Y"); // invalid: Y after M - doTestF("PT1Y"); // invalid: Y after T - doTestF("P1Y1M1M"); // invalid: M twice, no T - doTestF("P1YT1MT1M"); // invalid: T twice - doTestF("P1YT"); // invalid: T but no H,M,S - doTestF("P99999999999Y"); // cannot parse so many Ys - doTestF("PT.1S"); // invalid: no 0 preceding . - doTestF("PT5M.134S"); // invalid: no 0 preceding . - doTestF("PT1.S"); // invalid: no digit following . - OSL_TRACE("\nSAX CONVERTER TEST END\n"); - } -}; -static Test test; -#endif /** convert util::Date to ISO "date" string */ void Converter::convertDate( @@ -1675,99 +1603,6 @@ bool Converter::convertDateOrDateTime( return bSuccess; } -#if 0 -struct Test { - static bool eqDateTime(util::DateTime a, util::DateTime b) { - return a.Year == b.Year && a.Month == b.Month && a.Day == b.Day - && a.Hours == b.Hours && a.Minutes == b.Minutes - && a.Seconds == b.Seconds - && a.HundredthSeconds == b.HundredthSeconds; - } - static void doTest(util::DateTime const & rdt, char const*const pis, - char const*const i_pos = 0) - { - char const*const pos((i_pos) ? i_pos : pis); - ::rtl::OUString is(::rtl::OUString::createFromAscii(pis)); - util::DateTime odt; - bool bSuccess( Converter::convertDateTime(odt, is) ); - OSL_TRACE("Y:%d M:%d D:%d H:%d M:%d S:%d H:%d", - odt.Year, odt.Month, odt.Day, - odt.Hours, odt.Minutes, odt.Seconds, odt.HundredthSeconds); - OSL_ASSERT(bSuccess); - OSL_ASSERT(eqDateTime(rdt, odt)); - ::rtl::OUStringBuffer buf; - Converter::convertDateTime(buf, odt, true); - OSL_TRACE( - ::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8)); - OSL_ASSERT(buf.makeStringAndClear().equalsAscii(pos)); - } - static void doTestF(const char * pis) - { - util::DateTime odt; - bool bSuccess = Converter::convertDateTime(odt, - ::rtl::OUString::createFromAscii(pis)); - OSL_TRACE("Y:%d M:%d D:%d H:%dH M:%d S:%d H:%d", - odt.Year, odt.Month, odt.Day, - odt.Hours, odt.Minutes, odt.Seconds, odt.HundredthSeconds); - OSL_ASSERT(!bSuccess); - } - Test() { - OSL_TRACE("\nSAX CONVERTER TEST BEGIN\n"); - doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1), "0001-01-01T00:00:00" ); - doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1), - "0001-01-01T00:00:00Z", "0001-01-01T00:00:00" ); -// doTest( util::DateTime(0, 0, 0, 0, 1, 1, -1), "-0001-01-01T00:00:00" ); -// doTest( util::DateTime(0, 0, 0, 0, 1, 1, -1), "-0001-01-01T00:00:00Z" ); - doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1), - "0001-01-01T00:00:00-00:00", "0001-01-01T00:00:00" ); - doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1), - "0001-01-01T00:00:00+00:00", "0001-01-01T00:00:00" ); - doTest( util::DateTime(0, 0, 0, 0, 2, 1, 1)/*(0, 0, 12, 0, 2, 1, 1)*/, - "0001-01-02T00:00:00-12:00", "0001-01-02T00:00:00" ); -// "0001-02-01T12:00:00" ); - doTest( util::DateTime(0, 0, 0, 0, 2, 1, 1)/*(0, 0, 12, 0, 1, 1, 1)*/, - "0001-01-02T00:00:00+12:00", "0001-01-02T00:00:00" ); -// "0001-01-01T12:00:00" ); - doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999), - "9999-12-31T23:59:59.99" ); - doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999), - "9999-12-31T23:59:59.99Z", "9999-12-31T23:59:59.99" ); - doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999), - "9999-12-31T23:59:59.9999999999999999999999999999999999999", - "9999-12-31T23:59:59.99" ); - doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999), - "9999-12-31T23:59:59.9999999999999999999999999999999999999Z", - "9999-12-31T23:59:59.99" ); - doTest( util::DateTime(0, 0, 0, 24, 1, 1, 333) - /*(0, 0, 0, 0, 2, 1, 333)*/, - "0333-01-01T24:00:00"/*, "0333-01-02T00:00:00"*/ ); - doTestF( "+0001-01-01T00:00:00" ); // invalid: ^+ - doTestF( "1-01-01T00:00:00" ); // invalid: < 4 Y - doTestF( "0001-1-01T00:00:00" ); // invalid: < 2 M - doTestF( "0001-01-1T00:00:00" ); // invalid: < 2 D - doTestF( "0001-01-01T0:00:00" ); // invalid: < 2 H - doTestF( "0001-01-01T00:0:00" ); // invalid: < 2 M - doTestF( "0001-01-01T00:00:0" ); // invalid: < 2 S - doTestF( "0001-01-01T00:00:00." ); // invalid: .$ - doTestF( "0001-01-01T00:00:00+1:00" ); // invalid: < 2 TZ H - doTestF( "0001-01-01T00:00:00+00:1" ); // invalid: < 2 TZ M - doTestF( "0001-13-01T00:00:00" ); // invalid: M > 12 - doTestF( "0001-01-32T00:00:00" ); // invalid: D > 31 - doTestF( "0001-01-01T25:00:00" ); // invalid: H > 24 - doTestF( "0001-01-01T00:60:00" ); // invalid: H > 59 - doTestF( "0001-01-01T00:00:60" ); // invalid: S > 59 - doTestF( "0001-01-01T24:01:00" ); // invalid: H=24, but M != 0 - doTestF( "0001-01-01T24:00:01" ); // invalid: H=24, but S != 0 - doTestF( "0001-01-01T24:00:00.1" ); // invalid: H=24, but H != 0 - doTestF( "0001-01-02T00:00:00+15:00" ); // invalid: TZ > +14:00 - doTestF( "0001-01-02T00:00:00+14:01" ); // invalid: TZ > +14:00 - doTestF( "0001-01-02T00:00:00-15:00" ); // invalid: TZ < -14:00 - doTestF( "0001-01-02T00:00:00-14:01" ); // invalid: TZ < -14:00 - OSL_TRACE("\nSAX CONVERTER TEST END\n"); - } -}; -static Test test; -#endif /** gets the position of the first comma after npos in the string rStr. Commas inside '"' pairs are not matched */ -- cgit v1.2.3 From 23db89852fe61acef4e8f58fa83f80dd65591e1d Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 19 May 2010 18:38:32 +0200 Subject: sw33bf04: #i111712#: sfx2: convert crude test in Metadatable.cxx to cppunit --- sfx2/prj/build.lst | 1 + sfx2/qa/cppunit/makefile.mk | 74 +++++++++ sfx2/qa/cppunit/test_metadatable.cxx | 280 +++++++++++++++++++++++++++++++++++ sfx2/qa/cppunit/version.map | 34 +++++ sfx2/source/doc/Metadatable.cxx | 162 -------------------- 5 files changed, 389 insertions(+), 162 deletions(-) create mode 100644 sfx2/qa/cppunit/makefile.mk create mode 100644 sfx2/qa/cppunit/test_metadatable.cxx create mode 100644 sfx2/qa/cppunit/version.map diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index 3e791fbc2000..590991872545 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -22,3 +22,4 @@ sf sfx2\source\inet nmake - all sf_inet sf_sdi sf_inc NULL sf sfx2\source\explorer nmake - all sf_expl sf_sdi sf_inc NULL sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL sf sfx2\qa\unoapi nmake - all sf_qa_unoapi NULL +sf sfx2\qa\cppunit nmake - all sf_qa_cppunit sf_util NULL diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk new file mode 100644 index 000000000000..2794c2ae92bb --- /dev/null +++ b/sfx2/qa/cppunit/makefile.mk @@ -0,0 +1,74 @@ +#************************************************************************* +# +# 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=sfx2 +TARGET=qa_cppunit + +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +CFLAGSCXX += $(CPPUNIT_CFLAGS) +DLLPRE = # no leading "lib" on .so files + +# --- Libs --------------------------------------------------------- + +SHL1OBJS= \ + $(SLO)/test_metadatable.obj \ + + +SHL1STDLIBS= \ + $(CPPUNITLIB) \ + $(SALLIB) \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(VCLLIB) \ + $(SFXLIB) \ + + +SHL1TARGET= test_metadatable +SHL1RPATH = NONE +SHL1IMPLIB= i$(SHL1TARGET) +# SHL1DEF= $(MISC)/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +# DEF1EXPORTFILE= export.exp +SHL1VERSIONMAP= version.map + +# --- All object files --------------------------------------------- + +SLOFILES= \ + $(SHL1OBJS) \ + + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk +.INCLUDE : _cppunit.mk + diff --git a/sfx2/qa/cppunit/test_metadatable.cxx b/sfx2/qa/cppunit/test_metadatable.cxx new file mode 100644 index 000000000000..903be6920327 --- /dev/null +++ b/sfx2/qa/cppunit/test_metadatable.cxx @@ -0,0 +1,280 @@ +/************************************************************************* + * + * 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_sfx2.hxx" + +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include + + +using namespace ::com::sun::star; + + +namespace { + +class MetadatableTest + : public ::CppUnit::TestFixture +{ +public: + virtual void setUp(); + virtual void tearDown(); + + void test(); + + CPPUNIT_TEST_SUITE(MetadatableTest); + CPPUNIT_TEST(test); + CPPUNIT_TEST_SUITE_END(); + +private: +}; + +void MetadatableTest::setUp() +{ +} + +void MetadatableTest::tearDown() +{ +} + + +class MockMetadatable + : public ::sfx2::Metadatable +{ +private: + ::sfx2::IXmlIdRegistry & m_rRegistry; + +public: + MockMetadatable(::sfx2::IXmlIdRegistry & i_rReg, + bool const i_isInClip = false) + : m_rRegistry(i_rReg) + , m_bInClipboard(i_isInClip), m_bInUndo(false), m_bInContent(true) {} + bool m_bInClipboard; + bool m_bInUndo; + bool m_bInContent; + virtual bool IsInClipboard() const { return m_bInClipboard; } + virtual bool IsInUndo() const { return m_bInUndo; } + virtual bool IsInContent() const { return m_bInContent; } + virtual ::sfx2::IXmlIdRegistry& GetRegistry() { return m_rRegistry; } + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::rdf::XMetadatable > MakeUnoObject() { return 0; } +}; + +static bool operator==(beans::StringPair p1, beans::StringPair p2) +{ + return p1.First == p2.First && p1.Second == p2.Second; +} + +void MetadatableTest::test() +{ + OSL_TRACE("SwMetadatable test(): start\n"); + ::std::auto_ptr< ::sfx2::IXmlIdRegistry > const pReg( + ::sfx2::createXmlIdRegistry(false) ); + ::std::auto_ptr< ::sfx2::IXmlIdRegistry > const pRegClip( + ::sfx2::createXmlIdRegistry(true) ); + + MockMetadatable m1(*pReg); + MockMetadatable m2(*pReg); + MockMetadatable m3(*pReg); + MockMetadatable m4(*pReg); + MockMetadatable m5(*pReg); + ::rtl::OUString empty; + ::rtl::OUString content( ::rtl::OUString::createFromAscii("content.xml") ); + ::rtl::OUString styles ( ::rtl::OUString::createFromAscii("styles.xml") ); + ::rtl::OUString sid1( ::rtl::OUString::createFromAscii("id1") ); + ::rtl::OUString sid2( ::rtl::OUString::createFromAscii("id2") ); + ::rtl::OUString sid3( ::rtl::OUString::createFromAscii("id3") ); + ::rtl::OUString sid4( ::rtl::OUString::createFromAscii("id4") ); + beans::StringPair id1(content, sid1); + beans::StringPair id2(content, sid2); + beans::StringPair id3(content, sid3); + beans::StringPair id4(styles, sid4); + beans::StringPair id3e(empty, sid3); + beans::StringPair id4e(empty, sid4); + m1.SetMetadataReference(id1); + CPPUNIT_ASSERT_MESSAGE("set failed", m1.GetMetadataReference() == id1); + try { + m2.SetMetadataReference(id1); + CPPUNIT_ASSERT_MESSAGE("set duplicate succeeded", false); + } catch (lang::IllegalArgumentException) { } + m1.SetMetadataReference(id1); + CPPUNIT_ASSERT_MESSAGE("set failed (existing)", + m1.GetMetadataReference() == id1); + m1.EnsureMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("ensure failed (existing)", + m1.GetMetadataReference() == id1); + + m2.EnsureMetadataReference(); + beans::StringPair m2id(m2.GetMetadataReference()); + CPPUNIT_ASSERT_MESSAGE("ensure failed", m2id.Second.getLength()); + m2.EnsureMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("ensure failed (idempotent)", + m2.GetMetadataReference() == m2id); + + m1.m_bInUndo = true; + CPPUNIT_ASSERT_MESSAGE("move to undo failed", + !m1.GetMetadataReference().Second.getLength()); + + m1.m_bInUndo = false; + CPPUNIT_ASSERT_MESSAGE("move from undo failed", + m1.GetMetadataReference() == id1); + + m1.m_bInUndo = true; + try { + m2.SetMetadataReference(id1); // steal! + } catch (lang::IllegalArgumentException &) { + CPPUNIT_FAIL("set duplicate to undo failed"); + } + m1.m_bInUndo = false; + CPPUNIT_ASSERT_MESSAGE("move from undo: duplicate", + !m1.GetMetadataReference().Second.getLength()); + + m3.RegisterAsCopyOf(m2); + CPPUNIT_ASSERT_MESSAGE("copy: source", m2.GetMetadataReference() == id1); + CPPUNIT_ASSERT_MESSAGE("copy: duplicate", + !m3.GetMetadataReference().Second.getLength()); + m4.RegisterAsCopyOf(m3); + CPPUNIT_ASSERT_MESSAGE("copy: source", m2.GetMetadataReference() == id1); + CPPUNIT_ASSERT_MESSAGE("copy: duplicate", + !m3.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("copy: duplicate", + !m4.GetMetadataReference().Second.getLength()); + m2.m_bInUndo = true; + CPPUNIT_ASSERT_MESSAGE("duplicate to undo", + m3.GetMetadataReference() == id1); + CPPUNIT_ASSERT_MESSAGE("duplicate to undo", + !m2.GetMetadataReference().Second.getLength()); + m2.m_bInUndo = false; + CPPUNIT_ASSERT_MESSAGE("duplicate from undo", + m2.GetMetadataReference() == id1); + CPPUNIT_ASSERT_MESSAGE("duplicate from undo", + !m3.GetMetadataReference().Second.getLength()); + + m4.EnsureMetadataReference(); // new! + beans::StringPair m4id(m4.GetMetadataReference()); + CPPUNIT_ASSERT_MESSAGE("ensure on duplicate", + m4id.Second.getLength() && !(m4id == id1)); + + MockMetadatable mc1(*pRegClip, true); // in clipboard + MockMetadatable mc2(*pRegClip, true); + MockMetadatable mc3(*pRegClip, true); + MockMetadatable mc4(*pRegClip, true); + MockMetadatable m2p(*pReg); + MockMetadatable m3p(*pReg); + + mc1.SetMetadataReference(id2); + CPPUNIT_ASSERT_MESSAGE("set failed", mc1.GetMetadataReference() == id2); + try { + mc2.SetMetadataReference(id2); + CPPUNIT_FAIL("set duplicate succeeded"); + } catch (lang::IllegalArgumentException) { } + mc1.SetMetadataReference(id2); + CPPUNIT_ASSERT_MESSAGE("set failed (existing)", + mc1.GetMetadataReference() == id2); + mc1.EnsureMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("ensure failed (existing)", + mc1.GetMetadataReference() == id2); + mc2.EnsureMetadataReference(); + beans::StringPair mc2id(mc2.GetMetadataReference()); + CPPUNIT_ASSERT_MESSAGE("ensure failed", mc2id.Second.getLength()); + mc2.EnsureMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("ensure failed (idempotent)", + mc2.GetMetadataReference() == mc2id); + mc2.RemoveMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("remove failed", + !mc2.GetMetadataReference().Second.getLength()); + + // set up mc2 as copy of m2 and mc3 as copy of m3 + mc3.RegisterAsCopyOf(m3); + CPPUNIT_ASSERT_MESSAGE("copy to clipboard (latent)", + !mc3.GetMetadataReference().Second.getLength() ); + mc2.RegisterAsCopyOf(m2); + CPPUNIT_ASSERT_MESSAGE("copy to clipboard (non-latent)", + mc2.GetMetadataReference() == id1); + // paste mc2 to m2p and mc3 to m3p + m2p.RegisterAsCopyOf(mc2); + CPPUNIT_ASSERT_MESSAGE("paste from clipboard (non-latent)", + !m2p.GetMetadataReference().Second.getLength() ); + m3p.RegisterAsCopyOf(mc3); + CPPUNIT_ASSERT_MESSAGE("paste from clipboard (latent)", + !m3p.GetMetadataReference().Second.getLength() ); + // delete m2, m2p, m3 + m2.RemoveMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("remove failed", + !m2.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("paste-remove (non-latent)", + m2p.GetMetadataReference() == id1); + m2p.RemoveMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("remove failed", + !m2p.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("paste-remove2 (non-latent)", + m3.GetMetadataReference() == id1); + m3.RemoveMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("remove failed", + !m3.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("paste-remove (latent)", + m3p.GetMetadataReference() == id1); + // delete mc2 + mc2.SetMetadataReference(beans::StringPair()); + CPPUNIT_ASSERT_MESSAGE("in clipboard becomes non-latent", + !mc3.GetMetadataReference().Second.getLength() ); + // paste mc2 + m2p.RegisterAsCopyOf(mc2); + CPPUNIT_ASSERT_MESSAGE("remove-paste", + !m2p.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("remove-paste (stolen)", + m3p.GetMetadataReference() == id1); + + // auto-detect stream + m5.SetMetadataReference(id3e); + CPPUNIT_ASSERT_MESSAGE("auto-detect (content)", + m5.GetMetadataReference() == id3); + m5.m_bInContent = false; + m5.SetMetadataReference(id4e); + CPPUNIT_ASSERT_MESSAGE("auto-detect (styles)", + m5.GetMetadataReference() == id4); + + OSL_TRACE("sfx2::Metadatable test(): finished\n"); +} + + +CPPUNIT_TEST_SUITE_REGISTRATION(MetadatableTest); + +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + diff --git a/sfx2/qa/cppunit/version.map b/sfx2/qa/cppunit/version.map new file mode 100644 index 000000000000..3308588ef6f8 --- /dev/null +++ b/sfx2/qa/cppunit/version.map @@ -0,0 +1,34 @@ +#************************************************************************* +# +# 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. +# +#************************************************************************* + +UDK_3_0_0 { + global: + cppunitTestPlugIn; + + local: + *; +}; diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index b1b69e5ac74f..92f391305aeb 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -1674,168 +1674,6 @@ throw (uno::RuntimeException) #if OSL_DEBUG_LEVEL > 1 -static ::sfx2::XmlIdRegistryDocument s_Reg; -static ::sfx2::XmlIdRegistryClipboard s_RegClip; - -class MockMetadatable : public ::sfx2::Metadatable -{ -public: - MockMetadatable(bool i_isInClip = false) : - m_bInClipboard(i_isInClip), m_bInUndo(false), m_bInContent(true) {} - bool m_bInClipboard; - bool m_bInUndo; - bool m_bInContent; - virtual bool IsInClipboard() const { return m_bInClipboard; } - virtual bool IsInUndo() const { return m_bInUndo; } - virtual bool IsInContent() const { return m_bInContent; } - virtual ::sfx2::XmlIdRegistry& GetRegistry() { return m_bInClipboard ? static_cast< ::sfx2::XmlIdRegistry&>(s_RegClip) : static_cast< ::sfx2::XmlIdRegistry&>(s_Reg); } - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::rdf::XMetadatable > MakeUnoObject() { return 0; } -}; - -bool operator==(beans::StringPair p1, beans::StringPair p2) -{ - return p1.First == p2.First && p1.Second == p2.Second; -} - -void test() -{ - OSL_TRACE("SwMetadatable test(): start\n"); - MockMetadatable m1; - MockMetadatable m2; - MockMetadatable m3; - MockMetadatable m4; - MockMetadatable m5; - ::rtl::OUString empty; - ::rtl::OUString content( ::rtl::OUString::createFromAscii("content.xml") ); - ::rtl::OUString styles ( ::rtl::OUString::createFromAscii("styles.xml") ); - ::rtl::OUString sid1( ::rtl::OUString::createFromAscii("id1") ); - ::rtl::OUString sid2( ::rtl::OUString::createFromAscii("id2") ); - ::rtl::OUString sid3( ::rtl::OUString::createFromAscii("id3") ); - ::rtl::OUString sid4( ::rtl::OUString::createFromAscii("id4") ); - beans::StringPair id1(content, sid1); - beans::StringPair id2(content, sid2); - beans::StringPair id3(content, sid3); - beans::StringPair id4(styles, sid4); - beans::StringPair id3e(empty, sid3); - beans::StringPair id4e(empty, sid4); - m1.SetMetadataReference(id1); - OSL_ENSURE(m1.GetMetadataReference() == id1, "set failed"); - try { - m2.SetMetadataReference(id1); - OSL_ENSURE(false, "set duplicate succeeded"); - } catch (lang::IllegalArgumentException) { } - m1.SetMetadataReference(id1); - OSL_ENSURE(m1.GetMetadataReference() == id1, "set failed (existing)"); - m1.EnsureMetadataReference(); - OSL_ENSURE(m1.GetMetadataReference() == id1, "ensure failed (existing)"); - - m2.EnsureMetadataReference(); - beans::StringPair m2id(m2.GetMetadataReference()); - OSL_ENSURE(m2id.Second.getLength(), "ensure failed"); - m2.EnsureMetadataReference(); - OSL_ENSURE(m2.GetMetadataReference() == m2id, "ensure failed (idempotent)"); - - m1.m_bInUndo = true; - OSL_ENSURE(!m1.GetMetadataReference().Second.getLength(), "move to undo failed"); - - m1.m_bInUndo = false; - OSL_ENSURE(m1.GetMetadataReference() == id1, "move from undo failed"); - - m1.m_bInUndo = true; - try { - m2.SetMetadataReference(id1); // steal! - } catch (lang::IllegalArgumentException &) { - OSL_ENSURE(false, "set duplicate to undo failed"); - } - m1.m_bInUndo = false; - OSL_ENSURE(!m1.GetMetadataReference().Second.getLength(), "move from undo: duplicate"); - - m3.RegisterAsCopyOf(m2); - OSL_ENSURE(m2.GetMetadataReference() == id1, "copy: source"); - OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "copy: duplicate"); - m4.RegisterAsCopyOf(m3); - OSL_ENSURE(m2.GetMetadataReference() == id1, "copy: source"); - OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "copy: duplicate"); - OSL_ENSURE(!m4.GetMetadataReference().Second.getLength(), "copy: duplicate"); - m2.m_bInUndo = true; - OSL_ENSURE(m3.GetMetadataReference() == id1, "duplicate to undo"); - OSL_ENSURE(!m2.GetMetadataReference().Second.getLength(), "duplicate to undo"); - m2.m_bInUndo = false; - OSL_ENSURE(m2.GetMetadataReference() == id1, "duplicate from undo"); - OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "duplicate from undo"); - - m4.EnsureMetadataReference(); // new! - beans::StringPair m4id(m4.GetMetadataReference()); - OSL_ENSURE(m4id.Second.getLength() && !(m4id == id1), "ensure on duplicate"); - - MockMetadatable mc1(true); // in clipboard - MockMetadatable mc2(true); - MockMetadatable mc3(true); - MockMetadatable mc4(true); - MockMetadatable m2p; - MockMetadatable m3p; - - mc1.SetMetadataReference(id2); - OSL_ENSURE(mc1.GetMetadataReference() == id2, "set failed"); - try { - mc2.SetMetadataReference(id2); - OSL_ENSURE(false, "set duplicate succeeded"); - } catch (lang::IllegalArgumentException) { } - mc1.SetMetadataReference(id2); - OSL_ENSURE(mc1.GetMetadataReference() == id2, "set failed (existing)"); - mc1.EnsureMetadataReference(); - OSL_ENSURE(mc1.GetMetadataReference() == id2, "ensure failed (existing)"); - mc2.EnsureMetadataReference(); - beans::StringPair mc2id(mc2.GetMetadataReference()); - OSL_ENSURE(mc2id.Second.getLength(), "ensure failed"); - mc2.EnsureMetadataReference(); - OSL_ENSURE(mc2.GetMetadataReference() == mc2id, "ensure failed (idempotent)"); - mc2.RemoveMetadataReference(); - OSL_ENSURE(!mc2.GetMetadataReference().Second.getLength(), "remove failed"); - - // set up mc2 as copy of m2 and mc3 as copy of m3 - mc3.RegisterAsCopyOf(m3); - OSL_ENSURE(!mc3.GetMetadataReference().Second.getLength() , "copy to clipboard (latent)"); - mc2.RegisterAsCopyOf(m2); - OSL_ENSURE(mc2.GetMetadataReference() == id1, "copy to clipboard (non-latent)"); - // paste mc2 to m2p and mc3 to m3p - m2p.RegisterAsCopyOf(mc2); - OSL_ENSURE(!m2p.GetMetadataReference().Second.getLength() , "paste from clipboard (non-latent)"); - m3p.RegisterAsCopyOf(mc3); - OSL_ENSURE(!m3p.GetMetadataReference().Second.getLength() , "paste from clipboard (latent)"); - // delete m2, m2p, m3 - m2.RemoveMetadataReference(); - OSL_ENSURE(!m2.GetMetadataReference().Second.getLength(), "remove failed"); - OSL_ENSURE(m2p.GetMetadataReference() == id1, "paste-remove (non-latent)"); - m2p.RemoveMetadataReference(); - OSL_ENSURE(!m2p.GetMetadataReference().Second.getLength(), "remove failed"); - OSL_ENSURE(m3.GetMetadataReference() == id1, "paste-remove2 (non-latent)"); - m3.RemoveMetadataReference(); - OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "remove failed"); - OSL_ENSURE(m3p.GetMetadataReference() == id1, "paste-remove (latent)"); - // delete mc2 - mc2.SetMetadataReference(beans::StringPair()); - OSL_ENSURE(!mc3.GetMetadataReference().Second.getLength() , "in clipboard becomes non-latent"); - // paste mc2 - m2p.RegisterAsCopyOf(mc2); - OSL_ENSURE(!m2p.GetMetadataReference().Second.getLength(), "remove-paste"); - OSL_ENSURE(m3p.GetMetadataReference() == id1, "remove-paste (stolen)"); - - // auto-detect stream - m5.SetMetadataReference(id3e); - OSL_ENSURE(m5.GetMetadataReference() == id3, "auto-detect (content)"); - m5.m_bInContent = false; - m5.SetMetadataReference(id4e); - OSL_ENSURE(m5.GetMetadataReference() == id4, "auto-detect (styles)"); - - OSL_TRACE("sfx2::Metadatable test(): finished\n"); -} - -struct Test { Test() { test(); } }; -static Test s_test; - - #include static void dump(sfx2::XmlIdList_t * pList) -- cgit v1.2.3 From 0b1074b019d3ca14ba5345a0c5d979804a059d9e Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Thu, 20 May 2010 11:36:59 +0800 Subject: findbar01:#111709# Fix shortcut name for Ctrl-G --- .../registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index fe8127dd1a79..0a7fccc6d3b1 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -1483,6 +1483,14 @@ 1 + + + Focus to Findbar + + + 1 + + What's ~This? -- cgit v1.2.3 From b865a8f1e4ded4e1177c0f80d99293fefe74bebe Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Thu, 20 May 2010 11:17:02 +0200 Subject: hb33patches1: #i100709#: applied patch --- sw/source/filter/ww8/wrtw8esh.cxx | 19 ++----------------- sw/source/filter/ww8/ww8par3.cxx | 17 +++++++---------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 6686ae5b13d7..f2cbc71eceed 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -270,25 +270,10 @@ void WW8Export::DoCheckBox(uno::Reference xPropSet) sal_Int16 nTemp = 0; xPropSet->getPropertyValue(C2U("DefaultState")) >>= nTemp; - sal_uInt32 nIsDefaultChecked(nTemp); + aFFData.setDefaultResult(nTemp); xPropSet->getPropertyValue(C2U("State")) >>= nTemp; - sal_uInt32 nIsChecked(nTemp); - - if (nIsDefaultChecked != nIsChecked) - { - switch (nIsChecked) - { - case false: - aFFData.setResult(0); - break; - case true: - aFFData.setResult(1); - break; - default: - ASSERT(!this, "how did that happen"); - } - } + aFFData.setResult(nTemp); ::rtl::OUString aStr; static ::rtl::OUString sName(C2U("Name")); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 465d07c0d2b5..58f5496b4575 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2207,20 +2207,17 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, { *pDataStream >> nDefaultChecked; nChecked = nDefaultChecked; - //Don't know the details yet - switch (nHeaderByte) + + sal_uInt8 iRes = (nHeaderByte >> 2) & 0x1F; + switch (iRes) { - case 0x65: //01100101 - //use defaults ? + case 1: //checked + nChecked = true; break; - case 0x1: //00000001 - //swap to unchecked from checked (#114841)? + case 25: //undefined, Undefined checkboxes are treated as unchecked + case 0: //unchecked nChecked = false; break; - case 0x5: //00000101 - //change to checked - nChecked = true; - break; default: ASSERT(!this, "unknown option, please report to cmc"); break; -- cgit v1.2.3 From 27da46a0e764b80fff9b2cecd22c2c2bee29aea4 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 21 May 2010 10:13:38 +0200 Subject: cws tl74: updating slots fixed --- starmath/source/edit.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 302b475c0452..f7093f9c3815 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -880,7 +880,10 @@ void SmEditWindow::Cut() { DBG_ASSERT( pEditView, "EditView missing" ); if (pEditView) + { pEditView->Cut(); + GetDoc()->SetModified( TRUE ); + } } void SmEditWindow::Copy() @@ -894,14 +897,20 @@ void SmEditWindow::Paste() { DBG_ASSERT( pEditView, "EditView missing" ); if (pEditView) + { pEditView->Paste(); + GetDoc()->SetModified( TRUE ); + } } void SmEditWindow::Delete() { DBG_ASSERT( pEditView, "EditView missing" ); if (pEditView) + { pEditView->DeleteSelected(); + GetDoc()->SetModified( TRUE ); + } } void SmEditWindow::InsertText(const String& Text) -- cgit v1.2.3 From 67beb47e3a75703c4e64becfcd144e1343bd08e9 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 21 May 2010 15:17:51 +0200 Subject: sw33bf04: #i111747#: nranges.cxx: remove superfluous wrong memset calls --- svl/source/items/nranges.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx index 284bc251a3a4..ae633276300f 100644 --- a/svl/source/items/nranges.cxx +++ b/svl/source/items/nranges.cxx @@ -480,7 +480,6 @@ SfxNumRanges& SfxNumRanges::operator -= NUMTYPE nThisSize = Count_Impl(_pRanges); NUMTYPE nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) ); NUMTYPE *pTarget = new NUMTYPE[ nTargetSize ]; - memset( pTarget, sizeof(NUMTYPE)*nTargetSize, 0 ); memcpy( pTarget, _pRanges, sizeof(NUMTYPE)*nThisSize ); NUMTYPE nPos1 = 0, nPos2 = 0, nTargetPos = 0; @@ -690,7 +689,6 @@ SfxNumRanges& SfxNumRanges::operator /= NUMTYPE nThisSize = Count_Impl(_pRanges); NUMTYPE nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) ); NUMTYPE *pTarget = new NUMTYPE[ nTargetSize ]; - memset( pTarget, sizeof(NUMTYPE)*nTargetSize, 0 ); memcpy( pTarget, _pRanges, sizeof(NUMTYPE)*nThisSize ); NUMTYPE nPos1 = 0, nPos2 = 0, nTargetPos = 0; -- cgit v1.2.3 From 047c38908df32c7de6634b1d5963b0df71d4e6e8 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 21 May 2010 15:19:08 +0200 Subject: sw33bf04: #i58606#: ~SwExtTextInput(): do not do anything if in SwDoc dtor --- sw/source/core/doc/extinput.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx index 2b2c809c3cb2..f627870932f9 100644 --- a/sw/source/core/doc/extinput.cxx +++ b/sw/source/core/doc/extinput.cxx @@ -54,6 +54,9 @@ SwExtTextInput::SwExtTextInput( const SwPaM& rPam, Ring* pRing ) SwExtTextInput::~SwExtTextInput() { + SwDoc *const pDoc = GetDoc(); + if (pDoc->IsInDtor()) { return; /* #i58606# */ } + SwTxtNode* pTNd = GetPoint()->nNode.GetNode().GetTxtNode(); if( pTNd ) { @@ -69,7 +72,6 @@ SwExtTextInput::~SwExtTextInput() // damit Undo / Redlining usw. richtig funktioniert, // muss ueber die Doc-Schnittstellen gegangen werden !!! - SwDoc* pDoc = GetDoc(); if(eInputLanguage != LANGUAGE_DONTKNOW) { // --> FME 2005-02-11 #i41974# Only set language attribute -- cgit v1.2.3 From d20b81017eb53c5c19a8aed6d5f785c469f91808 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 21 May 2010 15:21:49 +0200 Subject: sw33bf04: #i85766#: prevent field expansion in clipboard: SwField: add a String member to cache the value. SwField: wrap Expand() and Copy() methods to use/update cache. update all callers to pass the clipboard flag to new SwField::ExpandField(). --- sw/inc/fldbas.hxx | 15 ++++++++++++--- sw/inc/txtfld.hxx | 3 ++- sw/source/core/crsr/crstrvl.cxx | 5 ++--- sw/source/core/crsr/findtxt.cxx | 4 +++- sw/source/core/doc/docfld.cxx | 20 +++++++++++++++----- sw/source/core/edit/edattr.cxx | 6 +----- sw/source/core/edit/edfld.cxx | 5 ++--- sw/source/core/fields/cellfml.cxx | 3 ++- sw/source/core/fields/fldbas.cxx | 17 +++++++++++++++++ sw/source/core/tox/txmsrt.cxx | 5 +++-- sw/source/core/txtnode/atrfld.cxx | 13 ++++++++----- sw/source/core/txtnode/ndtxt.cxx | 14 ++++++++++---- sw/source/core/txtnode/thints.cxx | 3 ++- sw/source/core/undo/SwUndoField.cxx | 12 +++++++----- sw/source/filter/ascii/ascatr.cxx | 3 ++- sw/source/filter/html/htmlfldw.cxx | 2 +- sw/source/filter/rtf/rtfatr.cxx | 9 ++++++--- sw/source/filter/ww8/ww8atr.cxx | 10 +++++----- sw/source/ui/dbui/dbinsdlg.cxx | 29 +++-------------------------- sw/source/ui/docvw/edtwin2.cxx | 18 ++---------------- sw/source/ui/fldui/fldmgr.cxx | 2 +- sw/source/ui/fldui/fldpage.cxx | 14 +------------- 22 files changed, 107 insertions(+), 105 deletions(-) diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index a39dcefaabd3..a2e08366ba24 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -305,12 +305,17 @@ inline void SwFieldType::UpdateFlds() const class SW_DLLPUBLIC SwField { +private: + mutable String m_Cache; /// #i85766# cached expansion (for clipboard) USHORT nLang; // Immer ueber SetLanguage aendern! BOOL bIsAutomaticLanguage; sal_uInt32 nFormat; SwFieldType* pType; + virtual String Expand() const = 0; + virtual SwField* Copy() const = 0; + protected: void SetFormat(sal_uInt32 nSet) {nFormat = nSet;} @@ -325,12 +330,16 @@ public: // neuen Typ setzen (wird fuer das Kopieren zwischen Dokumenten benutzt) virtual SwFieldType* ChgTyp( SwFieldType* ); - // Expandierung fuer die Anzeige - virtual String Expand() const = 0; + /** expand the field. + @param bInClipboard field is in clipboard document? + @return the generated text (suitable for display) + */ + String ExpandField(bool const bInClipboard) const; // liefert den Namen oder den Inhalt virtual String GetCntnt(BOOL bName = FALSE) const; - virtual SwField* Copy() const = 0; + + SwField * CopyField() const; // ResId USHORT Which() const diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx index 1daff7d2e914..d0be4a008cab 100644 --- a/sw/inc/txtfld.hxx +++ b/sw/inc/txtfld.hxx @@ -41,7 +41,8 @@ class SwTxtFld : public SwTxtAttr SwTxtNode * m_pTxtNode; public: - SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStart ); + SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart, + bool const bInClipboard); virtual ~SwTxtFld(); void CopyFld( SwTxtFld *pDest ) const; diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 9ea80b899a6d..495339bc4b98 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -34,9 +34,7 @@ #include #include #include -#ifndef _SVX_SVDOBJ_HXX #include -#endif #include #include #include @@ -718,7 +716,8 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField( (SwDateTimeFieldType*)pDoc->GetSysFldType( RES_DATETIMEFLD ) ) ); - pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex() ); + pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(), + pDoc->IsClipBoard() ); pTxtFld->ChgTxtNode( pTNd ); } diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index bb458ad49643..5a383d1d0b1b 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -145,7 +145,9 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart, // Fuer das Ende merken wir uns die Ersetzungen und entferenen // hinterher alle am Stringende (koenten ja 'normale' 0x7f drinstehen BOOL bEmpty = RES_TXTATR_FIELD != pHt->Which() || - !((SwTxtFld*)pHt)->GetFld().GetFld()->Expand().Len(); + !(static_cast(pHt) + ->GetFld().GetFld()->ExpandField( + rNd.GetDoc()->IsClipBoard()).Len()); if ( bEmpty && nStart == nAkt ) { rArr.Insert( nAkt, rArr.Count() ); diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index ebac34bf3540..f4e80e9de52a 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -1241,13 +1241,18 @@ void SwDoc::FldsToExpand( SwHash**& ppHashTbl, USHORT& rTblSize, // Eintrag in den HashTable eintragen // Eintrag vorhanden ? pFnd = Find( rName, ppHashTbl, rTblSize, &nPos ); + String const value(pFld->ExpandField(IsClipBoard())); if( pFnd ) + { // Eintrag in der HashTabelle aendern - ((_HashStr*)pFnd)->aSetStr = pFld->Expand(); + static_cast<_HashStr*>(pFnd)->aSetStr = value; + } else + { // neuen Eintrag einfuegen *(ppHashTbl + nPos ) = new _HashStr( rName, - pFld->Expand(), (_HashStr*)*(ppHashTbl + nPos)); + value, static_cast<_HashStr *>(*(ppHashTbl + nPos))); + } } break; } @@ -1413,13 +1418,18 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds ) // Eintrag vorhanden ? USHORT nPos; SwHash* pFnd = Find( rName, pHashStrTbl, nStrFmtCnt, &nPos ); + String const value(pFld->ExpandField(IsClipBoard())); if( pFnd ) + { // Eintrag in der HashTabelle aendern - ((_HashStr*)pFnd)->aSetStr = pFld->Expand(); + static_cast<_HashStr*>(pFnd)->aSetStr = value; + } else + { // neuen Eintrag einfuegen *(pHashStrTbl + nPos ) = new _HashStr( rName, - pFld->Expand(), (_HashStr*)*(pHashStrTbl + nPos)); + value, static_cast<_HashStr *>(*(pHashStrTbl + nPos))); + } } break; case RES_GETEXPFLD: @@ -2724,7 +2734,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld, //pDstFld->ChangeFormat( rSrcFld.GetFormat() ); //pDstFld->SetLanguage( rSrcFld.GetLanguage() ); - SwField * pNewFld = rSrcFld.Copy(); + SwField * pNewFld = rSrcFld.CopyField(); pDstFmtFld->SetFld(pNewFld); switch( nFldWhich ) diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 9e1cf28f0eb1..b46c202b882a 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -31,14 +31,10 @@ #include -#ifndef _SVX_TSTPITEM_HXX //autogen #include -#endif #include #include -#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include -#endif #include #include #include @@ -461,7 +457,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos, const SwField* const pFld = pAttr->GetFld().GetFld(); if (pFld) { - sExp += pFld->Expand(); + sExp += pFld->ExpandField(rTNd.GetDoc()->IsClipBoard()); } } } diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index a919da9a6515..1e4f699fa203 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -42,9 +42,7 @@ #include #include #include -#ifndef _DBMGR_HXX #include -#endif #include #include @@ -226,7 +224,8 @@ void SwEditShell::FieldToText( SwFieldType* pType ) *pFmtFld->GetTxtFld()->GetStart() ); // Feldinhalt durch Text ersetzen - String aEntry( pFmtFld->GetFld()->Expand() ); + String const aEntry( + pFmtFld->GetFld()->ExpandField(GetDoc()->IsClipBoard()) ); pPaM->SetMark(); pPaM->Move( fnMoveForward ); GetDoc()->DeleteRange( *pPaM ); diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index aa46869bca1a..182ed12d6ddd 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -203,7 +203,8 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const break; default: - nRet = rCalcPara.rCalc.Calculate( pFld->Expand() ).GetDouble(); + String const value(pFld->ExpandField(pDoc->IsClipBoard())); + nRet = rCalcPara.rCalc.Calculate(value).GetDouble(); } } else diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index ec65d0644bba..c47bd63e70ad 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -437,6 +437,23 @@ BOOL SwField::IsFixed() const return bRet; } +String SwField::ExpandField(bool const bInClipboard) const +{ + if (!bInClipboard) // #i85766# do not expand fields in clipboard documents + { + m_Cache = Expand(); + } + return m_Cache; +} + +SwField * SwField::CopyField() const +{ + SwField *const pNew = Copy(); + // #i85766# cache expansion of source (for clipboard) + pNew->m_Cache = Expand(); + return pNew; +} + /*-------------------------------------------------------------------- Beschreibung: Numerierung expandieren --------------------------------------------------------------------*/ diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 5cfffeaf5229..61f873b010b7 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -870,8 +870,9 @@ USHORT SwTOXAuthority::GetLevel() const -----------------------------------------------------------------------*/ void SwTOXAuthority::_GetText( String& rTxt, String& ) { - // - rTxt = m_rField.GetFld()->Expand(); + bool const isClipBoard( + m_rField.GetTxtFld()->GetTxtNode().GetDoc()->IsClipBoard()); + rTxt = m_rField.GetFld()->ExpandField(isClipBoard); } /* -----------------21.09.99 12:50------------------- diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 3ddd3189bf6c..5c75f79954a7 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include "reffld.hxx" #include "ddefld.hxx" @@ -68,7 +69,7 @@ SwFmtFld::SwFmtFld( const SwField &rFld ) SwClient( rFld.GetTyp() ), pTxtAttr( 0 ) { - pField = rFld.Copy(); + pField = rFld.CopyField(); } // #i24434# @@ -83,7 +84,7 @@ SwFmtFld::SwFmtFld( const SwFmtFld& rAttr ) if(rAttr.GetFld()) { rAttr.GetFld()->GetTyp()->Add(this); - pField = rAttr.GetFld()->Copy(); + pField = rAttr.GetFld()->CopyField(); } } @@ -254,9 +255,10 @@ BOOL SwFmtFld::IsProtect() const |* *************************************************************************/ -SwTxtFld::SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStartPos ) +SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos, + bool const bInClipboard) : SwTxtAttr( rAttr, nStartPos ) - , m_aExpand( rAttr.GetFld()->Expand() ) + , m_aExpand( rAttr.GetFld()->ExpandField(bInClipboard) ) , m_pTxtNode( 0 ) { rAttr.pTxtAttr = this; @@ -283,7 +285,8 @@ void SwTxtFld::Expand() const ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" ); const SwField* pFld = GetFld().GetFld(); - XubString aNewExpand( pFld->Expand() ); + XubString aNewExpand( + pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) ); if( aNewExpand == m_aExpand ) { diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 7474cb50fe4a..dd66bcbef379 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2994,8 +2994,10 @@ void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt, rTxt.Erase( nPos, 1 ); if( bExpandFlds ) { - const XubString aExpand( ((SwTxtFld*)pAttr)->GetFld(). - GetFld()->Expand() ); + const XubString aExpand( + static_cast(pAttr)->GetFld() + .GetFld()->ExpandField( + GetDoc()->IsClipBoard())); rTxt.Insert( aExpand, nPos ); nPos = nPos + aExpand.Len(); nEndPos = nEndPos + aExpand.Len(); @@ -3142,7 +3144,9 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, { case RES_TXTATR_FIELD: { - const XubString aExpand( ((SwTxtFld*)pHt)->GetFld().GetFld()->Expand() ); + XubString const aExpand( + static_cast(pHt)->GetFld().GetFld() + ->ExpandField(GetDoc()->IsClipBoard())); if( aExpand.Len() ) { aDestIdx++; // dahinter einfuegen; @@ -3238,7 +3242,9 @@ const ModelToViewHelper::ConversionMap* const SwTxtAttr* pAttr = (*pSwpHints2)[i]; if ( RES_TXTATR_FIELD == pAttr->Which() ) { - const XubString aExpand( ((SwTxtFld*)pAttr)->GetFld().GetFld()->Expand() ); + const XubString aExpand( + static_cast(pAttr)->GetFld().GetFld() + ->ExpandField(GetDoc()->IsClipBoard())); if ( aExpand.Len() > 0 ) { const xub_StrLen nFieldPos = *pAttr->GetStart(); diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index a2e326777383..9f6c7f6eb7bd 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1042,7 +1042,8 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr, pNew = new SwTxtINetFmt( (SwFmtINetFmt&)rNew, nStt, nEnd ); break; case RES_TXTATR_FIELD: - pNew = new SwTxtFld( (SwFmtFld&)rNew, nStt ); + pNew = new SwTxtFld( static_cast(rNew), nStt, + rDoc.IsClipBoard() ); break; case RES_TXTATR_FLYCNT: { diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx index fe189d5adf50..8a3c6c507c93 100644 --- a/sw/source/core/undo/SwUndoField.cxx +++ b/sw/source/core/undo/SwUndoField.cxx @@ -63,12 +63,14 @@ SwPosition SwUndoField::GetPosition() } SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos, - const SwField & _aOldField, - const SwField & _aNewField, + const SwField & rOldField, + const SwField & rNewField, SwMsgPoolItem * _pHnt, BOOL _bUpdate, SwUndoId _nId) - : SwUndoField(rPos,_nId), pOldField(_aOldField.Copy()), - pNewField(_aNewField.Copy()), pHnt(_pHnt), - bUpdate(_bUpdate) + : SwUndoField(rPos,_nId) + , pOldField(rOldField.CopyField()) + , pNewField(rNewField.CopyField()) + , pHnt(_pHnt) + , bUpdate(_bUpdate) { ASSERT(pOldField, "No old field!"); ASSERT(pNewField, "No new field!"); diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index eadaea834d80..71adf763e49e 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -124,7 +124,8 @@ BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos ) switch( pHt->Which() ) { case RES_TXTATR_FIELD: - sOut = ((SwTxtFld*)pHt)->GetFld().GetFld()->Expand(); + sOut = static_cast(pHt)->GetFld().GetFld() + ->ExpandField(rWrt.pDoc->IsClipBoard()); break; case RES_TXTATR_FTN: diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 2e67ffcde1f8..50b7bdc7ddc8 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -305,7 +305,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, } // Inhalt des Feldes ausgeben - String sExpand( pFld->Expand() ); + String const sExpand( pFld->ExpandField(rWrt.pDoc->IsClipBoard()) ); sal_Bool bNeedsCJKProcessing = sal_False; if( sExpand.Len() ) { diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index a569f91e5966..1e3697c7a67d 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -2902,7 +2902,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) case RES_HIDDENTXTFLD: if( TYP_CONDTXTFLD == ((SwHiddenTxtField*)pFld)->GetSubType() ) - RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(), + RTFOutFuncs::Out_String( rWrt.Strm(), + pFld->ExpandField(rWrt.pDoc->IsClipBoard()), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); else { @@ -2958,7 +2959,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) rWrt.Strm() >> cCh; if( ' ' != cCh ) // vorweg immer einen Trenner rWrt.Strm() << ' '; - RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(), + RTFOutFuncs::Out_String( rWrt.Strm(), + pFld->ExpandField(rWrt.pDoc->IsClipBoard()), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); } break; @@ -2967,7 +2969,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) if( aFldStt.Len() ) { rWrt.Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << ' '; - RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(), + RTFOutFuncs::Out_String( rWrt.Strm(), + pFld->ExpandField(rWrt.pDoc->IsClipBoard()), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); rWrt.Strm() << "}}"; rRTFWrt.bOutFmtAttr = FALSE; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index c1c254a47f8d..8bf79cc74a6c 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -1743,9 +1743,9 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c, aItems.GetData()); } -String lcl_GetExpandedField(const SwField &rFld) +String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc) { - String sRet(rFld.Expand()); + String sRet(rFld.ExpandField(rDoc.IsClipBoard())); //replace LF 0x0A with VT 0x0B sRet.SearchAndReplaceAll(0x0A, 0x0B); @@ -1871,7 +1871,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType, { String sOut; if( pFld ) - sOut = lcl_GetExpandedField(*pFld); + sOut = lcl_GetExpandedField(*pFld, *pDoc); else sOut = rFldCmd; if( sOut.Len() ) @@ -2598,7 +2598,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef) sStr.APPEND_CONST_ASC( "\" " ); m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END ); - String sVar = lcl_GetExpandedField( rFld ); + String sVar = lcl_GetExpandedField( rFld, *GetExport().pDoc ); if ( sVar.Len() ) { if ( m_rWW8Export.IsUnicode() ) @@ -2614,7 +2614,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef) void WW8AttributeOutput::WriteExpand( const SwField* pFld ) { - String sExpand( lcl_GetExpandedField( *pFld ) ); + String sExpand( lcl_GetExpandedField( *pFld, *GetExport().pDoc ) ); if ( m_rWW8Export.IsUnicode() ) SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false ); else diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 97455d9e2514..b44ee246ac41 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -33,15 +33,10 @@ #include "dbinsdlg.hxx" -#ifndef INCLUDED_MEMORY #include -#define INCLUDED_MEMORY -#endif -#ifndef INCLUDED_FLOAT_H #include -#define INCLUDED_FLOAT_H -#endif + #include #include #include @@ -65,9 +60,7 @@ #include #include #include -#ifndef __SV_MNEMONIC_HXX #include -#endif #include #include #include @@ -78,24 +71,16 @@ #include #include #include -#ifndef _SWTABLEREP_HXX //autogen #include -#endif #include #include #include #include #include #include -#ifndef _WVIEW_HXX #include -#endif -#ifndef _DOCSH_HXX #include -#endif -#ifndef _DBMGR_HXX #include -#endif #include #include #include @@ -108,19 +93,11 @@ #include #include -#ifndef _DBINSDLG_HRC #include -#endif -#ifndef _DBUI_HRC #include -#endif -#ifndef _CMDID_H #include -#endif -#ifndef _HELPID_H #include -#endif #include #include #include @@ -1380,8 +1357,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence& rSelection, case _DB_Column::DB_COL_FIELD: { - SwDBField* pFld = (SwDBField*)pDBCol->DB_ColumnData. - pField->Copy(); + SwDBField *const pFld = static_cast( + pDBCol->DB_ColumnData.pField->CopyField()); double nValue = DBL_MAX; Reference< XPropertySet > xColumnProps; diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index d605ef993457..8f003538db6f 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -35,9 +35,7 @@ #include #endif -#ifndef _HELP_HXX //autogen #include -#endif #include #include #include @@ -46,24 +44,15 @@ #include #include #include -#ifndef _OUTLINER_HXX //autogen -#define _EEITEMID_HXX #include -#endif #include #include #include #include -#ifndef _MODCFG_HXX #include -#endif -#ifndef _VIEW_HXX #include -#endif #include -#ifndef _DOCSH_HXX #include -#endif #include #include #include @@ -80,12 +69,8 @@ #include #include #include -#ifndef _DOCVW_HRC #include -#endif -#ifndef _UTLUI_HRC #include -#endif #include #include @@ -320,7 +305,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) { USHORT nOldSubType = pFld->GetSubType(); ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD); - sTxt = pFld->Expand(); + sTxt = + pFld->ExpandField(rSh.GetDoc()->IsClipBoard()); ((SwField*)pFld)->SetSubType(nOldSubType); } break; diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index 3499c8875093..95001f897702 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -1435,7 +1435,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, } else { - pTmpFld = pCurFld->Copy(); + pTmpFld = pCurFld->CopyField(); bDelete = true; } diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 39a6a98d764b..265a53dc6646 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -42,28 +42,16 @@ #include #include #include -#ifndef _DOCSH_HXX #include -#endif #include -#ifndef _VIEW_HXX #include -#endif #include #include -#ifndef _FLDTDLG_HXX #include -#endif -#ifndef _FLDPAGE_HXX #include -#endif #include -#ifndef _CMDID_H #include -#endif -#ifndef _GLOBALS_HRC #include -#endif #include using namespace ::com::sun::star; @@ -218,7 +206,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1, } else // Feld aendern { - SwField * pTmpFld = m_pCurFld->Copy(); + SwField *const pTmpFld = m_pCurFld->CopyField(); String sPar1(rPar1); String sPar2(rPar2); -- cgit v1.2.3 From 96cd75686a6da042a029510c5fa36a781190905e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 25 May 2010 17:01:06 +0200 Subject: sw33bf04: #i111677#: swdtflvr.cxx: call SetClipBoard() for clipboard docs --- sw/source/ui/dochdl/swdtflvr.cxx | 52 +++++++++++++++++++++++++--------------- sw/source/ui/inc/swdtflvr.hxx | 2 -- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 7778b3848f45..95d6cf685fc0 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -322,6 +322,19 @@ SwTransferable::~SwTransferable() // ----------------------------------------------------------------------- +static SwDoc * lcl_GetDoc(SwDocFac & rDocFac) +{ + SwDoc *const pDoc = rDocFac.GetDoc(); + ASSERT( pDoc, "Document not found" ); + if (pDoc) + { + pDoc->SetClipBoard( true ); + } + return pDoc; +} + +// ----------------------------------------------------------------------- + void SwTransferable::ObjectReleased() { SwModule *pMod = SW_MOD(); @@ -443,7 +456,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) } pClpDocFac = new SwDocFac; - SwDoc* pTmpDoc = pClpDocFac->GetDoc(); + SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen @@ -530,8 +543,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) case SOT_FORMATSTR_ID_DRAWING: { - SwDoc *pDoc = pClpDocFac->GetDoc(); - ASSERT( pDoc, "Document not found" ); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); bOK = SetObject( pDoc->GetDrawModel(), SWTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor ); } @@ -539,21 +551,22 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) case SOT_FORMAT_STRING: { - SwDoc* pDoc = pClpDocFac->GetDoc(); - ASSERT( pDoc, "Document not found" ); - pDoc->SetClipBoard( true ); - bOK = SetObject( pDoc, - SWTRANSFER_OBJECTTYPE_STRING, rFlavor ); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_STRING, rFlavor ); } break; case SOT_FORMAT_RTF: - bOK = SetObject( pClpDocFac->GetDoc(), - SWTRANSFER_OBJECTTYPE_RTF, rFlavor ); + { + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_RTF, rFlavor ); + } break; case SOT_FORMATSTR_ID_HTML: - bOK = SetObject( pClpDocFac->GetDoc(), - SWTRANSFER_OBJECTTYPE_HTML, rFlavor ); + { + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_HTML, rFlavor ); + } break; case SOT_FORMATSTR_ID_SVXB: @@ -597,7 +610,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) // default: if( !aDocShellRef.Is() ) { - SwDoc *pDoc = pClpDocFac->GetDoc(); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); SwDocShell* pNewDocSh = new SwDocShell( pDoc, SFX_CREATE_MODE_EMBEDDED ); aDocShellRef = pNewDocSh; @@ -805,7 +818,8 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) pOrigGrf = pClpBitmap; pClpDocFac = new SwDocFac; - pWrtShell->Copy( pClpDocFac->GetDoc() ); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + pWrtShell->Copy( pDoc ); if (pOrigGrf && !pOrigGrf->GetBitmap().IsEmpty()) AddFormat( SOT_FORMATSTR_ID_SVXB ); @@ -827,7 +841,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) else if ( nSelection == nsSelectionType::SEL_OLE ) { pClpDocFac = new SwDocFac; - SwDoc *pDoc = pClpDocFac->GetDoc(); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); aDocShellRef = new SwDocShell( pDoc, SFX_CREATE_MODE_EMBEDDED); aDocShellRef->DoInitNew( NULL ); pWrtShell->Copy( pDoc ); @@ -857,8 +871,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) if( pWrtShell->IsAddMode() && pWrtShell->SwCrsrShell::HasSelection() ) pWrtShell->CreateCrsr(); - SwDoc* pTmpDoc = pClpDocFac->GetDoc(); - pTmpDoc->SetClipBoard( true ); + SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen @@ -1017,7 +1030,8 @@ int SwTransferable::CalculateAndCopy() String aStr( pWrtShell->Calculate() ); pClpDocFac = new SwDocFac; - pWrtShell->Copy( pClpDocFac->GetDoc(), &aStr); + SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); + pWrtShell->Copy(pDoc, & aStr); eBufferType = TRNSFR_DOCUMENT; AddFormat( FORMAT_STRING ); @@ -1037,7 +1051,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE ); pClpDocFac = new SwDocFac; - SwDoc* pCDoc = pClpDocFac->GetDoc(); + SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac); SwNodes& rNds = pCDoc->GetNodes(); SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() ); diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx index 84b3309f70bc..a239f13f1ec2 100644 --- a/sw/source/ui/inc/swdtflvr.hxx +++ b/sw/source/ui/inc/swdtflvr.hxx @@ -26,12 +26,10 @@ ************************************************************************/ #ifndef _SWDTFLVR_HXX #define _SWDTFLVR_HXX -#ifndef _TRANSFER_HXX #include #include -#endif #include #include #include -- cgit v1.2.3 From 2aaba84b23c9b23a78a5ec813b5d4a4584f59318 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 25 May 2010 17:02:28 +0200 Subject: sw33bf04: #i111677#: prevent number string expansion in clipboard: SwTxtNode: add member: number string cache. [how to add this to SwNodeNum is not obvious, so add it to SwTxtNode.] SwTxtNode::GetNumString(): use cached number string in clipboard. SwTxtNode::CopyText(): cache source number string in clipboard. --- sw/inc/ndtxt.hxx | 6 ++++-- sw/source/core/txtnode/ndtxt.cxx | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 868340edc800..ff6082043b0d 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _NDTXT_HXX -#define _NDTXT_HXX +#ifndef SW_NDTXT_HXX +#define SW_NDTXT_HXX #include @@ -133,6 +133,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable // pointer to the list, to whose the text node is added to SwList* mpList; // <-- + /// #i111677# cached expansion (for clipboard) + ::std::auto_ptr< ::rtl::OUString > m_pNumStringCache; ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XTextContent> m_wXParagraph; diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index dd66bcbef379..25b1e913c82e 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1486,6 +1486,13 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest, xub_StrLen nTxtStartIdx = rStart.GetIndex(); xub_StrLen nDestStart = rDestStart.GetIndex(); // alte Pos merken + if (pDest->GetDoc()->IsClipBoard() && this->GetNum()) + { + // #i111677# cache expansion of source (for clipboard) + pDest->m_pNumStringCache.reset( + new ::rtl::OUString(this->GetNumString())); + } + if( !nLen ) { // wurde keine Laenge angegeben, dann Kopiere die Attribute @@ -2771,6 +2778,11 @@ BOOL SwTxtNode::HasBullet() const //i53420 added max outline parameter XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, const unsigned int _nRestrictToThisLevel ) const { + if (GetDoc()->IsClipBoard() && m_pNumStringCache.get()) + { + // #i111677# do not expand number strings in clipboard documents + return *m_pNumStringCache; + } const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; if ( pRule && IsCountedInList() && -- cgit v1.2.3 From 135fceba66df52704efc8dd3b458fa338ce3e0e0 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 25 May 2010 17:04:49 +0200 Subject: sw33bf04: #i111727#: SwDoc::DeleteRange should adjust cursors (via PaMCorrAbs) --- sw/inc/doc.hxx | 1 + sw/source/core/doc/docedt.cxx | 29 +++++++++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index ff3d91add396..8260eba142d0 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -715,6 +715,7 @@ private: bool DeleteAndJoinImpl(SwPaM&, const bool); bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false); bool DeleteRangeImpl(SwPaM&, const bool unused = false); + bool DeleteRangeImplImpl(SwPaM &); bool ReplaceRangeImpl(SwPaM&, String const&, const bool); public: diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index c9ee5b00e181..31484ac303dd 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -1604,17 +1604,9 @@ bool SwDoc::DeleteAndJoinImpl( SwPaM & rPam, } // <-- { - // dann eine Kopie vom Cursor erzeugen um alle Pams aus den - // anderen Sichten aus dem Loeschbereich zu verschieben - // ABER NICHT SICH SELBST !! - SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() ); - ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() ); - - const bool bSuccess( DeleteRangeImpl( aDelPam ) ); + bool const bSuccess( DeleteRangeImpl( rPam ) ); if (!bSuccess) return false; - - *rPam.GetPoint() = *aDelPam.GetPoint(); } if( bJoinTxt ) @@ -1625,7 +1617,24 @@ bool SwDoc::DeleteAndJoinImpl( SwPaM & rPam, return true; } -bool SwDoc::DeleteRangeImpl( SwPaM & rPam, const bool ) +bool SwDoc::DeleteRangeImpl(SwPaM & rPam, const bool) +{ + // move all cursors out of the deleted range. + // but first copy the given PaM, because it could be a cursor that + // would be moved! + SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() ); + ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() ); + + bool const bSuccess( DeleteRangeImplImpl( aDelPam ) ); + if (bSuccess) + { // now copy position from temp copy to given PaM + *rPam.GetPoint() = *aDelPam.GetPoint(); + } + + return bSuccess; +} + +bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam) { SwPosition *pStt = (SwPosition*)rPam.Start(), *pEnd = (SwPosition*)rPam.End(); -- cgit v1.2.3 From 11586ca1f1cf6bb472b70fb9d3171bc451d6a3a1 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 26 May 2010 16:34:58 +0800 Subject: findbar01: #111823# change QuickFind shortcut to Ctrl-Alt-F --- .../data/org/openoffice/Office/Accelerators.xcu | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index a79f0df22940..e6ad2ab1fe63 100755 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -568,6 +568,11 @@ .uno:CalculateHard + + I10N SHORTCUTS - NO TRANSLATE + vnd.sun.star.findbar:FocusToFindbar + + I10N SHORTCUTS - NO TRANSLATE .uno:Bold @@ -577,7 +582,6 @@ I10N SHORTCUTS - NO TRANSLATE .uno:RepeatSearch - vnd.sun.star.findbar:FocusToFindbar .uno:Bold @@ -1091,6 +1095,11 @@ .uno:TextFitToSize + + I10N SHORTCUTS - NO TRANSLATE + vnd.sun.star.findbar:FocusToFindbar + + I10N SHORTCUTS - NO TRANSLATE .uno:Bold @@ -1098,7 +1107,6 @@ I10N SHORTCUTS - NO TRANSLATE - vnd.sun.star.findbar:FocusToFindbar .uno:Save .uno:Bold @@ -2056,6 +2064,11 @@ .uno:TextFitToSize + + I10N SHORTCUTS - NO TRANSLATE + vnd.sun.star.findbar:FocusToFindbar + + I10N SHORTCUTS - NO TRANSLATE .uno:Bold @@ -2063,7 +2076,6 @@ I10N SHORTCUTS - NO TRANSLATE - vnd.sun.star.findbar:FocusToFindbar .uno:Save .uno:Bold @@ -4445,6 +4457,11 @@ .uno:UpdateInputFields + + I10N SHORTCUTS - NO TRANSLATE + vnd.sun.star.findbar:FocusToFindbar + + I10N SHORTCUTS - NO TRANSLATE .uno:Bold @@ -4454,7 +4471,6 @@ I10N SHORTCUTS - NO TRANSLATE .uno:RepeatSearch - vnd.sun.star.findbar:FocusToFindbar .uno:Bold -- cgit v1.2.3 From 3b7fbe601de8cf26b7765d4b920a861d571f1e16 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 26 May 2010 16:38:12 +0800 Subject: findbar01: #111826#, #111827# and make some optimizations for the code --- svx/inc/tbunosearchcontrollers.hxx | 42 ++- svx/source/tbxctrls/tbunosearchcontrollers.cxx | 359 +++++++------------------ 2 files changed, 124 insertions(+), 277 deletions(-) diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx index 3b52852c61fd..aec07042e1fc 100644 --- a/svx/inc/tbunosearchcontrollers.hxx +++ b/svx/inc/tbunosearchcontrollers.hxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -49,13 +50,26 @@ namespace css = ::com::sun::star ; namespace svx { -class FindTextFieldControl; - -struct ExecuteInfo +class FindTextFieldControl : public ComboBox { - css::uno::Reference< css::frame::XDispatch > xDispatch; - css::util::URL aTargetURL; - css::uno::Sequence< css::beans::PropertyValue > aArgs; +public: + FindTextFieldControl( Window* pParent, WinBits nStyle, + css::uno::Reference< css::frame::XFrame >& xFrame, + css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); + virtual ~FindTextFieldControl(); + + virtual void Modify(); + virtual long PreNotify( NotifyEvent& rNEvt ); + + void InitControls_Impl(); + void Remember_Impl(const String& rStr); + +private: + + css::uno::Reference< css::frame::XFrame > m_xFrame; + css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager; + sal_Bool m_bToClearTextField; + }; class SearchToolbarControllersManager @@ -119,14 +133,10 @@ public: // XStatusListener virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException ); - sal_Int32 getFontSizePixel( const Window* pWindow ); - - DECL_STATIC_LINK( FindTextToolbarController, ExecuteHdl_Impl, ExecuteInfo* ); DECL_LINK(EditModifyHdl, void*); private: - css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; FindTextFieldControl* m_pFindTextFieldControl; USHORT m_nDownSearchId; // item position of findbar @@ -171,12 +181,6 @@ public: // XStatusListener virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ); - DECL_STATIC_LINK( DownSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo* ); - -private : - - css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; - }; class UpSearchToolboxController : public svt::ToolboxController, @@ -216,12 +220,6 @@ public: // XStatusListener virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ); - DECL_STATIC_LINK( UpSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo* ); - -private : - - css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; - }; // protocol handler for "vnd.sun.star.findbar:*" URLs diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 487c6f2359ef..2399f4d2c27d 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -36,7 +36,6 @@ #include #include -#include #include #include #include @@ -47,35 +46,33 @@ namespace svx static const ::rtl::OUString SEARCHITEM_SEARCHSTRING = ::rtl::OUString::createFromAscii("SearchItem.SearchString"); static const ::rtl::OUString SEARCHITEM_SEARCHBACKWARD = ::rtl::OUString::createFromAscii("SearchItem.Backward"); +static const ::rtl::OUString COMMAND_EXECUTESEARCH = ::rtl::OUString::createFromAscii(".uno:ExecuteSearch"); static const ::rtl::OUString COMMAND_FINDTEXT = ::rtl::OUString::createFromAscii(".uno:FindText") ; static const ::rtl::OUString COMMAND_DOWNSEARCH = ::rtl::OUString::createFromAscii(".uno:DownSearch"); static const ::rtl::OUString COMMAND_UPSEARCH = ::rtl::OUString::createFromAscii(".uno:UpSearch") ; +static const ::rtl::OUString COMMAND_APPENDSEARCHHISTORY = ::rtl::OUString::createFromAscii("AppendSearchHistory"); -static const ::rtl::OUString COMMAND_APPENDSEARCHHISTORY = ::rtl::OUString::createFromAscii("AppendSearchHistory") ; +static const ::rtl::OUString SERVICENAME_URLTRANSFORMER = ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer"); +static const sal_Int32 REMEMBER_SIZE = 10; -class FindTextFieldControl : public ComboBox +void impl_executeSearch( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr, css::uno::Reference< css::frame::XFrame >& xFrame, css::uno::Sequence< css::beans::PropertyValue >& lArgs ) { -public: - FindTextFieldControl( Window* pParent, WinBits nStyle, - css::uno::Reference< css::frame::XFrame >& xFrame, - css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); - virtual ~FindTextFieldControl(); - - virtual void Modify(); - virtual long PreNotify( NotifyEvent& rNEvt ); - - void InitControls_Impl(); - void Remember_Impl(const String& rStr); - -private: - - css::uno::Reference< css::frame::XFrame > m_xFrame; - css::uno::Reference < css::util::XURLTransformer > m_xURLTransformer; - css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager; - - sal_Bool m_bToClearTextField; + css::uno::Reference< css::util::XURLTransformer > xURLTransformer( rSMgr->createInstance(SERVICENAME_URLTRANSFORMER), css::uno::UNO_QUERY ); + if ( xURLTransformer.is() ) + { + css::util::URL aURL; + aURL.Complete = COMMAND_EXECUTESEARCH; + xURLTransformer->parseStrict(aURL); -}; + css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider(xFrame, css::uno::UNO_QUERY); + if ( xDispatchProvider.is() ) + { + css::uno::Reference< css::frame::XDispatch > xDispatch = xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 ); + if ( xDispatch.is() && aURL.Complete.getLength() > 0 ) + xDispatch->dispatch( aURL, lArgs ); + } + } +} FindTextFieldControl::FindTextFieldControl( Window* pParent, WinBits nStyle, css::uno::Reference< css::frame::XFrame >& xFrame, @@ -85,10 +82,6 @@ FindTextFieldControl::FindTextFieldControl( Window* pParent, WinBits nStyle, m_xServiceManager(xServiceManager), m_bToClearTextField(sal_True) { - m_xURLTransformer = css::uno::Reference< css::util::XURLTransformer >( m_xServiceManager->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), - css::uno::UNO_QUERY_THROW ); - InitControls_Impl(); } @@ -107,11 +100,16 @@ void FindTextFieldControl::InitControls_Impl() void FindTextFieldControl::Remember_Impl(const String& rStr) { USHORT nCount = GetEntryCount(); + for (USHORT i=0; iGetKeyCode().GetCode(); sal_Bool bCtrl = pKeyEvent->GetKeyCode().IsMod1(); - if (bCtrl && KEY_G== nCode) + sal_Bool bAlt = pKeyEvent->GetKeyCode().IsMod2(); + sal_Bool bShift = pKeyEvent->GetKeyCode().IsShift(); + sal_uInt16 nCode = pKeyEvent->GetKeyCode().GetCode(); + + if ( bCtrl && bAlt && KEY_F == nCode ) GrabFocusToDocument(); - if (KEY_RETURN == nCode) + if ( KEY_RETURN == nCode ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - Remember_Impl(GetText()); - css::uno::Reference< css::frame::XDispatch > xDispatch; - css::util::URL aTargetURL; + ::rtl::OUString sFindText = GetText(); + css::uno::Sequence< css::beans::PropertyValue > lArgs(2); - if ( m_xURLTransformer.is() ) - { - aTargetURL.Complete = ::rtl::OUString::createFromAscii(".uno:ExecuteSearch"); - m_xURLTransformer->parseStrict( aTargetURL ); + lArgs[0].Name = SEARCHITEM_SEARCHSTRING; + lArgs[0].Value <<= sFindText; - css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( m_xFrame, css::uno::UNO_QUERY); - if ( xDispatchProvider.is() ) - xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 ); - } + lArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; + if (bShift) + lArgs[1].Value <<= sal_True; + else + lArgs[1].Value <<= sal_False; - if ( xDispatch.is() && aTargetURL.Complete.getLength() > 0 ) - { - ::rtl::OUString sFindText = GetText(); - css::uno::Sequence< css::beans::PropertyValue > aArgs( 2 ); - aArgs[0].Name = SEARCHITEM_SEARCHSTRING; - aArgs[0].Value <<= sFindText; - aArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; - aArgs[1].Value <<= sal_False; - - // Execute dispatch asynchronously - ExecuteInfo* pExecuteInfo = new ExecuteInfo; - pExecuteInfo->xDispatch = xDispatch; - pExecuteInfo->aTargetURL = aTargetURL; - pExecuteInfo->aArgs = aArgs; - Application::PostUserEvent( STATIC_LINK(0, DownSearchToolboxController , ExecuteHdl_Impl), pExecuteInfo ); - } + impl_executeSearch(m_xServiceManager, m_xFrame, lArgs); } break; } @@ -181,6 +164,7 @@ long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) SetText( String() ); m_bToClearTextField = sal_False; } + SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); break; case EVENT_LOSEFOCUS: @@ -188,7 +172,6 @@ long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) { SetText( String( ::rtl::OUString::createFromAscii("Find") ) ); SetControlForeground(COL_GRAY); - m_bToClearTextField = sal_True; } break; @@ -242,7 +225,6 @@ void SearchToolbarControllersManager::registryController( const css::uno::Refere pIt->second[nSize].Name = sCommandURL; pIt->second[nSize].Value <<= xStatusListener; } - } void SearchToolbarControllersManager::freeController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& /*xStatusListener*/, const ::rtl::OUString& sCommandURL ) @@ -290,11 +272,8 @@ css::uno::Reference< css::frame::XStatusListener > SearchToolbarControllersManag FindTextToolbarController::FindTextToolbarController( const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager ) :svt::ToolboxController( rServiceManager, css::uno::Reference< css::frame::XFrame >(), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FindText" )) ) + COMMAND_FINDTEXT ) { - m_xURLTransformer = css::uno::Reference< css::util::XURLTransformer >( m_xServiceManager->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), - css::uno::UNO_QUERY_THROW ); } FindTextToolbarController::~FindTextToolbarController() @@ -402,13 +381,9 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL FindTextToolbarController::cre ToolBox* pToolbar = ( ToolBox* )pParent; m_pFindTextFieldControl = new FindTextFieldControl( pToolbar, WinBits( WB_DROPDOWN | WB_VSCROLL), m_xFrame, m_xServiceManager ); - // Calculate height of the edit field according to the application font height - sal_Int32 nHeight = getFontSizePixel( m_pFindTextFieldControl ); - nHeight += 200; - m_pFindTextFieldControl->SetSizePixel( Size( 100, nHeight )); - + Size aSize(100, m_pFindTextFieldControl->GetTextHeight() + 200); + m_pFindTextFieldControl->SetSizePixel( aSize ); m_pFindTextFieldControl->SetModifyHdl(LINK(this, FindTextToolbarController, EditModifyHdl)); - } xItemWindow = VCLUnoHelper::GetInterface( m_pFindTextFieldControl ); @@ -429,38 +404,6 @@ void SAL_CALL FindTextToolbarController::statusChanged( const css::frame::Featur } } -sal_Int32 FindTextToolbarController::getFontSizePixel( const Window* pWindow ) -{ - const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - const Font& rFont = rSettings.GetAppFont(); - - // Calculate height of the application font used by window - sal_Int32 nHeight = sal_Int32( rFont.GetHeight() ); - ::Size aPixelSize = pWindow->LogicToPixel( ::Size( 0, nHeight ), MAP_APPFONT ); - return aPixelSize.Height(); -} - -IMPL_STATIC_LINK_NOINSTANCE( FindTextToolbarController, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) -{ - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); - try - { - // Asynchronous execution as this can lead to our own destruction! - // Framework can recycle our current frame and the layout manager disposes all user interface - // elements if a component gets detached from its frame! - pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs ); - } - catch ( css::uno::Exception& ) - { - - } - - Application::AcquireSolarMutex( nRef ); - delete pExecuteInfo; - - return 0; -} - IMPL_LINK( FindTextToolbarController, EditModifyHdl, void *, EMPTYARG ) { // enable or disable item DownSearch/UpSearch of findbar @@ -493,11 +436,8 @@ IMPL_LINK( FindTextToolbarController, EditModifyHdl, void *, EMPTYARG ) DownSearchToolboxController::DownSearchToolboxController(const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager ) : svt::ToolboxController( rServiceManager, css::uno::Reference< css::frame::XFrame >(), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DownSearch" )) ) + COMMAND_DOWNSEARCH ) { - m_xURLTransformer = css::uno::Reference< css::util::XURLTransformer >( m_xServiceManager->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), - css::uno::UNO_QUERY_THROW ); } DownSearchToolboxController::~DownSearchToolboxController() @@ -577,89 +517,46 @@ void SAL_CALL DownSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) if ( m_bDisposed ) throw css::lang::DisposedException(); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - - css::uno::Reference< css::frame::XDispatch > xDispatch; - css::util::URL aTargetURL; - - if ( m_xURLTransformer.is() ) - { - aTargetURL.Complete = ::rtl::OUString::createFromAscii(".uno:ExecuteSearch"); - m_xURLTransformer->parseStrict( aTargetURL ); - - css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( m_xFrame, css::uno::UNO_QUERY); - if ( xDispatchProvider.is() ) - xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 ); - } - - if ( xDispatch.is() && aTargetURL.Complete.getLength() > 0 ) + ::rtl::OUString sFindText; + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) { - ::rtl::OUString sFindText; - Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); - ToolBox* pToolBox = (ToolBox*)pWindow; - if ( pToolBox ) + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; iGetItemCount(); - for ( USHORT i=0; iGetItemCommand(i); + if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) { - ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); - if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) - { - Window* pItemWin = pToolBox->GetItemWindow(i); - if (pItemWin) - sFindText = pItemWin->GetText(); - break; - } + Window* pItemWin = pToolBox->GetItemWindow(i); + if (pItemWin) + sFindText = pItemWin->GetText(); + break; } } + } - css::uno::Sequence< css::beans::PropertyValue > aArgs( 2 ); - aArgs[0].Name = SEARCHITEM_SEARCHSTRING; - aArgs[0].Value <<= sFindText; - aArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; - aArgs[1].Value <<= sal_False; - - // Execute dispatch asynchronously - ExecuteInfo* pExecuteInfo = new ExecuteInfo; - pExecuteInfo->xDispatch = xDispatch; - pExecuteInfo->aTargetURL = aTargetURL; - pExecuteInfo->aArgs = aArgs; - Application::PostUserEvent( STATIC_LINK(0, DownSearchToolboxController , ExecuteHdl_Impl), pExecuteInfo ); - - css::frame::FeatureStateEvent aEvent; - css::util::URL aCommand; - aCommand.Complete = COMMAND_APPENDSEARCHHISTORY; - aEvent.FeatureURL = aCommand; - aEvent.IsEnabled = sal_True; - - css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT); + css::uno::Sequence< css::beans::PropertyValue > lArgs(2); + lArgs[0].Name = SEARCHITEM_SEARCHSTRING; + lArgs[0].Value <<= sFindText; + lArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; + lArgs[1].Value <<= sal_False; + + impl_executeSearch(m_xServiceManager, m_xFrame, lArgs); + + css::frame::FeatureStateEvent aEvent; + aEvent.FeatureURL.Complete = COMMAND_APPENDSEARCHHISTORY; + css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT); + if (xStatusListener.is()) xStatusListener->statusChanged( aEvent ); - } } // XStatusListener void SAL_CALL DownSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException ) { -} - -IMPL_STATIC_LINK_NOINSTANCE( DownSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) -{ - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); - try - { - // Asynchronous execution as this can lead to our own destruction! - // Framework can recycle our current frame and the layout manager disposes all user interface - // elements if a component gets detached from its frame! - pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs ); - } - catch ( css::uno::Exception& ) - { - } - - Application::AcquireSolarMutex( nRef ); - delete pExecuteInfo; - - return 0; + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + if ( m_bDisposed ) + return; } //----------------------------------------------------------------------------------------------------------- @@ -668,11 +565,8 @@ IMPL_STATIC_LINK_NOINSTANCE( DownSearchToolboxController, ExecuteHdl_Impl, Execu UpSearchToolboxController::UpSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager ) :svt::ToolboxController( rServiceManager, css::uno::Reference< css::frame::XFrame >(), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:UpSearch" )) ) + COMMAND_UPSEARCH ) { - m_xURLTransformer = css::uno::Reference< css::util::XURLTransformer >( m_xServiceManager->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), - css::uno::UNO_QUERY_THROW ); } UpSearchToolboxController::~UpSearchToolboxController() @@ -752,89 +646,46 @@ void SAL_CALL UpSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) th if ( m_bDisposed ) throw css::lang::DisposedException(); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - - css::uno::Reference< css::frame::XDispatch > xDispatch; - css::util::URL aTargetURL; - - if ( m_xURLTransformer.is() ) - { - aTargetURL.Complete = ::rtl::OUString::createFromAscii(".uno:ExecuteSearch"); - m_xURLTransformer->parseStrict( aTargetURL ); - - css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( m_xFrame, css::uno::UNO_QUERY); - if ( xDispatchProvider.is() ) - xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 ); - } - - if ( xDispatch.is() && aTargetURL.Complete.getLength() > 0 ) + ::rtl::OUString sFindText; + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) { - ::rtl::OUString sFindText; - Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); - ToolBox* pToolBox = (ToolBox*)pWindow; - if ( pToolBox ) + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; iGetItemCount(); - for ( USHORT i=0; iGetItemCommand(i); + if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) { - ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); - if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) - { - Window* pItemWin = pToolBox->GetItemWindow(i); - if (pItemWin) - sFindText = pItemWin->GetText(); - break; - } + Window* pItemWin = pToolBox->GetItemWindow(i); + if (pItemWin) + sFindText = pItemWin->GetText(); + break; } } + } - css::uno::Sequence< css::beans::PropertyValue > aArgs( 2 ); - aArgs[0].Name = SEARCHITEM_SEARCHSTRING; - aArgs[0].Value <<= sFindText; - aArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; - aArgs[1].Value <<= sal_True; - - // Execute dispatch asynchronously - ExecuteInfo* pExecuteInfo = new ExecuteInfo; - pExecuteInfo->xDispatch = xDispatch; - pExecuteInfo->aTargetURL = aTargetURL; - pExecuteInfo->aArgs = aArgs; - Application::PostUserEvent( STATIC_LINK(0, UpSearchToolboxController , ExecuteHdl_Impl), pExecuteInfo ); - - css::frame::FeatureStateEvent aEvent; - css::util::URL aCommand; - aCommand.Complete = COMMAND_APPENDSEARCHHISTORY; - aEvent.FeatureURL = aCommand; - aEvent.IsEnabled = sal_True; - - css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT); + css::uno::Sequence< css::beans::PropertyValue > lArgs(2); + lArgs[0].Name = SEARCHITEM_SEARCHSTRING; + lArgs[0].Value <<= sFindText; + lArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; + lArgs[1].Value <<= sal_True; + + impl_executeSearch(m_xServiceManager, m_xFrame, lArgs); + + css::frame::FeatureStateEvent aEvent; + aEvent.FeatureURL.Complete = COMMAND_APPENDSEARCHHISTORY; + css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT); + if (xStatusListener.is()) xStatusListener->statusChanged( aEvent ); - } } // XStatusListener void SAL_CALL UpSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException ) { -} - -IMPL_STATIC_LINK_NOINSTANCE( UpSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) -{ - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); - try - { - // Asynchronous execution as this can lead to our own destruction! - // Framework can recycle our current frame and the layout manager disposes all user interface - // elements if a component gets detached from its frame! - pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs ); - } - catch ( css::uno::Exception& ) - { - } - - Application::AcquireSolarMutex( nRef ); - delete pExecuteInfo; - - return 0; + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + if ( m_bDisposed ) + return; } //----------------------------------------------------------------------------------------------------------- @@ -907,9 +758,7 @@ css::uno::Sequence< ::rtl::OUString > FindbarDispatcher::getSupportedServiceNam void SAL_CALL FindbarDispatcher::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ) { if ( aArguments.getLength() ) - { aArguments[0] >>= m_xFrame; - } } // XDispatchProvider -- cgit v1.2.3 From 05bdbbef9645cee3636754a2424abb34aed835db Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Wed, 26 May 2010 16:44:22 +0800 Subject: findbar01: #111826#, #111827# and make some optimizations for the code --- svx/source/tbxctrls/tbunosearchcontrollers.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 2399f4d2c27d..1a050e742005 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -55,7 +55,7 @@ static const ::rtl::OUString COMMAND_APPENDSEARCHHISTORY = ::rtl::OUString::cr static const ::rtl::OUString SERVICENAME_URLTRANSFORMER = ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer"); static const sal_Int32 REMEMBER_SIZE = 10; -void impl_executeSearch( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr, css::uno::Reference< css::frame::XFrame >& xFrame, css::uno::Sequence< css::beans::PropertyValue >& lArgs ) +void impl_executeSearch( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr, const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Sequence< css::beans::PropertyValue >& lArgs ) { css::uno::Reference< css::util::XURLTransformer > xURLTransformer( rSMgr->createInstance(SERVICENAME_URLTRANSFORMER), css::uno::UNO_QUERY ); if ( xURLTransformer.is() ) -- cgit v1.2.3 From 01c4626a910ec3b664abea6854ae656701a93e28 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Thu, 27 May 2010 17:06:33 +0800 Subject: findbar01: #i111840# set focus back to document when key is used in findbar text field --- svx/source/tbxctrls/tbunosearchcontrollers.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 1a050e742005..f4f03170a90f 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -134,7 +134,7 @@ long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) sal_Bool bShift = pKeyEvent->GetKeyCode().IsShift(); sal_uInt16 nCode = pKeyEvent->GetKeyCode().GetCode(); - if ( bCtrl && bAlt && KEY_F == nCode ) + if ( (bCtrl && bAlt && KEY_F == nCode) || KEY_ESCAPE == nCode ) GrabFocusToDocument(); if ( KEY_RETURN == nCode ) -- cgit v1.2.3 From 334c5ca8931eac3d0cff8e1611dccb8a90771eb2 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Thu, 27 May 2010 17:22:17 +0800 Subject: findbar01: #i111848#, #i111852# change title of findbar and show/hide the findbar according to specification --- sc/uiconfig/scalc/toolbar/findbar.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc/uiconfig/scalc/toolbar/findbar.xml b/sc/uiconfig/scalc/toolbar/findbar.xml index a19743198c7d..9ef9d8a1a78f 100644 --- a/sc/uiconfig/scalc/toolbar/findbar.xml +++ b/sc/uiconfig/scalc/toolbar/findbar.xml @@ -2,7 +2,7 @@ - + - + -- cgit v1.2.3 From b2ab0cefca95f2c05bfd9e081d9e5d383de19bed Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Thu, 27 May 2010 17:22:17 +0800 Subject: findbar01: #i111848#, #i111852# change title of findbar and show/hide the findbar according to specification --- .../data/org/openoffice/Office/Accelerators.xcu | 15 +++++++++++++++ .../org/openoffice/Office/UI/CalcWindowState.xcu | 2 +- .../org/openoffice/Office/UI/DrawWindowState.xcu | 4 ++-- .../org/openoffice/Office/UI/ImpressWindowState.xcu | 4 ++-- .../openoffice/Office/UI/WriterGlobalWindowState.xcu | 20 ++++++++++++++++++++ .../openoffice/Office/UI/WriterWebWindowState.xcu | 20 ++++++++++++++++++++ .../org/openoffice/Office/UI/WriterWindowState.xcu | 2 +- .../org/openoffice/Office/UI/XFormsWindowState.xcu | 20 ++++++++++++++++++++ 8 files changed, 81 insertions(+), 6 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index e6ad2ab1fe63..ef197f10332f 100755 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -1576,6 +1576,11 @@ .uno:UpdateInputFields + + I10N SHORTCUTS - NO TRANSLATE + vnd.sun.star.findbar:FocusToFindbar + + I10N SHORTCUTS - NO TRANSLATE .uno:Bold @@ -2612,6 +2617,11 @@ .uno:UpdateInputFields + + I10N SHORTCUTS - NO TRANSLATE + vnd.sun.star.findbar:FocusToFindbar + + I10N SHORTCUTS - NO TRANSLATE .uno:Bold @@ -5072,6 +5082,11 @@ .uno:UpdateInputFields + + I10N SHORTCUTS - NO TRANSLATE + vnd.sun.star.findbar:FocusToFindbar + + I10N SHORTCUTS - NO TRANSLATE .uno:Bold diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu index 4a770576cd78..a427a0caf052 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu @@ -304,7 +304,7 @@ 0 - Find Toolbar + Find true diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu index 8a06413c169a..c0feaba64dc6 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu @@ -117,10 +117,10 @@ 0 - Find Toolbar + Find - true + false false diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu index f26c7dddda2d..cad0da2bd84e 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu @@ -605,10 +605,10 @@ 0 - Find Toolbar + Find - true + false false diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu index 870e3c5c528b..8bcc180c264b 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu @@ -52,6 +52,26 @@ true + + + 1,0 + + + true + + + 0 + + + Find + + + true + + + false + + 0,1 diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu index 8c0eccc927e9..35844d1bd516 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu @@ -52,6 +52,26 @@ true + + + 1,0 + + + true + + + 0 + + + Find + + + true + + + false + + 0,1 diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu index 9ca2f5de6316..d3790df3ef92 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu @@ -63,7 +63,7 @@ 0 - Find Toolbar + Find true diff --git a/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu index f78926234b35..76cdc52f5e3a 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu @@ -53,6 +53,26 @@ true + + + 1,0 + + + true + + + 0 + + + Find + + + true + + + false + + 0,1 -- cgit v1.2.3 From 0d5519866f35d6c245948d2569551fe3ea6a7ba5 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Thu, 27 May 2010 17:22:17 +0800 Subject: findbar01: #i111848#, #i111852# change title of findbar and show/hide the findbar according to specification --- sw/uiconfig/sglobal/toolbar/findbar.xml | 8 ++++++++ sw/uiconfig/sweb/toolbar/findbar.xml | 8 ++++++++ sw/uiconfig/swriter/toolbar/findbar.xml | 4 ++-- sw/uiconfig/swxform/toolbar/findbar.xml | 8 ++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 sw/uiconfig/sglobal/toolbar/findbar.xml create mode 100644 sw/uiconfig/sweb/toolbar/findbar.xml create mode 100644 sw/uiconfig/swxform/toolbar/findbar.xml diff --git a/sw/uiconfig/sglobal/toolbar/findbar.xml b/sw/uiconfig/sglobal/toolbar/findbar.xml new file mode 100644 index 000000000000..9ef9d8a1a78f --- /dev/null +++ b/sw/uiconfig/sglobal/toolbar/findbar.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sw/uiconfig/sweb/toolbar/findbar.xml b/sw/uiconfig/sweb/toolbar/findbar.xml new file mode 100644 index 000000000000..9ef9d8a1a78f --- /dev/null +++ b/sw/uiconfig/sweb/toolbar/findbar.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sw/uiconfig/swriter/toolbar/findbar.xml b/sw/uiconfig/swriter/toolbar/findbar.xml index a19743198c7d..9ef9d8a1a78f 100644 --- a/sw/uiconfig/swriter/toolbar/findbar.xml +++ b/sw/uiconfig/swriter/toolbar/findbar.xml @@ -2,7 +2,7 @@ - + - + diff --git a/sw/uiconfig/swxform/toolbar/findbar.xml b/sw/uiconfig/swxform/toolbar/findbar.xml new file mode 100644 index 000000000000..9ef9d8a1a78f --- /dev/null +++ b/sw/uiconfig/swxform/toolbar/findbar.xml @@ -0,0 +1,8 @@ + + + + + + + + -- cgit v1.2.3 From 5d08b0417da503650e5cf2f301cf579cc84452fe Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Thu, 27 May 2010 17:22:17 +0800 Subject: findbar01: #i111848#, #i111852# change title of findbar and show/hide the findbar according to specification --- sd/uiconfig/sdraw/toolbar/findbar.xml | 4 ++-- sd/uiconfig/simpress/toolbar/findbar.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sd/uiconfig/sdraw/toolbar/findbar.xml b/sd/uiconfig/sdraw/toolbar/findbar.xml index a19743198c7d..9ef9d8a1a78f 100644 --- a/sd/uiconfig/sdraw/toolbar/findbar.xml +++ b/sd/uiconfig/sdraw/toolbar/findbar.xml @@ -2,7 +2,7 @@ - + - + diff --git a/sd/uiconfig/simpress/toolbar/findbar.xml b/sd/uiconfig/simpress/toolbar/findbar.xml index a19743198c7d..9ef9d8a1a78f 100644 --- a/sd/uiconfig/simpress/toolbar/findbar.xml +++ b/sd/uiconfig/simpress/toolbar/findbar.xml @@ -2,7 +2,7 @@ - + - + -- cgit v1.2.3 From 85df13fa783ecb5de7f9e688cdabcebd9d91e447 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 27 May 2010 15:31:26 +0200 Subject: sw33bf04: #i111172# method - further adjustment of handling existing indent when current text node is already in a list. --- sw/source/ui/wrtsh/wrtsh1.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 1cda074998a2..04f87e877aa5 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -1395,7 +1395,10 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) if ( pTxtNode->GetNumRule() ) { const SwNumFmt aFmt( aNumRule.Get( 0 ) ); - nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent(); + if ( aFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + { + nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent(); + } } // <-- aNumRule.ChangeIndent( nIndentChange ); -- cgit v1.2.3 From 97e96b230c86d10cb31793d3737c7d1d97041dfb Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 27 May 2010 17:52:15 +0200 Subject: uimigration01: #i101513# Migration of user settings necessary --- desktop/source/migration/migration.cxx | 587 ++++++++++++++++++++- desktop/source/migration/migration_impl.hxx | 122 +++++ .../moduleuiconfigurationmanager.cxx | 3 +- officecfg/registry/data/org/openoffice/Setup.xcu | 14 +- 4 files changed, 715 insertions(+), 11 deletions(-) diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index cefc3cebf0fd..b674dc611fc5 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -58,6 +58,11 @@ #include #include #include +#include +#include +#include +#include +#include using namespace rtl; using namespace osl; @@ -72,6 +77,120 @@ using namespace com::sun::star; namespace desktop { +static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL = ::rtl::OUString::createFromAscii("CommandURL"); +static const ::rtl::OUString ITEM_DESCRIPTOR_CONTAINER = ::rtl::OUString::createFromAscii("ItemDescriptorContainer"); +static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL = ::rtl::OUString::createFromAscii("Label"); + +static const ::rtl::OUString MENU_SEPERATOR = ::rtl::OUString::createFromAscii(" | "); +static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("..."); + +::rtl::OUString retrieveLabelFromCommand(const ::rtl::OUString& sCommand, const ::rtl::OUString& sModuleIdentifier) +{ + ::rtl::OUString sLabel; + + uno::Reference< container::XNameAccess > xUICommands; + uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY ); + if ( xNameAccess.is() ) + { + uno::Any a = xNameAccess->getByName( sModuleIdentifier ); + a >>= xUICommands; + } + if (xUICommands.is()) + { + if ( sCommand.getLength() > 0 ) + { + rtl::OUString aStr; + ::uno::Sequence< beans::PropertyValue > aPropSeq; + try + { + uno::Any a( xUICommands->getByName( sCommand )); + if ( a >>= aPropSeq ) + { + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if ( aPropSeq[i].Name.equalsAscii( "Label" )) + { + aPropSeq[i].Value >>= aStr; + break; + } + } + } + + sLabel = aStr; + } + + catch(container::NoSuchElementException&) + { + sLabel = sCommand; + sal_Int32 nIndex = sLabel.indexOf(':'); + if (nIndex>=0 && nIndex <= sLabel.getLength()-1) + sLabel = sLabel.copy(nIndex+1); + } + + } + } + + return sLabel; +} + +::rtl::OUString stripHotKey( const ::rtl::OUString& str ) +{ + sal_Int32 index = str.indexOf( '~' ); + if ( index == -1 ) + { + return str; + } + else + { + return str.replaceAt( index, 1, ::rtl::OUString() ); + } +} + +::rtl::OUString mapModuleShortNameToIdentifier(const ::rtl::OUString& sShortName) +{ + ::rtl::OUString sIdentifier; + + if (sShortName.equals(::rtl::OUString::createFromAscii("StartModule"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.StartModule"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("swriter"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("scalc"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sdraw"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.drawing.DrawingDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("simpress"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.presentation.PresentationDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("smath"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.formula.FormulaProperties"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("schart"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("BasicIDE"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("dbapp"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sdb.OfficeDatabaseDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sglobal"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.GlobalDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sweb"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.WebDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("swxform"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.xforms.XMLFormDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sbibliography"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.Bibliography"); + + return sIdentifier; +} static MigrationImpl *pImpl = 0; static Mutex aMutex; @@ -159,9 +278,72 @@ sal_Bool MigrationImpl::doMigration() m_vrFileList = compileFileList(); sal_Bool result = sal_False; - try{ + try + { + NewVersionUIInfo aNewVersionUIInfo; + ::std::vector< MigrationModuleInfo > vModulesInfo = dectectUIChangesForAllModules(); + aNewVersionUIInfo.init(vModulesInfo); + copyFiles(); + const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar"); + const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/"); + for (sal_uInt32 i=0; i lArgs(2); + ::rtl::OUString aOldCfgDataPath = m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules/"); + lArgs[0] <<= aOldCfgDataPath + vModulesInfo[i].sModuleShortName; + lArgs[1] <<= embed::ElementModes::READ; + + uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY); + uno::Reference< embed::XStorage > xModules; + + xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY); + uno::Reference< ui::XUIConfigurationManager > xOldCfgManager( m_xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.ui.UIConfigurationManager")), uno::UNO_QUERY ); + uno::Reference< ui::XUIConfigurationStorage > xOldCfgStorage( xOldCfgManager, uno::UNO_QUERY ); + uno::Reference< ui::XUIConfigurationPersistence > xOldCfgPersistence( xOldCfgManager, uno::UNO_QUERY ); + + if ( xOldCfgStorage.is() && xOldCfgPersistence.is() && xModules.is() ) + { + xOldCfgStorage->setStorage( xModules ); + xOldCfgPersistence->reload(); + } + + uno::Reference< ui::XUIConfigurationManager > xCfgManager = aNewVersionUIInfo.getConfigManager(vModulesInfo[i].sModuleShortName); + + if (vModulesInfo[i].bHasMenubar) + { + uno::Reference< container::XIndexContainer > xOldVersionMenuSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sMenubarResourceURL, sal_True), uno::UNO_QUERY); + uno::Reference< container::XIndexContainer > xNewVersionMenuSettings = aNewVersionUIInfo.getNewMenubarSettings(vModulesInfo[i].sModuleShortName); + ::rtl::OUString sParent; + compareOldAndNewConfig(sParent, xOldVersionMenuSettings, xNewVersionMenuSettings, sMenubarResourceURL); + mergeOldToNewVersion(xCfgManager, xNewVersionMenuSettings, sModuleIdentifier, sMenubarResourceURL); + } + + sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size(); + if (nToolbars >0) + { + for (sal_Int32 j=0; j xOldVersionToolbarSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sToolbarResourceURL, sal_True), uno::UNO_QUERY); + uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(vModulesInfo[i].sModuleShortName, sToolbarName); + ::rtl::OUString sParent; + compareOldAndNewConfig(sParent, xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL); + mergeOldToNewVersion(xCfgManager, xNewVersionToolbarSettings, sModuleIdentifier, sToolbarResourceURL); + } + } + + m_aOldVersionItemsHashMap.clear(); + m_aNewVersionItemsHashMap.clear(); + } + // execute the migration items from Setup.xcu copyConfig(); @@ -290,10 +472,14 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio tmpStep.name = seqMigrations[i]; // read included files from current step description + ::rtl::OUString aSeqEntry; if (tmpAccess->getByName(OUString::createFromAscii("IncludedFiles")) >>= tmpSeq) { for (sal_Int32 j=0; jgetByName(OUString::createFromAscii("ExcludedExtensions")) >>= tmpSeq) { for (sal_Int32 j=0; j MigrationImpl::dectectUIChangesForAllModules() const +{ + ::std::vector< MigrationModuleInfo > vModulesInfo; + const ::rtl::OUString MENUBAR = ::rtl::OUString::createFromAscii("menubar"); + const ::rtl::OUString TOOLBAR = ::rtl::OUString::createFromAscii("toolbar"); + + uno::Sequence< uno::Any > lArgs(2); + lArgs[0] <<= m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules"); + lArgs[1] <<= embed::ElementModes::READ; + + uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY); + uno::Reference< embed::XStorage > xModules; + + xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY); + if (!xModules.is()) + return vModulesInfo; + + uno::Reference< container::XNameAccess > xAccess = uno::Reference< container::XNameAccess >(xModules, uno::UNO_QUERY); + uno::Sequence< ::rtl::OUString > lNames = xAccess->getElementNames(); + sal_Int32 nLength = lNames.getLength(); + for (sal_Int32 i=0; i xModule = xModules->openStorageElement(sModuleShortName, embed::ElementModes::READ); + if (xModule.is()) + { + MigrationModuleInfo aModuleInfo; + + uno::Reference< embed::XStorage > xMenubar = xModule->openStorageElement(MENUBAR, embed::ElementModes::READ); + if (xMenubar.is()) + { + uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xMenubar, uno::UNO_QUERY); + if (xNameAccess->getElementNames().getLength() > 0) + { + aModuleInfo.sModuleShortName = sModuleShortName; + aModuleInfo.bHasMenubar = sal_True; + } + } + + uno::Reference< embed::XStorage > xToolbar = xModule->openStorageElement(TOOLBAR, embed::ElementModes::READ); + if (xToolbar.is()) + { + const ::rtl::OUString RESOURCEURL_CUSTOM_ELEMENT = ::rtl::OUString::createFromAscii("custom_"); + sal_Int32 nCustomLen = 7; + + uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xToolbar, uno::UNO_QUERY); + ::uno::Sequence< ::rtl::OUString > lToolbars = xNameAccess->getElementNames(); + for (sal_Int32 j=0; j=nCustomLen && + sToolbarName.copy(0, nCustomLen).equals(RESOURCEURL_CUSTOM_ELEMENT)) + continue; + + aModuleInfo.sModuleShortName = sModuleShortName; + sal_Int32 nIndex = sToolbarName.lastIndexOf('.'); + if (nIndex > 0) + { + ::rtl::OUString sExtension(sToolbarName.copy(nIndex)); + ::rtl::OUString sToolbarResourceName(sToolbarName.copy(0, nIndex)); + if (sToolbarResourceName.getLength()>0 && sExtension.equalsAsciiL(".xml", 4)) + aModuleInfo.m_vToolbars.push_back(sToolbarResourceName); + } + } + } + + if (aModuleInfo.sModuleShortName.getLength()>0) + vModulesInfo.push_back(aModuleInfo); + } + } + + return vModulesInfo; +} + +void MigrationImpl::compareOldAndNewConfig(const ::rtl::OUString& sParent, + const uno::Reference< container::XIndexContainer >& xIndexOld, + const uno::Reference< container::XIndexContainer >& xIndexNew, + const ::rtl::OUString& sResourceURL) +{ + ::std::vector< MigrationItem > vOldItems; + ::std::vector< MigrationItem > vNewItems; + uno::Sequence< beans::PropertyValue > aProp; + sal_Int32 nOldCount = xIndexOld->getCount(); + sal_Int32 nNewCount = xIndexNew->getCount(); + + for (int n=0; ngetByIndex(n) >>= aProp) + { + for(int i=0; i>= aMigrationItem.m_sCommandURL; + else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER)) + aProp[i].Value >>= aMigrationItem.m_xPopupMenu; + } + + if (aMigrationItem.m_sCommandURL.getLength()) + vOldItems.push_back(aMigrationItem); + } + } + + for (int n=0; ngetByIndex(n) >>= aProp) + { + for(int i=0; i>= aMigrationItem.m_sCommandURL; + else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER)) + aProp[i].Value >>= aMigrationItem.m_xPopupMenu; + } + + if (aMigrationItem.m_sCommandURL.getLength()) + vNewItems.push_back(aMigrationItem); + } + } + + ::std::vector< MigrationItem >::iterator it; + + ::rtl::OUString sSibling; + for (it = vOldItems.begin(); it!=vOldItems.end(); ++it) + { + ::std::vector< MigrationItem >::iterator pFound = ::std::find(vNewItems.begin(), vNewItems.end(), *it); + if (pFound != vNewItems.end() && it->m_xPopupMenu.is()) + { + ::rtl::OUString sName; + if (sParent.getLength()>0) + sName = sParent + MENU_SEPERATOR + it->m_sCommandURL; + else + sName = it->m_sCommandURL; + compareOldAndNewConfig(sName, it->m_xPopupMenu, pFound->m_xPopupMenu, sResourceURL); + } + else if (pFound == vNewItems.end()) + { + MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu); + if (m_aOldVersionItemsHashMap.find(sResourceURL)==m_aOldVersionItemsHashMap.end()) + { + ::std::vector< MigrationItem > vMigrationItems; + m_aOldVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems)); + m_aOldVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + else + { + if (::std::find(m_aOldVersionItemsHashMap[sResourceURL].begin(), m_aOldVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aOldVersionItemsHashMap[sResourceURL].end()) + m_aOldVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + } + + sSibling = it->m_sCommandURL; + } + + ::rtl::OUString sNewSibling; + uno::Reference< container::XIndexContainer > xPopup; + for (it = vNewItems.begin(); it!=vNewItems.end(); ++it) + { + ::std::vector< MigrationItem >::iterator pFound = ::std::find(vOldItems.begin(), vOldItems.end(), *it); + if (pFound != vOldItems.end() && it->m_xPopupMenu.is()) + { + ::rtl::OUString sName; + if (sParent.getLength()>0) + sName = sParent + MENU_SEPERATOR + it->m_sCommandURL; + else + sName = it->m_sCommandURL; + compareOldAndNewConfig(sName, pFound->m_xPopupMenu, it->m_xPopupMenu, sResourceURL); + } + else if (::std::find(vOldItems.begin(), vOldItems.end(), *it) == vOldItems.end()) + { + MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu); + if (m_aNewVersionItemsHashMap.find(sResourceURL)==m_aNewVersionItemsHashMap.end()) + { + ::std::vector< MigrationItem > vMigrationItems; + m_aNewVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems)); + m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + else + { + if (::std::find(m_aNewVersionItemsHashMap[sResourceURL].begin(), m_aNewVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aNewVersionItemsHashMap[sResourceURL].end()) + m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + } + } +} + +void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurationManager >& xCfgManager, + const uno::Reference< container::XIndexContainer>& xIndexContainer, + const ::rtl::OUString& sModuleIdentifier, + const ::rtl::OUString& sResourceURL) +{ + MigrationHashMap::iterator pFound = m_aOldVersionItemsHashMap.find(sResourceURL); + if (pFound==m_aOldVersionItemsHashMap.end()) + return; + + ::std::vector< MigrationItem >::iterator it; + for (it=pFound->second.begin(); it!=pFound->second.end(); ++it) + { + uno::Reference< container::XIndexContainer > xTemp = xIndexContainer; + + ::rtl::OUString sParentNodeName = it->m_sParentNodeName; + sal_Int32 nIndex = 0; + do + { + ::rtl::OUString sToken = sParentNodeName.getToken(0, '|', nIndex).trim(); + if (sToken.getLength()<=0) + break; + + sal_Int32 nCount = xTemp->getCount(); + for (sal_Int32 i=0; i xChild; + + uno::Sequence< beans::PropertyValue > aPropSeq; + xTemp->getByIndex(i) >>= aPropSeq; + for (sal_Int32 j=0; j>= sCommandURL; + else if (sPropName.equals(ITEM_DESCRIPTOR_LABEL)) + aPropSeq[j].Value >>= sLabel; + else if (sPropName.equals(ITEM_DESCRIPTOR_CONTAINER)) + aPropSeq[j].Value >>= xChild; + } + + if (sCommandURL == sToken) + { + xTemp = xChild; + break; + } + } + + } while (nIndex>=0); + + if (nIndex == -1) + { + uno::Sequence< beans::PropertyValue > aPropSeq(3); + + aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL; + aPropSeq[0].Value <<= it->m_sCommandURL; + aPropSeq[1].Name = ITEM_DESCRIPTOR_LABEL; + aPropSeq[1].Value <<= retrieveLabelFromCommand(it->m_sCommandURL, sModuleIdentifier); + aPropSeq[2].Name = ITEM_DESCRIPTOR_CONTAINER; + aPropSeq[2].Value <<= it->m_xPopupMenu; + + if (it->m_sPrevSibling.getLength() == 0) + xTemp->insertByIndex(0, uno::makeAny(aPropSeq)); + else if (it->m_sPrevSibling.getLength() > 0) + { + sal_Int32 nCount = xTemp->getCount(); + sal_Int32 i = 0; + for (; i aTempPropSeq; + xTemp->getByIndex(i) >>= aTempPropSeq; + for (sal_Int32 j=0; j>= sCmd; + break; + } + } + + if (sCmd.equals(it->m_sPrevSibling)) + break; + } + + xTemp->insertByIndex(i+1, uno::makeAny(aPropSeq)); + } + } + } + + uno::Reference< container::XIndexAccess > xIndexAccess(xIndexContainer, uno::UNO_QUERY); + if (xIndexAccess.is()) + xCfgManager->replaceSettings(sResourceURL, xIndexAccess); + + uno::Reference< ui::XUIConfigurationPersistence > xUIConfigurationPersistence(xCfgManager, uno::UNO_QUERY); + if (xUIConfigurationPersistence.is()) + xUIConfigurationPersistence->store(); +} + +uno::Reference< ui::XUIConfigurationManager > NewVersionUIInfo::getConfigManager(const ::rtl::OUString& sModuleShortName) const +{ + uno::Reference< ui::XUIConfigurationManager > xCfgManager; + + for (sal_Int32 i=0; i>= xCfgManager; + break; + } + } + + return xCfgManager; +} + +uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const +{ + uno::Reference< container::XIndexContainer > xNewMenuSettings; + + for (sal_Int32 i=0; i>= xNewMenuSettings; + break; + } + } + + return xNewMenuSettings; +} + +uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const +{ + uno::Reference< container::XIndexContainer > xNewToolbarSettings; + + for (sal_Int32 i=0; i lToolbarSettingsSeq; + m_lNewVersionToolbarSettingsSeq[i].Value >>= lToolbarSettingsSeq; + for (sal_Int32 j=0; j>= xNewToolbarSettings; + break; + } + } + + break; + } + } + + return xNewToolbarSettings; +} + +void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModulesInfo) +{ + m_lCfgManagerSeq.realloc(vModulesInfo.size()); + m_lNewVersionMenubarSettingsSeq.realloc(vModulesInfo.size()); + m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size()); + + const ::rtl::OUString sModuleCfgSupplier = ::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"); + const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar"); + const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/"); + + uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = uno::Reference< ui::XModuleUIConfigurationManagerSupplier >(::comphelper::getProcessServiceFactory()->createInstance(sModuleCfgSupplier), uno::UNO_QUERY); + + for (sal_uInt32 i=0; i 0) + { + uno::Reference< ui::XUIConfigurationManager > xCfgManager = xModuleCfgSupplier->getUIConfigurationManager(sModuleIdentifier); + m_lCfgManagerSeq[i].Name = vModulesInfo[i].sModuleShortName; + m_lCfgManagerSeq[i].Value <<= xCfgManager; + + if (vModulesInfo[i].bHasMenubar) + { + m_lNewVersionMenubarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName; + m_lNewVersionMenubarSettingsSeq[i].Value <<= xCfgManager->getSettings(sMenubarResourceURL, sal_True); + } + + sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size(); + if (nToolbars > 0) + { + uno::Sequence< beans::PropertyValue > lPropSeq(nToolbars); + for (sal_Int32 j=0; jgetSettings(sToolbarResourceURL, sal_True); + } + + m_lNewVersionToolbarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName; + m_lNewVersionToolbarSettingsSeq[i].Value <<= lPropSeq; + } + } + } +} + } // namespace desktop diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx index 8cad1cce4b16..f73e44fea523 100644 --- a/desktop/source/migration/migration_impl.hxx +++ b/desktop/source/migration/migration_impl.hxx @@ -30,6 +30,7 @@ #include #include #include +#include #include "migration.hxx" @@ -41,6 +42,13 @@ #include #include +#include +#include +#include +#include +#include +#include +#include #define NS_CSS com::sun::star #define NS_UNO com::sun::star::uno @@ -80,6 +88,107 @@ typedef std::vector< migration_step > migrations_v; typedef std::auto_ptr< migrations_v > migrations_vr; typedef std::vector< supported_migration > migrations_available; +//__________________________________________ +/** + define the item, e.g.:menuitem, toolbaritem, to be migrated. we keep the information + of the command URL, the previous sibling node and the parent node of a item +*/ +struct MigrationItem +{ + ::rtl::OUString m_sParentNodeName; + ::rtl::OUString m_sPrevSibling; + ::rtl::OUString m_sCommandURL; + NS_UNO::Reference< NS_CSS::container::XIndexContainer > m_xPopupMenu; + + MigrationItem() + :m_xPopupMenu(0) + { + } + + MigrationItem(const ::rtl::OUString& sParentNodeName, + const ::rtl::OUString& sPrevSibling, + const ::rtl::OUString& sCommandURL, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer > xPopupMenu) + { + m_sParentNodeName = sParentNodeName; + m_sPrevSibling = sPrevSibling; + m_sCommandURL = sCommandURL; + m_xPopupMenu = xPopupMenu; + } + + MigrationItem& operator=(const MigrationItem& aMigrationItem) + { + m_sParentNodeName = aMigrationItem.m_sParentNodeName; + m_sPrevSibling = aMigrationItem.m_sPrevSibling; + m_sCommandURL = aMigrationItem.m_sCommandURL; + m_xPopupMenu = aMigrationItem.m_xPopupMenu; + + return *this; + } + + sal_Bool operator==(const MigrationItem& aMigrationItem) + { + return ( aMigrationItem.m_sParentNodeName == m_sParentNodeName && + aMigrationItem.m_sPrevSibling == m_sPrevSibling && + aMigrationItem.m_sCommandURL == m_sCommandURL && + aMigrationItem.m_xPopupMenu.is() == m_xPopupMenu.is() ); + } + + ::rtl::OUString GetPrevSibling() const { return m_sPrevSibling; } +}; + +typedef ::std::hash_map< ::rtl::OUString, + ::std::vector< MigrationItem >, + ::rtl::OUStringHash, + ::std::equal_to< ::rtl::OUString > > MigrationHashMap; + +struct MigrationItemInfo +{ + ::rtl::OUString m_sResourceURL; + MigrationItem m_aMigrationItem; + + MigrationItemInfo(){} + + MigrationItemInfo(const ::rtl::OUString& sResourceURL, const MigrationItem& aMigratiionItem) + { + m_sResourceURL = sResourceURL; + m_aMigrationItem = aMigratiionItem; + } +}; + +//__________________________________________ +/** + information for the UI elements to be migrated for one module +*/ +struct MigrationModuleInfo +{ + ::rtl::OUString sModuleShortName; + sal_Bool bHasMenubar; + ::std::vector< ::rtl::OUString > m_vToolbars; + + MigrationModuleInfo():bHasMenubar(sal_False){}; +}; + +//__________________________________________ +/** + get the information before copying the ui configuration files of old version to new version +*/ +class NewVersionUIInfo +{ +public: + + NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager > getConfigManager(const ::rtl::OUString& sModuleShortName) const; + NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const; + NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const; + void init(const ::std::vector< MigrationModuleInfo >& vModulesInfo); + +private: + + NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lCfgManagerSeq; + NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionMenubarSettingsSeq; + NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionToolbarSettingsSeq; +}; + class MigrationImpl { @@ -91,6 +200,9 @@ private: migrations_vr m_vrMigrations; // list of all migration specs from config install_info m_aInfo; // info about the version being migrated strings_vr m_vrFileList; // final list of files to be copied + MigrationHashMap m_aOldVersionItemsHashMap; + MigrationHashMap m_aNewVersionItemsHashMap; + ::rtl::OUString m_sModuleIdentifier; // functions to control the migration process bool readAvailableMigrations(migrations_available&); @@ -105,6 +217,16 @@ private: strings_vr applyPatterns(const strings_v& vSet, const strings_v& vPatterns) const; NS_UNO::Reference< NS_CSS::container::XNameAccess > getConfigAccess(const sal_Char* path, sal_Bool rw=sal_False); + ::std::vector< MigrationModuleInfo > dectectUIChangesForAllModules() const; + void compareOldAndNewConfig(const ::rtl::OUString& sParentNodeName, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xOldIndexContainer, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xNewIndexContainer, + const ::rtl::OUString& sToolbarName); + void mergeOldToNewVersion(const NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager >& xCfgManager, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer>& xIndexContainer, + const ::rtl::OUString& sModuleIdentifier, + const ::rtl::OUString& sResourceURL); + // actual processing function that perform the migration steps void copyFiles(); void copyConfig(); diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 8840aee6a634..684e62d45377 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -292,11 +292,12 @@ void ModuleUIConfigurationManager::impl_preloadUIElementTypeList( Layer eLayer, rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData )); } } + rElementTypeData.bLoaded = true; } } } - rElementTypeData.bLoaded = true; + //rElementTypeData.bLoaded = true; } void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, Layer eLayer, UIElementData& aUIElementData ) diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu index 120f212112d6..18e5b4c7f961 100755 --- a/officecfg/registry/data/org/openoffice/Setup.xcu +++ b/officecfg/registry/data/org/openoffice/Setup.xcu @@ -801,13 +801,13 @@ - .*/autotext/.* - .*/autocorr/.* - .*/config/.*\.so[bcdegh] - .*/config/soffice.cfg/modules/.*/toolbar/custom.*\.xml - .*/config/soffice.cfg/modules/.*/images/.* - .*/gallery/.* - .*/template/.* + .*/autotext/.* + .*/autocorr/.* + .*/config/.*\.so[bcdegh] + .*/config/soffice.cfg/modules/.*/toolbar/custom.*\.xml + .*/config/soffice.cfg/modules/.*/images/.* + .*/gallery/.* + .*/template/.* -- cgit v1.2.3 From 93393d14ff84d74d2e2f022f0c19bf64bb9268b1 Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Mon, 31 May 2010 15:56:59 +0200 Subject: findbar01: #i111912 - [Testautomation] Added findbar declaration to bars.win --- testautomation/global/win/bars.win | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testautomation/global/win/bars.win b/testautomation/global/win/bars.win index dd65f825893d..525be7d897ca 100755 --- a/testautomation/global/win/bars.win +++ b/testautomation/global/win/bars.win @@ -356,6 +356,13 @@ ExtrusionLightingFloater .uno:ExtrusionLightingFloater ExtrusionSurfaceFloater .uno:ExtrusionSurfaceFloater Extrusion3DColor .uno:Extrusion3DColor '------------------------------------------------------------------------- +*FindBar .HelpId:findbar +'------------------------------------------------------------------------- +FindText .uno:FindText +DownSearch .uno:DownSearch +UpSearch .uno:UpSearch +SearchDialog .uno:SearchDialog +'------------------------------------------------------------------------- *Flowchart .HelpId:flowchartshapes '------------------------------------------------------------------------- Process .uno:FlowChartShapes.flowchart-process -- cgit v1.2.3 From 299817c665690a67391bfa3c163296e9fffdae02 Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Mon, 31 May 2010 17:47:49 +0200 Subject: findbar01: #i111912 - [Testautomation] Preliminary update test, incomplete. From a testtool POV we have a permanently visible SearchDialog button which should be fixed. --- .../global/required/includes/g_findbar.inc | 142 +++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 testautomation/global/required/includes/g_findbar.inc diff --git a/testautomation/global/required/includes/g_findbar.inc b/testautomation/global/required/includes/g_findbar.inc new file mode 100644 index 000000000000..b193da41f963 --- /dev/null +++ b/testautomation/global/required/includes/g_findbar.inc @@ -0,0 +1,142 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' 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. +' +'/************************************************************************ +'* +'* owner : Joerg.Skottke@Sun.Com +'* +'* short description : Update test for the findbar +'* +'\*********************************************************************** + +testcase tUpdtFindBar() + + printlog( "Update test for the findbar" ) + + const TEST_STRING = "VCL Testtool" + + select case( gApplication ) + case "IMPRESS", "DRAW", "DATABASE" + kontext "FindBar" + if ( FindBar.exists() ) then + warnlog( "The FindBar should not be visible by default" ) + else + ' Toggle FindBar + endif + end select + + hNewDocument() + + kontext "FindBar" + if ( FindBar.exists() ) then + + printlog( "FindBar has " & FindBar.getItemCount() & " items" ) + + printlog( "Insert text into search field" ) + FindText.setText( TEST_STRING ) + + printlog( "Click (down arrow)" ) + DownSearch.click() + + kontext "Active" + if ( Active.exists( 1 ) ) then + printlog( "Expected message: " & Active.getText() + Active.ok() + else + warnlog( "Messagebox missing " ) + endif + + printlog( "Click (up arrow)" ) + kontext "FindBar" + UpSearch.click() + + kontext "Active" + if ( Active.exists( 1 ) ) then + printlog( "Expected message: " & Active.getText() + Active.ok() + else + warnlog( "Messagebox missing " ) + endif + + printlog( "Search dialog button may not be visible by default" ) + kontext "FindBar" + if ( SearchDialog.exists() ) then + if ( SearchDialog.isVisible() ) then + SearchDialog.click() + warnlog( "Button is visible" ) + else + printlog( "Button is hidden, good" ) + endif + else + warnlog( " button should not be visible" ) + endif + + printlog( "Add button to toolbar" ) + hToggleSearchDialog() + + kontext "FindBar" + SearchDialog.click() + + kontext "FindAndReplace" + if ( FindAndReplace.exists( 1 ) ) then + if ( SearchFor.getSelText() = TEST_STRING ) then + printlog( "Test string has been inserted into Listbox. Good." ) + else + warnlog( "Search string should have been copied from findbar to search dialog" ) + endif + FindAndReplace.close() + else + warnlog( "Dialog is missing" ) + endif + + printlog( "Remove button from toolbar" ) + hToggleSearchDialog() + + else + warnlog( "FindBar is not visible" ) + endif + + hCloseDocument() + +endcase + +function hToggleSearchDialog() + + printlog( "Make button visible via context menu" ) + + const MENU_VISIBLE_BUTTONS = 1 + const MENU_SEARCH_AND_REPLACE = 4 + + kontext "FindBar" + FindBar.openContextMenu() + wait( 1000 ) + + hMenuSelectNr( MENU_VISIBLE_BUTTONS ) + wait( 1000 ) + + hMenuSelectNr( MENU_SEARCH_AND_REPLACE ) + wait( 1000 ) + +end function \ No newline at end of file -- cgit v1.2.3 From b33e252b7b41d0359539f9c867806dfc7ca2cf20 Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Tue, 1 Jun 2010 01:07:21 +0200 Subject: findbar01: #i111912 - [Testautomation] Added calls to DialogTest() --- testautomation/global/required/includes/g_findbar.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/testautomation/global/required/includes/g_findbar.inc b/testautomation/global/required/includes/g_findbar.inc index b193da41f963..5e32b95b1b2d 100644 --- a/testautomation/global/required/includes/g_findbar.inc +++ b/testautomation/global/required/includes/g_findbar.inc @@ -63,6 +63,9 @@ testcase tUpdtFindBar() kontext "Active" if ( Active.exists( 1 ) ) then printlog( "Expected message: " & Active.getText() + call DialogTest( Active ) + + kontext "Active" Active.ok() else warnlog( "Messagebox missing " ) @@ -75,6 +78,9 @@ testcase tUpdtFindBar() kontext "Active" if ( Active.exists( 1 ) ) then printlog( "Expected message: " & Active.getText() + call DialogTest( Active ) + + kontext "Active" Active.ok() else warnlog( "Messagebox missing " ) @@ -85,7 +91,7 @@ testcase tUpdtFindBar() if ( SearchDialog.exists() ) then if ( SearchDialog.isVisible() ) then SearchDialog.click() - warnlog( "Button is visible" ) + warnlog( "Button is visible, it should be hidden by default" ) else printlog( "Button is hidden, good" ) endif @@ -101,6 +107,9 @@ testcase tUpdtFindBar() kontext "FindAndReplace" if ( FindAndReplace.exists( 1 ) ) then + call DialogTest( FindAndReplace ) + + kontext "FindAndReplace" if ( SearchFor.getSelText() = TEST_STRING ) then printlog( "Test string has been inserted into Listbox. Good." ) else @@ -122,6 +131,8 @@ testcase tUpdtFindBar() endcase +'******************************************************************************* + function hToggleSearchDialog() printlog( "Make button visible via context menu" ) -- cgit v1.2.3 From bf14b858a9cfb80d7807bb36f03323049a15316b Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 1 Jun 2010 17:47:28 +0200 Subject: uimigration01: #i10000# Fix build problem --- 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 83c0ae9e65f4..4b58942d77aa 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1905,7 +1905,7 @@ void SbUserFormModule::InitObject() triggerInitializeEvent(); } } - catch( uno::Exception& e ) + catch( uno::Exception& ) { } -- cgit v1.2.3 From bc7d467beea0df73764a4e7ac66e7144551bd12c Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Wed, 2 Jun 2010 12:01:20 +0200 Subject: findbar01: #i111912 - Modified g_findbar.inc to make the CWS pass in reasonable timeframe. Followup-issues are #i111984 and #i112026. Integration is postponed due to massive conflicts with CWS vitomation01 --- .../global/required/includes/g_findbar.inc | 66 ++++++++++++---------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/testautomation/global/required/includes/g_findbar.inc b/testautomation/global/required/includes/g_findbar.inc index 5e32b95b1b2d..38af3edd28aa 100644 --- a/testautomation/global/required/includes/g_findbar.inc +++ b/testautomation/global/required/includes/g_findbar.inc @@ -33,6 +33,9 @@ testcase tUpdtFindBar() + ' This test is incomplete. It needs to be integrated into all update tests + ' and it needs to be added to the toolbar management functions + printlog( "Update test for the findbar" ) const TEST_STRING = "VCL Testtool" @@ -42,8 +45,6 @@ testcase tUpdtFindBar() kontext "FindBar" if ( FindBar.exists() ) then warnlog( "The FindBar should not be visible by default" ) - else - ' Toggle FindBar endif end select @@ -86,42 +87,47 @@ testcase tUpdtFindBar() warnlog( "Messagebox missing " ) endif - printlog( "Search dialog button may not be visible by default" ) - kontext "FindBar" - if ( SearchDialog.exists() ) then - if ( SearchDialog.isVisible() ) then - SearchDialog.click() - warnlog( "Button is visible, it should be hidden by default" ) + warnlog( "#i111984 - exclude button from testing" ) + goto skip_SearchDialog + + printlog( "Search dialog button may not be visible by default" ) + kontext "FindBar" + if ( SearchDialog.exists() ) then + if ( SearchDialog.isVisible() ) then + SearchDialog.click() + warnlog( "Button is visible, it should be hidden by default" ) + else + printlog( "Button is hidden, good" ) + endif else - printlog( "Button is hidden, good" ) + warnlog( " button should not be visible" ) endif - else - warnlog( " button should not be visible" ) - endif - printlog( "Add button to toolbar" ) - hToggleSearchDialog() + printlog( "Add button to toolbar" ) + hToggleSearchDialog() - kontext "FindBar" - SearchDialog.click() - - kontext "FindAndReplace" - if ( FindAndReplace.exists( 1 ) ) then - call DialogTest( FindAndReplace ) + kontext "FindBar" + SearchDialog.click() kontext "FindAndReplace" - if ( SearchFor.getSelText() = TEST_STRING ) then - printlog( "Test string has been inserted into Listbox. Good." ) + if ( FindAndReplace.exists( 1 ) ) then + call DialogTest( FindAndReplace ) + + kontext "FindAndReplace" + if ( SearchFor.getSelText() = TEST_STRING ) then + printlog( "Test string has been inserted into Listbox. Good." ) + else + warnlog( "Search string should have been copied from findbar to search dialog" ) + endif + FindAndReplace.close() else - warnlog( "Search string should have been copied from findbar to search dialog" ) + warnlog( "Dialog is missing" ) endif - FindAndReplace.close() - else - warnlog( "Dialog is missing" ) - endif - - printlog( "Remove button from toolbar" ) - hToggleSearchDialog() + + printlog( "Remove button from toolbar" ) + hToggleSearchDialog() + + skip_SearchDialog: else warnlog( "FindBar is not visible" ) -- cgit v1.2.3 From 2557c23db220c9b53029438ba1b5e12e0c4a2942 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 2 Jun 2010 13:51:36 +0200 Subject: uimigration: #i10000# Fix build problem again --- basic/source/runtime/methods.cxx | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index e963de871c32..f388c786bcf7 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -78,6 +78,7 @@ using namespace comphelper; using namespace osl; +using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::ucb; @@ -210,15 +211,15 @@ String implGetCurDir( void ) } // TODO: -> SbiGlobals -static Reference< XSimpleFileAccess3 > getFileAccess( void ) +static uno::Reference< XSimpleFileAccess3 > getFileAccess( void ) { - static Reference< XSimpleFileAccess3 > xSFI; + static uno::Reference< XSimpleFileAccess3 > xSFI; if( !xSFI.is() ) { - Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); + uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); if( xSMgr.is() ) { - xSFI = Reference< XSimpleFileAccess3 >( xSMgr->createInstance + xSFI = uno::Reference< XSimpleFileAccess3 >( xSMgr->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY ); } } @@ -557,7 +558,7 @@ RTLFUNC(ChDrive) // JSM // Implementation of StepRENAME with UCB void implStepRenameUCB( const String& aSource, const String& aDest ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -605,7 +606,7 @@ RTLFUNC(FileCopy) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -656,7 +657,7 @@ RTLFUNC(Kill) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { String aFullPath = getFullPath( aFileSpec ); @@ -703,7 +704,7 @@ RTLFUNC(MkDir) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -804,7 +805,7 @@ RTLFUNC(RmDir) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -891,7 +892,7 @@ RTLFUNC(FileLen) // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -1639,7 +1640,7 @@ RTLFUNC(StrComp) ::utl::TransliterationWrapper* pTransliterationWrapper = GetSbData()->pTransliterationWrapper; if( !pTransliterationWrapper ) { - Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); + uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); pTransliterationWrapper = GetSbData()->pTransliterationWrapper = new ::utl::TransliterationWrapper( xSMgr, ::com::sun::star::i18n::TransliterationModules_IGNORE_CASE | @@ -2634,7 +2635,7 @@ RTLFUNC(Dir) // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { if ( nParCount >= 2 ) @@ -2997,7 +2998,7 @@ RTLFUNC(GetAttr) // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -3067,7 +3068,7 @@ RTLFUNC(FileDateTime) Date aDate; if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -4032,7 +4033,7 @@ RTLFUNC(StrConv) String aNewStr( aOldStr ); if( nType != 0 ) { - Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); + uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); ::utl::TransliterationWrapper aTransliterationWrapper( xSMgr,nType ); com::sun::star::uno::Sequence aOffsets; aTransliterationWrapper.loadModuleIfNeeded( nLanguage ); @@ -4360,7 +4361,7 @@ RTLFUNC(SetAttr) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -4474,7 +4475,7 @@ RTLFUNC(FileExists) // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try -- cgit v1.2.3 From 81c476751f6e8ee55702fe223f7e01343f8cf94e Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Thu, 3 Jun 2010 08:05:35 +0200 Subject: sw33bf04#112058#adapted testcases for numbering fixes --- .../writer/optional/includes/number/w_206_.inc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) mode change 100644 => 100755 testautomation/writer/optional/includes/number/w_206_.inc diff --git a/testautomation/writer/optional/includes/number/w_206_.inc b/testautomation/writer/optional/includes/number/w_206_.inc old mode 100644 new mode 100755 index 9d7750628013..c007e674d329 --- a/testautomation/writer/optional/includes/number/w_206_.inc +++ b/testautomation/writer/optional/includes/number/w_206_.inc @@ -472,12 +472,12 @@ testcase tToolsNumbering7 end if end if Case 2 - if sClipBrd(1) <> "1.My second number" then - Warnlog "#128041#First paragraph not '1.My second number' but: " & sClipBrd(1) + if sClipBrd(1) <> "1.1.My second number" then + Warnlog "#128041#First paragraph not '1.1.My second number' but: " & sClipBrd(1) end if Case 3 - if sClipBrd(2) <> "2.My third number" then - Warnlog "#128041#First paragraph not '2.My third number' but: " & sClipBrd(2) + if sClipBrd(2) <> "2.2.My third number" then + Warnlog "#128041#First paragraph not '2.2.My third number' but: " & sClipBrd(2) end if end select next i @@ -707,16 +707,16 @@ testcase tToolsNumbering11 For i = 1 to 3 Select Case i Case 1 - if sClipBrd(0) <> "1A new first paragraph" then - Warnlog "First Heading not: '1A new first paragraph' but: " & sClipBrd(0) + if sClipBrd(0) <> "11A new first paragraph" then + Warnlog "First Heading not: '11A new first paragraph' but: " & sClipBrd(0) end if Case 2 - if sClipBrd(1) <> "2" then - Warnlog "First paragraph not empty but: " & sClipBrd(1) + if sClipBrd(1) <> "22" then + Warnlog "First paragraph not '22' but: " & sClipBrd(1) end if Case 3 - if sClipBrd(2) <> "3A new third paragraph" then - Warnlog "First paragraph not '3A new third paragraph' but: " & sClipBrd(2) + if sClipBrd(2) <> "33A new third paragraph" then + Warnlog "First paragraph not '33A new third paragraph' but: " & sClipBrd(2) end if end select next i -- cgit v1.2.3 From 2d65a58f0aaaa99f0d3bddb132c92a52bb1d3aeb Mon Sep 17 00:00:00 2001 From: "Helge Delfs [hde]" Date: Thu, 3 Jun 2010 16:01:52 +0200 Subject: sw33bf04#85766#adapted testcases for numbering fixes --- .../writer/optional/includes/fields/w_fields1.inc | 10 -- .../writer/optional/includes/fields/w_fields2.inc | 68 ++++----- .../writer/optional/includes/fields/w_fields4.inc | 5 +- .../writer/optional/includes/fields/w_fields5.inc | 156 +++++++++++---------- 4 files changed, 115 insertions(+), 124 deletions(-) mode change 100644 => 100755 testautomation/writer/optional/includes/fields/w_fields1.inc mode change 100644 => 100755 testautomation/writer/optional/includes/fields/w_fields2.inc mode change 100644 => 100755 testautomation/writer/optional/includes/fields/w_fields4.inc mode change 100644 => 100755 testautomation/writer/optional/includes/fields/w_fields5.inc diff --git a/testautomation/writer/optional/includes/fields/w_fields1.inc b/testautomation/writer/optional/includes/fields/w_fields1.inc old mode 100644 new mode 100755 index 9f2d872b3d89..0287fd2f1da1 --- a/testautomation/writer/optional/includes/fields/w_fields1.inc +++ b/testautomation/writer/optional/includes/fields/w_fields1.inc @@ -170,8 +170,6 @@ endcase '----------------------------------------------------------------- testcase tInsertFieldsPageNumber -qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'" -goto endsub Dim sPage1 , sPage2 as String @@ -216,8 +214,6 @@ endcase '----------------------------------------------------------------- testcase tInsertFieldsPageCount -qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'" -goto endsub Dim sPage1 , sPage2 as String @@ -273,8 +269,6 @@ endcase '----------------------------------------------------------------- testcase tInsertFieldsSubject -qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'" -goto endsub Dim sSubject as String sSubject = "This is a Subject" @@ -306,8 +300,6 @@ endcase '----------------------------------------------------------------- testcase tInsertFieldsTitle -qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'" -goto endsub Dim sTitle as String @@ -340,8 +332,6 @@ endcase '----------------------------------------------------------------- testcase tInsertFieldsAuthor -qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'" -goto endsub Dim sFirstName , sLastName as String Dim sFirstName1 , sLastName1 as String diff --git a/testautomation/writer/optional/includes/fields/w_fields2.inc b/testautomation/writer/optional/includes/fields/w_fields2.inc old mode 100644 new mode 100755 index 826d9ec769b9..0514ba5b020e --- a/testautomation/writer/optional/includes/fields/w_fields2.inc +++ b/testautomation/writer/optional/includes/fields/w_fields2.inc @@ -451,8 +451,6 @@ endcase '----------------------------------------------------------------- testcase tDocumentPage -qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'" -goto endsub Dim sTestFile as String Dim sPage() as String @@ -867,35 +865,32 @@ endcase '----------------------------------------------------------------- testcase tDocumentStatistics -qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'" -goto endsub Dim sTestFile as String + Dim sOriginalFile as string Dim sStatistics() as String + Dim sType as string Dim i as Integer - sStatistics = Array( _ - "2" , _ - "2" , _ - "2" , _ - "12" , _ - "2" , _ - "2" , _ - "1" , _ - ) + sStatistics = Array( "2", "2", "3", "13", "2", "2", "1" ) - sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\statisticsTest.sxw") + sTestFile = Convertpath (gOfficepath + "user\work\statisticsTest.sxw") + sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\statisticsTest.sxw") + ' document has to be copied to local file system to avoid opening a read-only file + ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable' + FileCopy (sOriginalFile, sTestFile) + if hFileExists ( sTestFile ) = false then + Warnlog "Test document couldn't be copied to local file system. Test aborted!" + goto endsub + end if printlog "Insert/Fields/Other/Document / Statistics" '/// Insert/Fields/Other/Document / Statistics - Call hNewDocument - '/// Open test file statisticsTest.sxw which includes '/// 2 tables , 2 pictures , 22 paragraph , 1 object , '/// 2 words , 12 characters and 2 pages Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable Call wTypeKeys "" @@ -904,6 +899,7 @@ goto endsub '/// Check if the insertion is correct Call fInsertFieldsOther("TabDokumentFeldbefehle") Feldtyp.Select fGetType("Statistics") + sType = Auswahl.GetSelText for i = 0 to UBound(sStatistics) Kontext "TabDokumentFeldbefehle" Auswahl.Select i+1 @@ -916,7 +912,7 @@ goto endsub Sleep 1 EditCopy if GetClipboard <> sStatistics(i) then - Warnlog i &" - Should get " & sStatistics(i) & " but get " & GetClipboard + Warnlog "- " & sType & ": Should get " & sStatistics(i) & " but get " & GetClipboard end if Call wTypeKeys "" next i @@ -930,35 +926,39 @@ endcase '----------------------------------------------------------------- testcase tDocumentTemplate -qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'" -goto endsub - - Dim sTestFile as String - Dim sDirectory as String - Dim oDirectory as String - Dim sLanguage as String - Dim sFormat() as String - Dim sResult(6) as String - Dim i as Integer + + Dim sTestFile as String + Dim sOriginalFile as string + Dim sDirectory as String + Dim oDirectory as String + Dim sLanguage as String + Dim sFormat() as String + Dim sResult(6) as String + Dim i as Integer sLanguage = fGetDirLanguage() - sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\diploma.ott") + sTestFile = Convertpath (gOfficepath + "user\work\diploma.ott") + sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\diploma.ott") + ' document has to be copied to local file system to avoid opening a read-only file + ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable' + FileCopy (sOriginalFile, sTestFile) + if hFileExists ( sTestFile ) = false then + Warnlog "Test document couldn't be copied to local file system. Test aborted!" + goto endsub + end if sResult(0) = fGetCateGory() sResult(1) = "diploma.ott" sResult(2) = "diploma" - sResult(3) = Convertpath (gTesttoolpath + "writer\optional\input\fields\") + sResult(3) = Convertpath (gOfficepath + "user\work") sResult(4) = sTestFile sResult(5) = fGetStyle() printlog "Insert/Fields/Other/Document / Template" '/// Insert/Fields/Other/Document / Template - - Call hNewDocument - + '/// Open test file diploma.ott Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable Call wTypeKeys "" diff --git a/testautomation/writer/optional/includes/fields/w_fields4.inc b/testautomation/writer/optional/includes/fields/w_fields4.inc old mode 100644 new mode 100755 index 446d5b458f0f..20069da398c1 --- a/testautomation/writer/optional/includes/fields/w_fields4.inc +++ b/testautomation/writer/optional/includes/fields/w_fields4.inc @@ -261,9 +261,8 @@ endcase '----------------------------------------------------------------- testcase tDocInformationUserDefined - qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'" - goto endsub - + QAErrorLog "#i112077#Tabpage 'Custom properties' has no declaration" + goto endsub Dim sTestFile as String Dim sOriginalFile as string Dim sVarResult() as String diff --git a/testautomation/writer/optional/includes/fields/w_fields5.inc b/testautomation/writer/optional/includes/fields/w_fields5.inc old mode 100644 new mode 100755 index 2f4e3b0b9ecb..6c8b5e7ca12a --- a/testautomation/writer/optional/includes/fields/w_fields5.inc +++ b/testautomation/writer/optional/includes/fields/w_fields5.inc @@ -667,99 +667,101 @@ endcase '----------------------------------------------------------------- testcase tVariablesDDEFieldManual - qaerrorlog "#i93906# - tVariablesDDEFieldManual outcommented due to a problem with copying field-contents outside the office." + warnlog "#i112079#testcase must be reworked" goto endsub - Dim sDDEFile as String - Dim sContent as String - Dim sName as String - Dim sDDEStatement as String - Dim sSectionName as String + Dim sDDEFile as String + Dim sContent as String + Dim sName as String + Dim sDDEStatement as String + Dim sSectionName as String + + sDDEFile = Convertpath ( gOfficePath + "\user\work\dde_test.odt") + sContent = "DDE" + sName = "myTest" + sSectionName = "Section1" + sDDEStatement = "soffice " & sDDEFile & " " & sSectionName + + printlog "DDE field - manual" + '/// DDE field - manual + + if hFileExists ( sDDEFile ) then app.kill ( sDDEFile ) + + Call hNewDocument + + '/// Input something , insert a section , then save it and close the file + Call wTypeKeys sContent + Call wTypeKeys "" + Call fInsertSection("TabBereiche") + Bereichsliste.Settext sSectionName + TabBereiche.OK + Sleep 1 + Call hFileSaveAsKill(sDDEFile) + Call hCloseDocument + + '/// Opan a new document + Call hNewDocument + '/// Insert/Fields/Other/Variables / Select "DDE Field" + '/// Set DDE name and DDE statement , select "DDE manual" + Call fInsertFieldsOther("TabVariablen") + Feldtyp.Select 3 + Sleep 1 + NameText.SetText sName + Wert.SetText sDDEStatement + Formatliste.Select 1 + Einfuegen.Click + Sleep 2 + TabVariablen.Close + Sleep 2 - sDDEFile = Convertpath ( gNetzOfficePath + "dde_test.oxt") - sContent = "DDE" - sName = "myTest" - sSectionName = "Section1" - sDDEStatement = "soffice " & sDDEFile & " " & sSectionName - - printlog "DDE field - manual" - '/// DDE field - manual - - if hFileExists ( sDDEFile ) then app.kill ( sDDEFile ) - - Call hNewDocument - - '/// Input something , insert a section , then save it and close the file - Call wTypeKeys sContent - Call wTypeKeys "" - Call fInsertSection("TabBereiche") - Bereichsliste.Settext sSectionName - TabBereiche.OK - Sleep 1 - Call hFileSaveAsKill(sDDEFile) - Call hCloseDocument - - '/// Opan a new document - Call hNewDocument - - '/// Insert/Fields/Other/Variables / Select "DDE Field" - '/// Set DDE name and DDE statement , select "DDE manual" - Call fInsertFieldsOther("TabVariablen") - Feldtyp.Select 3 - Sleep 1 - NameText.SetText sName - Wert.SetText sDDEStatement - Formatliste.Select 1 - Einfuegen.Click - Sleep 2 - TabVariablen.Close - Sleep 2 - - Call wTypeKeys "" - Call wTypeKeys "" - if fGetFieldContent() <> sContent then - Warnlog "Should get " & sContent & " but get " & fGetFieldContent() - end if + Call wTypeKeys "" + Call wTypeKeys "" + if fGetFieldContent() <> sContent then + Warnlog "Should get " & sContent & " but get " & fGetFieldContent() + end if - '/// Open the test file which you just closed , add something , - '/// Save the file - Call hFileOpen(sDDEFile) + '/// Open the test file which you just closed , add something , + '/// Save the file + Call hFileOpen(sDDEFile) Call wTypeKeys "" Call wTypeKeys "XYZ" FileSave - Call hCloseDocument - - '/// Check if the content is changed -- Should NOT - Sleep 2 - Call wTypeKeys "" - Call wTypeKeys "" - if fGetFieldContent() <> sContent then - Warnlog "Should get " & sContent & " but get " & fGetFieldContent() - end if - - '/// Edit/Fields , press update button - EditFields - Kontext "VerknuepfungenBearbeiten" - Aktualisieren.Click - VerknuepfungenBearbeiten.Close + Call hCloseDocument + + '/// Check if the content is changed -- Should NOT + Sleep 2 + Call wTypeKeys "" + Call wTypeKeys "" + if fGetFieldContent() <> sContent then + Warnlog "Should get " & sContent & " but get " & fGetFieldContent() + end if - '/// Check if the content is changed -- Should NOT - Sleep 1 - Call wTypeKeys "" - Call wTypeKeys "" - if fGetFieldContent() <> ("XYZ" & sContent) then - Warnlog "Should get XYZ" & sContent & " but get " & fGetFieldContent() - end if + '/// Edit/Fields , press update button + EditFields + Kontext "VerknuepfungenBearbeiten" + Aktualisieren.Click + VerknuepfungenBearbeiten.Close + + '/// Check if the content is changed -- Should NOT + Sleep 1 + Call wTypeKeys "" + Call wTypeKeys "" + if fGetFieldContent() <> ("XYZ" & sContent) then + Warnlog "Should get XYZ" & sContent & " but get " & fGetFieldContent() + end if - Call hCloseDocument + Call hCloseDocument - if hFileExists ( sDDEFile ) then app.kill ( sDDEFile ) + if hFileExists ( sDDEFile ) then app.kill ( sDDEFile ) endcase '----------------------------------------------------------------- testcase tVariablesDDEFieldAutomatic + warnlog "#i112079#testcase must be reworked" + goto endsub + qaerrorlog "#i102792# - tVariablesDDEFieldAutomatic outcommented. Fields not updated." goto endsub -- cgit v1.2.3 From 8ecdebd3f9a7ea2110e307c1c095db33440d3074 Mon Sep 17 00:00:00 2001 From: Wu Yan Date: Fri, 4 Jun 2010 09:53:12 +0800 Subject: findbar01: #i112085# - find toolbar has no High Contrast icons --- default_images/res/commandimagelist/lch_downsearch.png | Bin 0 -> 3686 bytes default_images/res/commandimagelist/lch_upsearch.png | Bin 0 -> 3672 bytes default_images/res/commandimagelist/sch_downsearch.png | Bin 0 -> 3670 bytes default_images/res/commandimagelist/sch_upsearch.png | Bin 0 -> 348 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 default_images/res/commandimagelist/lch_downsearch.png create mode 100644 default_images/res/commandimagelist/lch_upsearch.png create mode 100644 default_images/res/commandimagelist/sch_downsearch.png create mode 100644 default_images/res/commandimagelist/sch_upsearch.png diff --git a/default_images/res/commandimagelist/lch_downsearch.png b/default_images/res/commandimagelist/lch_downsearch.png new file mode 100644 index 000000000000..5f66ba3ea45e Binary files /dev/null and b/default_images/res/commandimagelist/lch_downsearch.png differ diff --git a/default_images/res/commandimagelist/lch_upsearch.png b/default_images/res/commandimagelist/lch_upsearch.png new file mode 100644 index 000000000000..1686ff2b7f98 Binary files /dev/null and b/default_images/res/commandimagelist/lch_upsearch.png differ diff --git a/default_images/res/commandimagelist/sch_downsearch.png b/default_images/res/commandimagelist/sch_downsearch.png new file mode 100644 index 000000000000..943e897f8b1f Binary files /dev/null and b/default_images/res/commandimagelist/sch_downsearch.png differ diff --git a/default_images/res/commandimagelist/sch_upsearch.png b/default_images/res/commandimagelist/sch_upsearch.png new file mode 100644 index 000000000000..a29aff5ac060 Binary files /dev/null and b/default_images/res/commandimagelist/sch_upsearch.png differ -- cgit v1.2.3 From 5505fa96623051b9bd8584d5f20da50916741e2d Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Fri, 4 Jun 2010 11:05:31 +0200 Subject: native306 #i111497,i111501# Patches for MacOSX Python from Cloph --- instsetoo_native/util/makefile.mk | 14 +-- scp2/source/python/file_python.scp | 158 ++++++++++++++++++++++++++++++ scp2/source/python/makefile.mk | 2 +- scp2/source/python/profileitem_python.scp | 12 +++ 4 files changed, 172 insertions(+), 14 deletions(-) diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk index b2f014f6ad58..28b9c33628c5 100644 --- a/instsetoo_native/util/makefile.mk +++ b/instsetoo_native/util/makefile.mk @@ -279,24 +279,12 @@ openoffice: .ENDIF # "$(alllangiso)"!="" .IF "$(LOCALPYFILES)"!="" -$(foreach,i,$(alllangiso) openoffice_$i{$(PKGFORMAT:^".") .archive} openofficewithjre_$i{$(PKGFORMAT:^".")} openofficedev_$i{$(PKGFORMAT:^".")} broffice_$i{$(PKGFORMAT:^".")} brofficewithjre_$i{$(PKGFORMAT:^".")} brofficedev_$i{$(PKGFORMAT:^".")} sdkoo_$i{$(PKGFORMAT:^".")}) updatepack : $(LOCALPYFILES) $(BIN)$/cp1251.py $(BIN)$/iso8859_1.py +$(foreach,i,$(alllangiso) openoffice_$i{$(PKGFORMAT:^".") .archive} openofficewithjre_$i{$(PKGFORMAT:^".")} openofficedev_$i{$(PKGFORMAT:^".")} broffice_$i{$(PKGFORMAT:^".")} brofficewithjre_$i{$(PKGFORMAT:^".")} brofficedev_$i{$(PKGFORMAT:^".")} sdkoo_$i{$(PKGFORMAT:^".")}) updatepack : $(LOCALPYFILES) .ENDIF # "$(LOCALPYFILES)"!="" $(BIN)$/%.py : $(SOLARSHAREDBIN)$/pyuno$/%.py @$(COPY) $< $@ -.IF "$(SYSTEM_PYTHON)" != "YES" -$(BIN)$/cp1251.py : $(SOLARLIBDIR)$/python$/encodings$/cp1251.py - @$(COPY) $< $@ -$(BIN)$/iso8859_1.py : $(SOLARLIBDIR)$/python$/encodings$/iso8859_1.py - @$(COPY) $< $@ -.ELSE -$(BIN)$/cp1251.py : - @echo "Using system python - nothing more to do here" -$(BIN)$/iso8859_1.py : - @echo "Using system python - nothing more to do here" -.ENDIF - $(BIN)$/intro.zip : $(SOLARCOMMONPCKDIR)$/openoffice_nologo$/intro.zip $(COPY) $< $@ diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python.scp index 1303bf59460f..5cd84d82b3e9 100644 --- a/scp2/source/python/file_python.scp +++ b/scp2/source/python/file_python.scp @@ -83,11 +83,17 @@ End File gid_File_Py_Python_Core TXT_FILE_BODY; Dir = gid_Dir_Program; + #ifdef MACOSX + Name = "OOoPython.framework.zip"; + Styles = (ARCHIVE,USE_INTERNAL_RIGHTS); + #else Name = STRING(CONCAT3(python-core-,PYVERSION,.zip)); Styles = (ARCHIVE); + #endif End #ifdef UNX +#ifndef MACOSX File gid_File_Py_Python_Bin BIN_FILE_BODY; Dir = gid_Dir_Program; @@ -96,6 +102,7 @@ File gid_File_Py_Python_Bin End #endif #endif +#endif // Scripting Framework Python script proxy @@ -126,12 +133,163 @@ File gid_File_Share_Registry_Pyuno_Xcd End #ifndef SYSTEM_PYTHON +#ifndef MACOSX File gid_File_Lib_Python_So TXT_FILE_BODY; Dir = gid_Dir_Program; Name = STRING(PY_FULL_DLL_NAME); Styles = (PACKED); End +#else //MACOSX +//directory entries solely to be able to create the symlinks +Directory gid_Dir_PythonFramework + ParentID = gid_Dir_Program; + HostName = "OOoPython.framework"; +End + +Unixlink gid_Unixlink_Python_Headers + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework; + Name = "Headers"; + Target = "Versions/Current/Headers"; + Styles = (); +End + +Unixlink gid_Unixlink_Python_Resources + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework; + Name = "Resources"; + Target = "Versions/Current/Resources"; + Styles = (); +End + +Directory gid_Dir_PythonFramework_Versions + ParentID = gid_Dir_PythonFramework; + HostName = "Versions"; +End + +Unixlink gid_Unixlink_Python_Versions_Current + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions; + Name = "Current"; + Target = STRING(PYMAJMIN); + Styles = (); +End + +Directory gid_Dir_PythonFramework_Versions_ver + ParentID = gid_Dir_PythonFramework_Versions; + HostName = STRING(PYMAJMIN); +End + +Unixlink gid_Unixlink_Python_Versions_ver_Headers + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver; + Name = "Headers"; + Target = STRING(CONCAT2(include/python,PYMAJMIN)); + Styles = (); +End + +Directory gid_Dir_PythonFramework_Versions_ver_bin + ParentID = gid_Dir_PythonFramework_Versions_ver; + HostName = "bin"; +End + +Directory gid_Dir_PythonFramework_Versions_ver_lib + ParentID = gid_Dir_PythonFramework_Versions_ver; + HostName = "lib"; +End + +Directory gid_Dir_PythonFramework_Versions_ver_lib_pythonver + ParentID = gid_Dir_PythonFramework_Versions_ver_lib; + HostName = STRING(CONCAT2(python,PYMAJMIN)); +End + +Directory gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config + ParentID = gid_Dir_PythonFramework_Versions_ver_lib_pythonver; + HostName = "config"; +End + +Unixlink gid_Unixlink_Python_OOoPython + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework; + Name = "OOoPython"; + Target = "Versions/Current/OOoPython"; + Styles = (); +End + +Unixlink gid_Unixlink_Python_bin_idle + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver_bin; + Name = "idle"; + Target = STRING(CONCAT2(idle,PYMAJMIN)); + Styles = (); +End + +Unixlink gid_Unixlink_Python_bin_pydoc + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver_bin; + Name = "pydoc"; + Target = STRING(CONCAT2(pydoc,PYMAJMIN)); + Styles = (); +End + +Unixlink gid_Unixlink_Python_bin_python_real + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver_bin; + Name = "python"; + Target = "../Resources/Python.app/Contents/MacOS/OOoPython"; + Styles = (); +End + +Unixlink gid_Unixlink_Python_bin_python + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver_bin; + Name = "python"; + Target = STRING(CONCAT2(python,PYMAJMIN)); + Styles = (); +End + +Unixlink gid_Unixlink_Python_bin_pythonconfig + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver_bin; + Name = "python-config"; + Target = STRING(CONCAT3(python,PYMAJMIN,-config)); + Styles = (); +End + +Unixlink gid_Unixlink_Python_bin_pythonw_real + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver_bin; + Name = "pythonw"; + Target = "../Resources/Python.app/Contents/MacOS/OOoPython"; + Styles = (); +End + +Unixlink gid_Unixlink_Python_bin_pythonw + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver_bin; + Name = "pythonw"; + Target = STRING(CONCAT2(pythonw,PYMAJMIN)); + Styles = (); +End + +Unixlink gid_Unixlink_Python_bin_smtpdpy + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver_bin; + Name = "smtpd.py"; + Target = STRING(CONCAT3(smtpd,PYMAJMIN,.py)); + Styles = (); +End + +Unixlink gid_Unixlink_Python_libpython + BIN_FILE_BODY; + Dir = gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config; + Name = STRING(PY_FULL_DLL_NAME); + Target = "../../../OOoPython"; + Styles = (); +End +#endif //MACOSX + #ifdef WNT File gid_File_Lib_Python_So_Brand // Fix for system-python-problem on windows TXT_FILE_BODY; diff --git a/scp2/source/python/makefile.mk b/scp2/source/python/makefile.mk index b34c0af1491d..4e03218ff06a 100644 --- a/scp2/source/python/makefile.mk +++ b/scp2/source/python/makefile.mk @@ -44,7 +44,7 @@ SCPDEFS+=-DSYSTEM_PYTHON .ENDIF SCPDEFS+=\ - -DPYVERSION=$(PYVERSION) \ + -DPYVERSION=$(PYVERSION) -DPYMAJMIN=$(PYMAJOR).$(PYMINOR) \ -DPY_FULL_DLL_NAME=$(PY_FULL_DLL_NAME) SCP_PRODUCT_TYPE=osl diff --git a/scp2/source/python/profileitem_python.scp b/scp2/source/python/profileitem_python.scp index be8edc601eb6..1c4fdb077986 100644 --- a/scp2/source/python/profileitem_python.scp +++ b/scp2/source/python/profileitem_python.scp @@ -46,7 +46,11 @@ ProfileItem gid_Profileitem_Pythonloader_Pythonhome Section = "Bootstrap"; Order = 1; Key = "PYUNO_LOADER_PYTHONHOME"; + #ifdef MACOSX + Value = CONCAT2($ORIGIN,"OOoPython.framework"); + #else Value = CONCAT2($ORIGIN/python-core-,PYVERSION); + #endif End #endif @@ -60,11 +64,19 @@ ProfileItem gid_Profileitem_Pythonloader_Pythonpath Value = "$ORIGIN"; #else #ifdef UNX + #ifdef MACOSX + #define FRAMEWORKLIB CONCAT4($ORIGIN/OOoPython.framework/Versions/,PYMAJMIN,/lib/python,PYMAJMIN) + Value = CONCAT4(FRAMEWORKLIB FRAMEWORKLIB, + /lib-dynload FRAMEWORKLIB, + /lib-tk FRAMEWORKLIB, + /site-packages $ORIGIN); + #else Value = CONCAT9($ORIGIN/python-core-,PYVERSION, /lib $ORIGIN/python-core-,PYVERSION, /lib/lib-dynload $ORIGIN/python-core-,PYVERSION, /lib/lib-tk $ORIGIN/python-core-,PYVERSION, /lib/site-packages $ORIGIN); + #endif #else #ifdef _gcc3 Value = STRING(CONCAT9($ORIGIN/python-core-,PYVERSION, -- cgit v1.2.3 From 598c1917426154d4dbc7eefc4d78240575a03b28 Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Thu, 10 Jun 2010 14:24:05 +0200 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 15a331cd8600..4c69817791e8 100644 --- a/solenv/inc/minor.mk +++ b/solenv/inc/minor.mk @@ -1,5 +1,5 @@ RSCVERSION=300 -RSCREVISION=300m81(Build:9509) -BUILD=9509 -LAST_MINOR=m81 +RSCREVISION=300m82(Build:9510) +BUILD=9510 +LAST_MINOR=m82 SOURCEVERSION=DEV300 -- cgit v1.2.3 From 8027e13d54cb3a3ee748f140ceb59492af2825e9 Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 10 Jun 2010 15:11:12 +0200 Subject: masterfix: #i10000# xmlsec1-update-config-sub-and-guess.patch is based on xmlsec1-1.2.12 and doesn't match current version (from CWS kfreebsdport01v2) --- libxmlsec/makefile.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libxmlsec/makefile.mk b/libxmlsec/makefile.mk index 211a5376a688..1f0e5976f5e5 100644 --- a/libxmlsec/makefile.mk +++ b/libxmlsec/makefile.mk @@ -63,8 +63,7 @@ PATCH_FILES=\ xmlsec1-nssmangleciphers.patch \ xmlsec1-noverify.patch \ xmlsec1-mingw32.patch \ - xmlsec1-mingw-keymgr-mscrypto.patch \ - xmlsec1-update-config-sub-and-guess.patch + xmlsec1-mingw-keymgr-mscrypto.patch ADDITIONAL_FILES= \ -- cgit v1.2.3 From a0bbc58ae039e4ef14fae811f0eb249f13654c5e Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 10 Jun 2010 15:24:27 +0200 Subject: masterfix: #i10000# remove typo --- hunspell/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunspell/makefile.mk b/hunspell/makefile.mk index ac74d7c5051b..f58204a33bc5 100644 --- a/hunspell/makefile.mk +++ b/hunspell/makefile.mk @@ -1,4 +1,4 @@ -jedit#************************************************************************* +#************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -- cgit v1.2.3 From 634bd66a83cffb00d41d434e77c80eef06a0c813 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 11 Jun 2010 08:13:02 +0200 Subject: masterfix: #i10000# bNothingSelected obsolete --- framework/source/uielement/langselectionstatusbarcontroller.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index e84ca9e4f09d..021ee4e8f8df 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -227,7 +227,6 @@ throw (::com::sun::star::uno::RuntimeException) { //make a sign for the current language xPopupMenu->checkItem( nItemId, TRUE ); - bNothingSelected = false; } aLangMap[ nItemId ] = rStr; ++nItemId; -- cgit v1.2.3 From a60813cb9de5a57e13aafca2eefada5f580878ae Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Fri, 11 Jun 2010 09:21:23 +0200 Subject: masterfix: #10000# dialog.obj added to EXCEPTIONFILES --- starmath/source/makefile.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index b8256514f453..6b100ee606f2 100644 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -88,6 +88,7 @@ EXCEPTIONSFILES = \ $(SLO)$/register.obj \ $(SLO)$/accessibility.obj \ $(SLO)$/cfgitem.obj \ + $(SLO)$/dialog.obj \ $(SLO)$/document.obj \ $(SLO)$/node.obj \ $(SLO)$/parse.obj \ -- cgit v1.2.3 From 5e3011965958fd47da7b6a21c835fee27a5b60e8 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 11 Jun 2010 09:30:32 +0200 Subject: masterfix: #i10000# bNothingSelected obsolete --- sw/source/ui/lingu/olmenu.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 959f566da9a2..934cfc19e22b 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -315,7 +315,6 @@ void SwSpellPopup::fillLangPopupMenu( { //make a check mark for the current language pPopupMenu->CheckItem( nItemId, TRUE ); - bNothingSelected = false; } rLangTable[ nItemId ] = aEntryTxt; ++nItemId; -- cgit v1.2.3 From 7c7ebd7cfb408df8db62a93c343731f058e2fae4 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 11 Jun 2010 09:49:05 +0200 Subject: masterfix: #i10000# changing out() to mxOut --- oox/source/dump/biffdumper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oox/source/dump/biffdumper.cxx b/oox/source/dump/biffdumper.cxx index d59164413acd..aa32cbe53d1b 100644 --- a/oox/source/dump/biffdumper.cxx +++ b/oox/source/dump/biffdumper.cxx @@ -4181,7 +4181,7 @@ void WorkbookStreamObject::dumpChFrExtProps() while( bValid && (rStrm.getRemaining() > 4) ) { ChFrExtPropInfo aInfo = dumpChFrExtPropHeader(); - IndentGuard aIndGuard( out() ); + IndentGuard aIndGuard( mxOut ); switch( aInfo.first ) { case 0: // start @@ -4215,7 +4215,7 @@ void WorkbookStreamObject::dumpChFrExtProps() WorkbookStreamObject::ChFrExtPropInfo WorkbookStreamObject::dumpChFrExtPropHeader() { - MultiItemsGuard aMultiGuard( out() ); + MultiItemsGuard aMultiGuard( mxOut ); ChFrExtPropInfo aInfo; aInfo.first = dumpDec< sal_uInt8 >( "datatype", "CHFREXTPROPS-TYPE" ); dumpUnused( 1 ); -- cgit v1.2.3 From 04c13cfa5b517b024da7ecfee9da20032e170020 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 11 Jun 2010 09:56:00 +0200 Subject: masterfix: #10000# fix ambigous String --- cui/source/dialogs/hyphen.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 33a17d05ab0e..16026aaff6d1 100755 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -291,7 +291,7 @@ String SvxHyphenWordDialog_Impl::EraseUnusableHyphens_Impl( DBG_ASSERT(rxPossHyph.is(), "missing possible hyphens"); if (rxPossHyph.is()) { - DBG_ASSERT( aActWord == rxPossHyph->getWord(), "word mismatch" ); + DBG_ASSERT( aActWord == String( rxPossHyph->getWord() ), "word mismatch" ); aTxt = String( rxPossHyph->getPossibleHyphens() ); -- cgit v1.2.3 From f536dbf880c747403a9aed3a047487b8075d282f Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 11 Jun 2010 10:25:05 +0200 Subject: masterfix: #i10000# disable assertions, sSymbols + aTmpSymbolName not defined --- starmath/source/dialog.cxx | 2 +- starmath/source/symbol.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 453e265cb46b..037f2fc1dff8 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1896,7 +1896,7 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton ) const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(), sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ), aSymbolSets.GetText() ); - DBG_ASSERT( aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL, "symbol already exists" ); + //DBG_ASSERT( aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL, "symbol already exists" ); aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol ); // update display of new symbol diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 395ca9ce8cdb..e248f9726629 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -195,7 +195,7 @@ const SymbolPtrVec_t SmSymbolManager::GetSymbols() const SymbolMap_t::const_iterator aIt( m_aSymbols.begin() ); for ( ; aIt != m_aSymbols.end(); ++aIt) aRes.push_back( &aIt->second ); - DBG_ASSERT( sSymbols.size() == m_aSymbols.size(), "number of symbols mismatch " ); +// DBG_ASSERT( sSymbols.size() == m_aSymbols.size(), "number of symbols mismatch " ); return aRes; } -- cgit v1.2.3 From 1f4a5d96da42928176c86bc7b29423b63dbaefc9 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 11 Jun 2010 11:13:22 +0200 Subject: masterfix: #i10000# adding header --- oox/inc/oox/dump/biffdumper.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/oox/inc/oox/dump/biffdumper.hxx b/oox/inc/oox/dump/biffdumper.hxx index c7979032e0bd..e3e712a52a25 100644 --- a/oox/inc/oox/dump/biffdumper.hxx +++ b/oox/inc/oox/dump/biffdumper.hxx @@ -32,6 +32,7 @@ #include "oox/dump/dffdumper.hxx" #include "oox/dump/oledumper.hxx" #include "oox/xls/richstring.hxx" +#include "oox/xls/biffinputstream.hxx" #if OOX_INCLUDE_DUMPER -- cgit v1.2.3 From 5729138f6f974939f75ce5f9c4191f3d6680a22b Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 11 Jun 2010 13:41:50 +0200 Subject: #i10000# fix for build bot (by GH) --- sc/source/ui/view/output2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 5a48d0d310d5..37bc941c0f16 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -623,7 +623,7 @@ long ScDrawStringsVars::GetMaxDigitWidth() return nMaxDigitWidth; sal_Char cZero = '0'; - for (int i = 0; i < 10; ++i) + for (sal_Char i = 0; i < 10; ++i) { sal_Char cDigit = cZero + i; long n = pOutput->pFmtDevice->GetTextWidth(String(cDigit)); -- cgit v1.2.3 From 6056ded34d3fdb7c5f1294353e136f02bf91cf66 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 11 Jun 2010 14:51:27 +0200 Subject: masterfix: #10000# generate new configure --- configure | 26431 +++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 16338 insertions(+), 10093 deletions(-) diff --git a/configure b/configure index ff810488c966..59d81d6deca1 100755 --- a/configure +++ b/configure @@ -1,416 +1,82 @@ #! /bin/sh # From configure.in Revision: 1.290 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# +# Generated by GNU Autoconf 2.59. # +# 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. ## -## -------------------- ## +## --------------------- ## +## 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 : +# 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 - - -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 -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (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' +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 -# 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=';' - } +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false 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 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_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 - # 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_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +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 - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - 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" || -$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 - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + $as_unset $as_var fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error +done -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +# Required to use basename. +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 fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi -as_me=`$as_basename -- "$0" || +# Name of the executable. +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'` + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -418,107 +84,146 @@ 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$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: 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 - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # 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. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # 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; as_fn_exit 1; } + 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 } -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - 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 -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + as_expr=false 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 + +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 + 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='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p 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'" @@ -527,25 +232,38 @@ 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'" -test -n "$DJDIR" || exec 7<&0 &1 +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + # 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= @@ -553,647 +271,50 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= -PACKAGE_URL= # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # 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 # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='LTLIBOBJS -LIBOBJS -BUILD_TYPE -LOCAL_SOLVER -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_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_LPSOLVE -SYSTEM_MYTHES -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 -SYSTEM_ICU -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 -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 -GPERF -RPM -PKGFORMAT -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 -NO_HIDS -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_URL -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 NO_HIDS 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 PKGFORMAT RPM GPERF 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_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 SYSTEM_MYTHES SYSTEM_LPSOLVE 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 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 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_hids -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_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_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_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_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 @@ -1216,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 ;; @@ -1279,59 +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_fn_error "invalid feature name: $ac_useropt" - 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_fn_error "invalid feature name: $ac_useropt" - 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- \ @@ -1358,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 ;; @@ -1388,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) @@ -1462,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 ;; @@ -1522,36 +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_fn_error "invalid package name: $ac_useropt" - 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_fn_error "invalid package name: $ac_useropt" - 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. @@ -1571,25 +623,26 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { 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'" 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} ;; @@ -1598,36 +651,31 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } 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_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1641,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 @@ -1654,72 +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_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - # 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_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - 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 +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; }; } + 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. @@ -1748,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 @@ -1762,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 @@ -1801,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 @@ -2392,975 +1449,165 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/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 - 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. -Report bugs to the package provider. _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 +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 -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_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.65 -Copyright (C) 2009 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 +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. -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () +_ACEOF { - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -} # ac_fn_c_try_compile +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - 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_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/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` +/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` - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval +_ASUNAME -} # ac_fn_c_try_link +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +} >&5 - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -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 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -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 - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$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: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - 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_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* 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 -char $2 (); -/* 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_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_cxx_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$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: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_cxx_check_header_mongrel - -# ac_fn_cxx_try_run LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_cxx_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -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 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_run - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -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 -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_member -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.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 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` -/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` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF +cat >&5 <<_ACEOF ## ----------- ## @@ -3378,6 +1625,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 @@ -3388,13 +1636,13 @@ 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) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) - as_fn_append ac_configure_args1 " '$ac_arg'" + ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -3410,19 +1658,21 @@ do -* ) ac_must_keep_next=true ;; esac fi - as_fn_append 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 done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # 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. { @@ -3435,35 +1685,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:${as_lineno-$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= ;; #( - *) { eval $ac_var=; 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 @@ -3474,28 +1709,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 @@ -3507,26 +1736,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'; as_fn_exit 1' $ac_signal + 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 - -$as_echo "/* confdefs.h */" > 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. @@ -3534,128 +1763,112 @@ cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _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 - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} +# 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 + { 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 done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + # 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;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$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 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$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_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { 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 -## -------------------- ## -## Main body of script. ## -## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3664,1064 +1877,1081 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + echo "$@" >config.parms -# Check whether --with-gnu-patch was given. -if test "${with_gnu_patch+set}" = set; then : - withval=$with_gnu_patch; -fi +# Check whether --with-gnu-patch or --without-gnu-patch was given. +if test "${with_gnu_patch+set}" = set; then + withval="$with_gnu_patch" + +fi; +# Check whether --with-agg or --without-agg was given. +if test "${with_agg+set}" = set; then + withval="$with_agg" -# Check whether --with-agg was given. -if test "${with_agg+set}" = set; then : - withval=$with_agg; else with_agg=yes -fi +fi; +# Check whether --with-gnu-cp or --without-gnu-cp was given. +if test "${with_gnu_cp+set}" = set; then + withval="$with_gnu_cp" -# Check whether --with-gnu-cp was given. -if test "${with_gnu_cp+set}" = set; then : - withval=$with_gnu_cp; -fi +fi; +# Check whether --enable-graphite or --disable-graphite was given. +if test "${enable_graphite+set}" = set; then + enableval="$enable_graphite" -# Check whether --enable-graphite was given. -if test "${enable_graphite+set}" = set; then : - enableval=$enable_graphite; -fi +fi; +# Check whether --with-system-graphite or --without-system-graphite was given. +if test "${with_system_graphite+set}" = set; then + withval="$with_system_graphite" -# Check whether --with-system-graphite was given. -if test "${with_system_graphite+set}" = set; then : - withval=$with_system_graphite; -fi - -# Check whether --enable-ldap was given. -if test "${enable_ldap+set}" = set; then : - enableval=$enable_ldap; -fi +fi; +# Check whether --enable-ldap or --disable-ldap was given. +if test "${enable_ldap+set}" = set; then + enableval="$enable_ldap" -# Check whether --enable-fetch-external was given. -if test "${enable_fetch_external+set}" = set; then : - enableval=$enable_fetch_external; -fi +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; -# Check whether --with-external-tar was given. -if test "${with_external_tar+set}" = set; then : - withval=$with_external_tar; TARFILE_LOCATION="$withval" +# 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 +fi; +# Check whether --with-openldap or --without-openldap was given. +if test "${with_openldap+set}" = set; then + withval="$with_openldap" -# Check whether --with-openldap was given. -if test "${with_openldap+set}" = set; then : - withval=$with_openldap; -fi +fi; +# Check whether --enable-lockdown or --disable-lockdown was given. +if test "${enable_lockdown+set}" = set; then + enableval="$enable_lockdown" -# Check whether --enable-lockdown was given. -if test "${enable_lockdown+set}" = set; then : - enableval=$enable_lockdown; -fi +fi; +# Check whether --enable-vba or --disable-vba was given. +if test "${enable_vba+set}" = set; then + enableval="$enable_vba" -# Check whether --enable-vba was given. -if test "${enable_vba+set}" = set; then : - enableval=$enable_vba; -fi +fi; +# 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" -# Check whether --with-vba-package-format was given. -if test "${with_vba_package_format+set}" = set; then : - withval=$with_vba_package_format; -fi +fi; +# Check whether --enable-pch or --disable-pch was given. +if test "${enable_pch+set}" = set; then + enableval="$enable_pch" -# Check whether --enable-pch was given. -if test "${enable_pch+set}" = set; then : - enableval=$enable_pch; -fi +fi; +# Check whether --enable-hids or --disable-hids was given. +if test "${enable_hids+set}" = set; then + enableval="$enable_hids" -# Check whether --enable-hids was given. -if test "${enable_hids+set}" = set; then : - enableval=$enable_hids; -fi +fi; +# Check whether --enable-mozilla or --disable-mozilla was given. +if test "${enable_mozilla+set}" = set; then + enableval="$enable_mozilla" -# Check whether --enable-mozilla was given. -if test "${enable_mozilla+set}" = set; then : - enableval=$enable_mozilla; else enable_mozilla="yes" -fi +fi; +# Check whether --with-fonts or --without-fonts was given. +if test "${with_fonts+set}" = set; then + withval="$with_fonts" -# Check whether --with-fonts was given. -if test "${with_fonts+set}" = set; then : - withval=$with_fonts; -fi +fi; +# Check whether --with-ppds or --without-ppds was given. +if test "${with_ppds+set}" = set; then + withval="$with_ppds" -# Check whether --with-ppds was given. -if test "${with_ppds+set}" = set; then : - withval=$with_ppds; -fi +fi; +# Check whether --with-afms or --without-afms was given. +if test "${with_afms+set}" = set; then + withval="$with_afms" -# Check whether --with-afms was given. -if test "${with_afms+set}" = set; then : - withval=$with_afms; -fi +fi; +# Check whether --enable-epm or --disable-epm was given. +if test "${enable_epm+set}" = set; then + enableval="$enable_epm" -# Check whether --enable-epm was given. -if test "${enable_epm+set}" = set; then : - enableval=$enable_epm; else enable_epm="yes" -fi +fi; +# Check whether --with-epm or --without-epm was given. +if test "${with_epm+set}" = set; then + withval="$with_epm" -# Check whether --with-epm was given. -if test "${with_epm+set}" = set; then : - withval=$with_epm; -fi +fi; +# Check whether --with-package-format or --without-package-format was given. +if test "${with_package_format+set}" = set; then + withval="$with_package_format" -# Check whether --with-package-format was given. -if test "${with_package_format+set}" = set; then : - withval=$with_package_format; -fi +fi; +# Check whether --enable-odk or --disable-odk was given. +if test "${enable_odk+set}" = set; then + enableval="$enable_odk" -# Check whether --enable-odk was given. -if test "${enable_odk+set}" = set; then : - enableval=$enable_odk; else enable_odk="yes" -fi +fi; +# Check whether --enable-mathmldtd or --disable-mathmldtd was given. +if test "${enable_mathmldtd+set}" = set; then + enableval="$enable_mathmldtd" -# Check whether --enable-mathmldtd was given. -if test "${enable_mathmldtd+set}" = set; then : - enableval=$enable_mathmldtd; else enable_mathmldtd="yes" -fi +fi; +# Check whether --enable-evolution2 or --disable-evolution2 was given. +if test "${enable_evolution2+set}" = set; then + enableval="$enable_evolution2" -# Check whether --enable-evolution2 was given. -if test "${enable_evolution2+set}" = set; then : - enableval=$enable_evolution2; -fi +fi; +# Check whether --with-system-stdlibs or --without-system-stdlibs was given. +if test "${with_system_stdlibs+set}" = set; then + withval="$with_system_stdlibs" -# Check whether --with-system-stdlibs was given. -if test "${with_system_stdlibs+set}" = set; then : - withval=$with_system_stdlibs; else checkforstdlibproblems=yes -fi +fi; +# Check whether --enable-cups or --disable-cups was given. +if test "${enable_cups+set}" = set; then + enableval="$enable_cups" -# Check whether --enable-cups was given. -if test "${enable_cups+set}" = set; then : - enableval=$enable_cups; else enable_cups=yes -fi +fi; +# Check whether --enable-fontconfig or --disable-fontconfig was given. +if test "${enable_fontconfig+set}" = set; then + enableval="$enable_fontconfig" -# Check whether --enable-fontconfig was given. -if test "${enable_fontconfig+set}" = set; then : - enableval=$enable_fontconfig; else enable_fontconfig=yes -fi +fi; +# Check whether --enable-directx or --disable-directx was given. +if test "${enable_directx+set}" = set; then + enableval="$enable_directx" -# Check whether --enable-directx was given. -if test "${enable_directx+set}" = set; then : - enableval=$enable_directx; else enable_directx=yes -fi +fi; +# Check whether --enable-activex or --disable-activex was given. +if test "${enable_activex+set}" = set; then + enableval="$enable_activex" -# Check whether --enable-activex was given. -if test "${enable_activex+set}" = set; then : - enableval=$enable_activex; -fi +fi; +# Check whether --enable-atl or --disable-atl was given. +if test "${enable_atl+set}" = set; then + enableval="$enable_atl" -# Check whether --enable-atl was given. -if test "${enable_atl+set}" = set; then : - enableval=$enable_atl; -fi +fi; +# Check whether --enable-symbols or --disable-symbols was given. +if test "${enable_symbols+set}" = set; then + enableval="$enable_symbols" -# Check whether --enable-symbols was given. -if test "${enable_symbols+set}" = set; then : - enableval=$enable_symbols; -fi +fi; +# Check whether --enable-strip-solver or --disable-strip-solver was given. +if test "${enable_strip_solver+set}" = set; then + enableval="$enable_strip_solver" -# Check whether --enable-strip-solver was given. -if test "${enable_strip_solver+set}" = set; then : - enableval=$enable_strip_solver; -fi +fi; +# Check whether --enable-werror or --disable-werror was given. +if test "${enable_werror+set}" = set; then + enableval="$enable_werror" -# Check whether --enable-werror was given. -if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; -fi +fi; +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; -fi +fi; +# Check whether --enable-dbgutil or --disable-dbgutil was given. +if test "${enable_dbgutil+set}" = set; then + enableval="$enable_dbgutil" -# Check whether --enable-dbgutil was given. -if test "${enable_dbgutil+set}" = set; then : - enableval=$enable_dbgutil; -fi +fi; +# Check whether --enable-crashdump or --disable-crashdump was given. +if test "${enable_crashdump+set}" = set; then + enableval="$enable_crashdump" -# Check whether --enable-crashdump was given. -if test "${enable_crashdump+set}" = set; then : - enableval=$enable_crashdump; -fi +fi; +# Check whether --enable-cl-standard or --disable-cl-standard was given. +if test "${enable_cl_standard+set}" = set; then + enableval="$enable_cl_standard" -# Check whether --enable-cl-standard was given. -if test "${enable_cl_standard+set}" = set; then : - enableval=$enable_cl_standard; -fi +fi; +# Check whether --enable-gtk or --disable-gtk was given. +if test "${enable_gtk+set}" = set; then + enableval="$enable_gtk" -# Check whether --enable-gtk was given. -if test "${enable_gtk+set}" = set; then : - enableval=$enable_gtk; else enable_gtk=yes -fi +fi; +# Check whether --enable-systray or --disable-systray was given. +if test "${enable_systray+set}" = set; then + enableval="$enable_systray" -# Check whether --enable-systray was given. -if test "${enable_systray+set}" = set; then : - enableval=$enable_systray; else enable_systray=yes -fi +fi; +# Check whether --enable-cairo or --disable-cairo was given. +if test "${enable_cairo+set}" = set; then + enableval="$enable_cairo" -# 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. +if test "${with_system_cairo+set}" = set; then + withval="$with_system_cairo" -# Check whether --with-system-cairo was given. -if test "${with_system_cairo+set}" = set; then : - withval=$with_system_cairo; -fi +fi; +# Check whether --enable-opengl or --disable-opengl was given. +if test "${enable_opengl+set}" = set; then + enableval="$enable_opengl" -# Check whether --enable-opengl was given. -if test "${enable_opengl+set}" = set; then : - enableval=$enable_opengl; else enable_opengl=no -fi +fi; +# Check whether --enable-dbus or --disable-dbus was given. +if test "${enable_dbus+set}" = set; then + enableval="$enable_dbus" -# Check whether --enable-dbus was given. -if test "${enable_dbus+set}" = set; then : - enableval=$enable_dbus; else enable_dbus=no -fi +fi; +# Check whether --enable-gconf or --disable-gconf was given. +if test "${enable_gconf+set}" = set; then + enableval="$enable_gconf" -# Check whether --enable-gconf was given. -if test "${enable_gconf+set}" = set; then : - enableval=$enable_gconf; else enable_gconf=yes -fi +fi; +# Check whether --enable-gnome-vfs or --disable-gnome-vfs was given. +if test "${enable_gnome_vfs+set}" = set; then + enableval="$enable_gnome_vfs" -# 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 +fi; +# Check whether --enable-gio or --disable-gio was given. +if test "${enable_gio+set}" = set; then + enableval="$enable_gio" -# Check whether --enable-gio was given. -if test "${enable_gio+set}" = set; then : - enableval=$enable_gio; else enable_gio=no -fi +fi; +# Check whether --enable-static-gtk or --disable-static-gtk was given. +if test "${enable_static_gtk+set}" = set; then + enableval="$enable_static_gtk" -# Check whether --enable-static-gtk was given. -if test "${enable_static_gtk+set}" = set; then : - enableval=$enable_static_gtk; -fi +fi; +# Check whether --enable-layout or --disable-layout was given. +if test "${enable_layout+set}" = set; then + enableval="$enable_layout" -# Check whether --enable-layout was given. -if test "${enable_layout+set}" = set; then : - enableval=$enable_layout; -fi +fi; +# Check whether --enable-build-mozilla or --disable-build-mozilla was given. +if test "${enable_build_mozilla+set}" = set; then + enableval="$enable_build_mozilla" -# Check whether --enable-build-mozilla was given. -if test "${enable_build_mozilla+set}" = set; then : - enableval=$enable_build_mozilla; -fi +fi; +# Check whether --with-mozilla-version or --without-mozilla-version was given. +if test "${with_mozilla_version+set}" = set; then + withval="$with_mozilla_version" -# Check whether --with-mozilla-version was given. -if test "${with_mozilla_version+set}" = set; then : - withval=$with_mozilla_version; -fi +fi; +# Check whether --with-mozilla-toolkit or --without-mozilla-toolkit was given. +if test "${with_mozilla_toolkit+set}" = set; then + withval="$with_mozilla_toolkit" -# Check whether --with-mozilla-toolkit was given. -if test "${with_mozilla_toolkit+set}" = set; then : - withval=$with_mozilla_toolkit; -fi +fi; +# Check whether --enable-nss_module or --disable-nss_module was given. +if test "${enable_nss_module+set}" = set; then + enableval="$enable_nss_module" -# Check whether --enable-nss_module was given. -if test "${enable_nss_module+set}" = set; then : - enableval=$enable_nss_module; else enable_nss_module=yes -fi +fi; +# Check whether --enable-kde or --disable-kde was given. +if test "${enable_kde+set}" = set; then + enableval="$enable_kde" -# Check whether --enable-kde was given. -if test "${enable_kde+set}" = set; then : - enableval=$enable_kde; -fi +fi; +# Check whether --enable-kdeab or --disable-kdeab was given. +if test "${enable_kdeab+set}" = set; then + enableval="$enable_kdeab" -# Check whether --enable-kdeab was given. -if test "${enable_kdeab+set}" = set; then : - enableval=$enable_kdeab; else if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi -fi +fi; +# Check whether --enable-kde4 or --disable-kde4 was given. +if test "${enable_kde4+set}" = set; then + enableval="$enable_kde4" -# Check whether --enable-kde4 was given. -if test "${enable_kde4+set}" = set; then : - enableval=$enable_kde4; -fi +fi; +# Check whether --enable-binfilter or --disable-binfilter was given. +if test "${enable_binfilter+set}" = set; then + enableval="$enable_binfilter" -# Check whether --enable-binfilter was given. -if test "${enable_binfilter+set}" = set; then : - enableval=$enable_binfilter; else if ! test -d ./binfilter; then enable_binfilter=no; fi -fi +fi; +# Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" -# Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : - enableval=$enable_rpath; -fi +fi; +# Check whether --enable-pam or --disable-pam was given. +if test "${enable_pam+set}" = set; then + enableval="$enable_pam" -# Check whether --enable-pam was given. -if test "${enable_pam+set}" = set; then : - enableval=$enable_pam; -fi +fi; +# Check whether --enable-pam-link or --disable-pam-link was given. +if test "${enable_pam_link+set}" = set; then + enableval="$enable_pam_link" -# Check whether --enable-pam-link was given. -if test "${enable_pam_link+set}" = set; then : - enableval=$enable_pam_link; -fi +fi; +# Check whether --enable-crypt-link or --disable-crypt-link was given. +if test "${enable_crypt_link+set}" = set; then + enableval="$enable_crypt_link" -# Check whether --enable-crypt-link was given. -if test "${enable_crypt_link+set}" = set; then : - enableval=$enable_crypt_link; else enable_crypt_link=yes -fi +fi; +# Check whether --enable-xrender-link or --disable-xrender-link was given. +if test "${enable_xrender_link+set}" = set; then + enableval="$enable_xrender_link" -# Check whether --enable-xrender-link was given. -if test "${enable_xrender_link+set}" = set; then : - enableval=$enable_xrender_link; -fi +fi; +# Check whether --enable-randr or --disable-randr was given. +if test "${enable_randr+set}" = set; then + enableval="$enable_randr" -# Check whether --enable-randr was given. -if test "${enable_randr+set}" = set; then : - enableval=$enable_randr; else enable_randr=yes -fi +fi; +# Check whether --enable-randr-link or --disable-randr-link was given. +if test "${enable_randr_link+set}" = set; then + enableval="$enable_randr_link" -# 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 - - -# Check whether --with-myspell-dicts was given. -if test "${with_myspell_dicts+set}" = set; then : - withval=$with_myspell_dicts; -fi - - -# Check whether --with-system-dicts was given. -if test "${with_system_dicts+set}" = set; then : - withval=$with_system_dicts; -fi +fi; +# Check whether --with-myspell-dicts or --without-myspell-dicts was given. +if test "${with_myspell_dicts+set}" = set; then + withval="$with_myspell_dicts" -# Check whether --with-external-dict-dir was given. -if test "${with_external_dict_dir+set}" = set; then : - withval=$with_external_dict_dir; -fi +fi; +# Check whether --with-system-dicts or --without-system-dicts was given. +if test "${with_system_dicts+set}" = set; then + withval="$with_system_dicts" -# Check whether --with-external-hyph-dir was given. -if test "${with_external_hyph_dir+set}" = set; then : - withval=$with_external_hyph_dir; -fi +fi; +# 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" -# Check whether --with-external-thes-dir was given. -if test "${with_external_thes_dir+set}" = set; then : - withval=$with_external_thes_dir; -fi +fi; +# 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" -# Check whether --with-system-libs was given. -if test "${with_system_libs+set}" = set; then : - withval=$with_system_libs; -fi +fi; +# 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" -# Check whether --with-system-headers was given. -if test "${with_system_headers+set}" = set; then : - withval=$with_system_headers; -fi +fi; +# Check whether --with-system-libs or --without-system-libs was given. +if test "${with_system_libs+set}" = set; then + withval="$with_system_libs" -# Check whether --with-system-jars was given. -if test "${with_system_jars+set}" = set; then : - withval=$with_system_jars; -fi +fi; +# Check whether --with-system-headers or --without-system-headers was given. +if test "${with_system_headers+set}" = set; then + withval="$with_system_headers" -# Check whether --with-system-zlib was given. -if test "${with_system_zlib+set}" = set; then : - withval=$with_system_zlib; -fi +fi; +# Check whether --with-system-jars or --without-system-jars was given. +if test "${with_system_jars+set}" = set; then + withval="$with_system_jars" -# Check whether --with-system-openssl was given. -if test "${with_system_openssl+set}" = set; then : - withval=$with_system_openssl; -fi +fi; +# Check whether --with-system-zlib or --without-system-zlib was given. +if test "${with_system_zlib+set}" = set; then + withval="$with_system_zlib" -# Check whether --with-system-jpeg was given. -if test "${with_system_jpeg+set}" = set; then : - withval=$with_system_jpeg; -fi +fi; +# Check whether --with-system-openssl or --without-system-openssl was given. +if test "${with_system_openssl+set}" = set; then + withval="$with_system_openssl" -# Check whether --with-system-expat was given. -if test "${with_system_expat+set}" = set; then : - withval=$with_system_expat; -fi +fi; +# Check whether --with-system-jpeg or --without-system-jpeg was given. +if test "${with_system_jpeg+set}" = set; then + withval="$with_system_jpeg" -# Check whether --with-system-libwpd was given. -if test "${with_system_libwpd+set}" = set; then : - withval=$with_system_libwpd; -fi +fi; +# Check whether --with-system-expat or --without-system-expat was given. +if test "${with_system_expat+set}" = set; then + withval="$with_system_expat" -# Check whether --with-system-libxml was given. -if test "${with_system_libxml+set}" = set; then : - withval=$with_system_libxml; -fi +fi; +# Check whether --with-system-libwpd or --without-system-libwpd was given. +if test "${with_system_libwpd+set}" = set; then + withval="$with_system_libwpd" -# Check whether --with-system-python was given. -if test "${with_system_python+set}" = set; then : - withval=$with_system_python; -fi +fi; +# Check whether --with-system-libxml or --without-system-libxml was given. +if test "${with_system_libxml+set}" = set; then + withval="$with_system_libxml" -# Check whether --with-system-icu was given. -if test "${with_system_icu+set}" = set; then : - withval=$with_system_icu; -fi +fi; +# Check whether --with-system-python or --without-system-python was given. +if test "${with_system_python+set}" = set; then + withval="$with_system_python" -# Check whether --with-system-poppler was given. -if test "${with_system_poppler+set}" = set; then : - withval=$with_system_poppler; -fi +fi; +# Check whether --with-system-icu or --without-system-icu was given. +if test "${with_system_icu+set}" = set; then + withval="$with_system_icu" -# Check whether --with-system-db was given. -if test "${with_system_db+set}" = set; then : - withval=$with_system_db; -fi +fi; +# Check whether --with-system-poppler or --without-system-poppler was given. +if test "${with_system_poppler+set}" = set; then + withval="$with_system_poppler" -# Check whether --with-system-lucene was given. -if test "${with_system_lucene+set}" = set; then : - withval=$with_system_lucene; -fi +fi; +# Check whether --with-system-db or --without-system-db was given. +if test "${with_system_db+set}" = set; then + withval="$with_system_db" -# 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" +fi; -fi +# Check whether --with-system-lucene or --without-system-lucene was given. +if test "${with_system_lucene+set}" = set; then + withval="$with_system_lucene" +fi; -# 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" +# 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 +fi; -# Check whether --enable-mysql-connector was given. -if test "${enable_mysql_connector+set}" = set; then : - enableval=$enable_mysql_connector; -fi +# 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; +# Check whether --enable-mysql-connector or --disable-mysql-connector was given. +if test "${enable_mysql_connector+set}" = set; then + enableval="$enable_mysql_connector" -# Check whether --with-system-mysql was given. -if test "${with_system_mysql+set}" = set; then : - withval=$with_system_mysql; -fi +fi; +# Check whether --with-system-mysql or --without-system-mysql was given. +if test "${with_system_mysql+set}" = set; then + withval="$with_system_mysql" -# Check whether --with-libmysql-path was given. -if test "${with_libmysql_path+set}" = set; then : - withval=$with_libmysql_path; -fi +fi; +# Check whether --with-libmysql-path or --without-libmysql-path was given. +if test "${with_libmysql_path+set}" = set; then + withval="$with_libmysql_path" -# Check whether --with-system-mysql-cppconn was given. -if test "${with_system_mysql_cppconn+set}" = set; then : - withval=$with_system_mysql_cppconn; -fi +fi; +# 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" -# Check whether --with-system-hsqldb was given. -if test "${with_system_hsqldb+set}" = set; then : - withval=$with_system_hsqldb; -fi +fi; +# Check whether --with-system-hsqldb or --without-system-hsqldb was given. +if test "${with_system_hsqldb+set}" = set; then + withval="$with_system_hsqldb" -# Check whether --with-hsqldb-jar was given. -if test "${with_hsqldb_jar+set}" = set; then : - withval=$with_hsqldb_jar; HSQLDB_JAR="$withval" +fi; -fi +# 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; -# Check whether --with-system-beanshell was given. -if test "${with_system_beanshell+set}" = set; then : - withval=$with_system_beanshell; -fi +# Check whether --with-system-beanshell or --without-system-beanshell was given. +if test "${with_system_beanshell+set}" = set; then + withval="$with_system_beanshell" +fi; -# Check whether --with-beanshell-jar was given. -if test "${with_beanshell_jar+set}" = set; then : - withval=$with_beanshell_jar; BSH_JAR="$withval" +# 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 +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" -# 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 was given. -if test "${enable_minimizer+set}" = set; then : - enableval=$enable_minimizer; -fi - -# Check whether --enable-presenter-console was given. -if test "${enable_presenter_console+set}" = set; then : - enableval=$enable_presenter_console; -fi - -# Check whether --enable-pdfimport was given. -if test "${enable_pdfimport+set}" = set; then : - enableval=$enable_pdfimport; -fi - -# Check whether --enable-wiki-publisher was given. -if test "${enable_wiki_publisher+set}" = set; then : - enableval=$enable_wiki_publisher; -fi - - -# 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" - -fi - - -# 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" - -fi - - -# 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" - -fi +fi; +# Check whether --enable-minimizer or --disable-minimizer was given. +if test "${enable_minimizer+set}" = set; then + enableval="$enable_minimizer" +fi; +# Check whether --enable-presenter-console or --disable-presenter-console was given. +if test "${enable_presenter_console+set}" = set; then + enableval="$enable_presenter_console" -# 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" - -fi - - -# 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" - -fi - -# Check whether --enable-report-builder was given. -if test "${enable_report_builder+set}" = set; then : - enableval=$enable_report_builder; -fi +fi; +# Check whether --enable-pdfimport or --disable-pdfimport was given. +if test "${enable_pdfimport+set}" = set; then + enableval="$enable_pdfimport" +fi; +# Check whether --enable-wiki-publisher or --disable-wiki-publisher was given. +if test "${enable_wiki_publisher+set}" = set; then + enableval="$enable_wiki_publisher" -# Check whether --with-system-jfreereport was given. -if test "${with_system_jfreereport+set}" = set; then : - withval=$with_system_jfreereport; -fi - +fi; -# Check whether --with-sac-jar was given. -if test "${with_sac_jar+set}" = set; then : - withval=$with_sac_jar; SAC_JAR="$withval" +# 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 +fi; +# 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" -# Check whether --with-libxml-jar was given. -if test "${with_libxml_jar+set}" = set; then : - withval=$with_libxml_jar; LIBXML_JAR="$withval" +fi; -fi +# 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; -# Check whether --with-flute-jar was given. -if test "${with_flute_jar+set}" = set; then : - withval=$with_flute_jar; FLUTE_JAR="$withval" +# 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 +fi; +# 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" -# Check whether --with-jfreereport-jar was given. -if test "${with_jfreereport_jar+set}" = set; then : - withval=$with_jfreereport_jar; JFREEREPORT_JAR="$withval" +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 +fi; +# Check whether --with-system-jfreereport or --without-system-jfreereport was given. +if test "${with_system_jfreereport+set}" = set; then + withval="$with_system_jfreereport" -# Check whether --with-liblayout-jar was given. -if test "${with_liblayout_jar+set}" = set; then : - withval=$with_liblayout_jar; LIBLAYOUT_JAR="$withval" +fi; -fi +# 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; -# Check whether --with-libloader-jar was given. -if test "${with_libloader_jar+set}" = set; then : - withval=$with_libloader_jar; LIBLOADER_JAR="$withval" +# 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 +fi; +# 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" -# Check whether --with-libloader-jar was given. -if test "${with_libloader_jar+set}" = set; then : - withval=$with_libloader_jar; LIBLOADER_JAR="$withval" +fi; -fi +# 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; -# Check whether --with-libformula-jar was given. -if test "${with_libformula_jar+set}" = set; then : - withval=$with_libformula_jar; LIBFORMULA_JAR="$withval" +# 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 +fi; +# 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" -# Check whether --with-librepository-jar was given. -if test "${with_librepository_jar+set}" = set; then : - withval=$with_librepository_jar; LIBREPOSITORY_JAR="$withval" +fi; -fi +# 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; -# Check whether --with-libfonts-jar was given. -if test "${with_libfonts_jar+set}" = set; then : - withval=$with_libfonts_jar; LIBFONTS_JAR="$withval" +# 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 +fi; +# 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" -# Check whether --with-libserializer-jar was given. -if test "${with_libserializer_jar+set}" = set; then : - withval=$with_libserializer_jar; LIBSERIALIZER_JAR="$withval" +fi; -fi +# 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; -# Check whether --with-libbase-jar was given. -if test "${with_libbase_jar+set}" = set; then : - withval=$with_libbase_jar; LIBBASE_JAR="$withval" +# 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 +fi; +# 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" -# Check whether --with-system-saxon was given. -if test "${with_system_saxon+set}" = set; then : - withval=$with_system_saxon; -fi +fi; +# Check whether --with-system-saxon or --without-system-saxon was given. +if test "${with_system_saxon+set}" = set; then + withval="$with_system_saxon" -# Check whether --with-saxon-jar was given. -if test "${with_saxon_jar+set}" = set; then : - withval=$with_saxon_jar; SAXON_JAR="$withval" +fi; -fi +# 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; -# Check whether --with-system-libxslt was given. -if test "${with_system_libxslt+set}" = set; then : - withval=$with_system_libxslt; -fi +# Check whether --with-system-libxslt or --without-system-libxslt was given. +if test "${with_system_libxslt+set}" = set; then + withval="$with_system_libxslt" +fi; -# Check whether --with-system-odbc was given. -if test "${with_system_odbc+set}" = set; then : - withval=$with_system_odbc; -fi +# Check whether --with-system-odbc or --without-system-odbc was given. +if test "${with_system_odbc+set}" = set; then + withval="$with_system_odbc" +fi; -# Check whether --with-system-sane was given. -if test "${with_system_sane+set}" = set; then : - withval=$with_system_sane; -fi +# Check whether --with-system-sane or --without-system-sane was given. +if test "${with_system_sane+set}" = set; then + withval="$with_system_sane" +fi; -# Check whether --with-system-xrender was given. -if test "${with_system_xrender+set}" = set; then : - withval=$with_system_xrender; -fi +# Check whether --with-system-xrender or --without-system-xrender was given. +if test "${with_system_xrender+set}" = set; then + withval="$with_system_xrender" +fi; -# Check whether --with-system-curl was given. -if test "${with_system_curl+set}" = set; then : - withval=$with_system_curl; -fi +# Check whether --with-system-curl or --without-system-curl was given. +if test "${with_system_curl+set}" = set; then + withval="$with_system_curl" +fi; -# Check whether --with-system-boost was given. -if test "${with_system_boost+set}" = set; then : - withval=$with_system_boost; -fi +# Check whether --with-system-boost or --without-system-boost was given. +if test "${with_system_boost+set}" = set; then + withval="$with_system_boost" +fi; -# Check whether --with-system-vigra was given. -if test "${with_system_vigra+set}" = set; then : - withval=$with_system_vigra; -fi +# Check whether --with-system-vigra or --without-system-vigra was given. +if test "${with_system_vigra+set}" = set; then + withval="$with_system_vigra" -# Check whether --enable-neon was given. -if test "${enable_neon+set}" = set; then : - enableval=$enable_neon; -fi +fi; +# Check whether --enable-neon or --disable-neon was given. +if test "${enable_neon+set}" = set; then + enableval="$enable_neon" -# Check whether --enable-Xaw was given. -if test "${enable_Xaw+set}" = set; then : - enableval=$enable_Xaw; -fi +fi; +# Check whether --enable-Xaw or --disable-Xaw was given. +if test "${enable_Xaw+set}" = set; then + enableval="$enable_Xaw" +fi; -# Check whether --with-system-neon was given. -if test "${with_system_neon+set}" = set; then : - withval=$with_system_neon; -fi +# Check whether --with-system-neon or --without-system-neon was given. +if test "${with_system_neon+set}" = set; then + withval="$with_system_neon" +fi; -# Check whether --with-system-agg was given. -if test "${with_system_agg+set}" = set; then : - withval=$with_system_agg; -fi +# Check whether --with-system-agg or --without-system-agg was given. +if test "${with_system_agg+set}" = set; then + withval="$with_system_agg" +fi; -# Check whether --with-system-hunspell was given. -if test "${with_system_hunspell+set}" = set; then : - withval=$with_system_hunspell; -fi +# Check whether --with-system-hunspell or --without-system-hunspell was given. +if test "${with_system_hunspell+set}" = set; then + withval="$with_system_hunspell" +fi; -# Check whether --with-system-mythes was given. -if test "${with_system_mythes+set}" = set; then : - withval=$with_system_mythes; -fi +# Check whether --with-system-mythes or --without-system-mythes was given. +if test "${with_system_mythes+set}" = set; then + withval="$with_system_mythes" +fi; -# Check whether --with-system-altlinuxhyph was given. -if test "${with_system_altlinuxhyph+set}" = set; then : - withval=$with_system_altlinuxhyph; -fi +# Check whether --with-system-altlinuxhyph or --without-system-altlinuxhyph was given. +if test "${with_system_altlinuxhyph+set}" = set; then + withval="$with_system_altlinuxhyph" +fi; -# Check whether --with-system-lpsolve was given. -if test "${with_system_lpsolve+set}" = set; then : - withval=$with_system_lpsolve; -fi +# Check whether --with-system-lpsolve or --without-system-lpsolve was given. +if test "${with_system_lpsolve+set}" = set; then + withval="$with_system_lpsolve" +fi; -# Check whether --with-system-cppunit was given. -if test "${with_system_cppunit+set}" = set; then : - withval=$with_system_cppunit; -fi +# Check whether --with-system-cppunit or --without-system-cppunit was given. +if test "${with_system_cppunit+set}" = set; then + withval="$with_system_cppunit" +fi; -# Check whether --with-system-redland was given. -if test "${with_system_redland+set}" = set; then : - withval=$with_system_redland; -fi +# Check whether --with-system-redland or --without-system-redland was given. +if test "${with_system_redland+set}" = set; then + withval="$with_system_redland" +fi; -# Check whether --with-system-mozilla was given. -if test "${with_system_mozilla+set}" = set; then : - withval=$with_system_mozilla; WITH_SYSTEM_MOZILLA=$withval +# 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 else WITH_SYSTEM_MOZILLA=no -fi +fi; - -# Check whether --with-stlport was given. -if test "${with_stlport+set}" = set; then : - withval=$with_stlport; WITH_STLPORT=$withval +# Check whether --with-stlport or --without-stlport was given. +if test "${with_stlport+set}" = set; then + withval="$with_stlport" + WITH_STLPORT=$withval else WITH_STLPORT=auto -fi +fi; +# Check whether --with-jdk-home or --without-jdk-home was given. +if test "${with_jdk_home+set}" = set; then + withval="$with_jdk_home" -# Check whether --with-jdk-home was given. -if test "${with_jdk_home+set}" = set; then : - withval=$with_jdk_home; -fi - +fi; -# Check whether --with-gxx_include_path was given. -if test "${with_gxx_include_path+set}" = set; then : - withval=$with_gxx_include_path; -fi +# 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; -# 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 +# 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 else WITH_JAVA=java -fi +fi; +# Check whether --enable-gcjaot or --disable-gcjaot was given. +if test "${enable_gcjaot+set}" = set; then + enableval="$enable_gcjaot" -# Check whether --enable-gcjaot was given. -if test "${enable_gcjaot+set}" = set; then : - enableval=$enable_gcjaot; -fi +fi; +# Check whether --with-ant-home or --without-ant-home was given. +if test "${with_ant_home+set}" = set; then + withval="$with_ant_home" -# Check whether --with-ant-home was given. -if test "${with_ant_home+set}" = set; then : - withval=$with_ant_home; -fi +fi; +# Check whether --with-junit or --without-junit was given. +if test "${with_junit+set}" = set; then + withval="$with_junit" -# Check whether --with-junit was given. -if test "${with_junit+set}" = set; then : - withval=$with_junit; else with_junit=yes -fi - +fi; -# Check whether --with-perl-home was given. -if test "${with_perl_home+set}" = set; then : - withval=$with_perl_home; -fi +# Check whether --with-perl-home or --without-perl-home was given. +if test "${with_perl_home+set}" = set; then + withval="$with_perl_home" +fi; -# Check whether --with-cl-home was given. -if test "${with_cl_home+set}" = set; then : - withval=$with_cl_home; -fi +# Check whether --with-cl-home or --without-cl-home was given. +if test "${with_cl_home+set}" = set; then + withval="$with_cl_home" +fi; -# Check whether --with-mspdb-path was given. -if test "${with_mspdb_path+set}" = set; then : - withval=$with_mspdb_path; -fi +# Check whether --with-mspdb-path or --without-mspdb-path was given. +if test "${with_mspdb_path+set}" = set; then + withval="$with_mspdb_path" +fi; -# Check whether --with-midl-path was given. -if test "${with_midl_path+set}" = set; then : - withval=$with_midl_path; -fi +# Check whether --with-midl-path or --without-midl-path was given. +if test "${with_midl_path+set}" = set; then + withval="$with_midl_path" +fi; -# Check whether --with-csc-path was given. -if test "${with_csc_path+set}" = set; then : - withval=$with_csc_path; -fi +# Check whether --with-csc-path or --without-csc-path was given. +if test "${with_csc_path+set}" = set; then + withval="$with_csc_path" +fi; -# Check whether --with-nsis-path was given. -if test "${with_nsis_path+set}" = set; then : - withval=$with_nsis_path; -fi +# Check whether --with-nsis-path or --without-nsis-path was given. +if test "${with_nsis_path+set}" = set; then + withval="$with_nsis_path" +fi; -# Check whether --with-frame-home was given. -if test "${with_frame_home+set}" = set; then : - withval=$with_frame_home; -fi +# Check whether --with-frame-home or --without-frame-home was given. +if test "${with_frame_home+set}" = set; then + withval="$with_frame_home" +fi; -# Check whether --with-psdk-home was given. -if test "${with_psdk_home+set}" = set; then : - withval=$with_psdk_home; -fi +# Check whether --with-psdk-home or --without-psdk-home was given. +if test "${with_psdk_home+set}" = set; then + withval="$with_psdk_home" +fi; -# Check whether --with-directx-home was given. -if test "${with_directx_home+set}" = set; then : - withval=$with_directx_home; -fi +# Check whether --with-directx-home or --without-directx-home was given. +if test "${with_directx_home+set}" = set; then + withval="$with_directx_home" +fi; -# Check whether --with-mozilla-build was given. -if test "${with_mozilla_build+set}" = set; then : - withval=$with_mozilla_build; MOZILLABUILD=$withval -fi +# 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; +# Check whether --with-local-solenv or --without-local-solenv was given. +if test "${with_local_solenv+set}" = set; then + withval="$with_local_solenv" -# Check whether --with-local-solenv was given. -if test "${with_local_solenv+set}" = set; then : - withval=$with_local_solenv; -fi +fi; +# Check whether --with-local-solver or --without-local-solver was given. +if test "${with_local_solver+set}" = set; then + withval="$with_local_solver" -# Check whether --with-local-solver was given. -if test "${with_local_solver+set}" = set; then : - withval=$with_local_solver; -fi +fi; +# Check whether --enable-check-only or --disable-check-only was given. +if test "${enable_check_only+set}" = set; then + enableval="$enable_check_only" -# Check whether --enable-check-only was given. -if test "${enable_check_only+set}" = set; then : - enableval=$enable_check_only; -fi +fi; +# Check whether --enable-ccache-skip or --disable-ccache-skip was given. +if test "${enable_ccache_skip+set}" = set; then + enableval="$enable_ccache_skip" -# Check whether --enable-ccache-skip was given. -if test "${enable_ccache_skip+set}" = set; then : - enableval=$enable_ccache_skip; else enable_ccache_skip=auto -fi +fi; +# Check whether --with-lang or --without-lang was given. +if test "${with_lang+set}" = set; then + withval="$with_lang" -# Check whether --with-lang was given. -if test "${with_lang+set}" = set; then : - withval=$with_lang; -fi - +fi; -# Check whether --with-poor-help-localizations was given. -if test "${with_poor_help_localizations+set}" = set; then : - withval=$with_poor_help_localizations; -fi +# 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; -# Check whether --with-dict was given. -if test "${with_dict+set}" = set; then : - withval=$with_dict; -fi +# Check whether --with-dict or --without-dict was given. +if test "${with_dict+set}" = set; then + withval="$with_dict" +fi; -# Check whether --with-intro-bitmaps was given. -if test "${with_intro_bitmaps+set}" = set; then : - withval=$with_intro_bitmaps; -fi +# Check whether --with-intro-bitmaps or --without-intro-bitmaps was given. +if test "${with_intro_bitmaps+set}" = set; then + withval="$with_intro_bitmaps" +fi; -# Check whether --with-about-bitmaps was given. -if test "${with_about_bitmaps+set}" = set; then : - withval=$with_about_bitmaps; -fi +# Check whether --with-about-bitmaps or --without-about-bitmaps was given. +if test "${with_about_bitmaps+set}" = set; then + withval="$with_about_bitmaps" +fi; -# Check whether --with-vendor was given. -if test "${with_vendor+set}" = set; then : - withval=$with_vendor; -fi +# Check whether --with-vendor or --without-vendor was given. +if test "${with_vendor+set}" = set; then + withval="$with_vendor" +fi; -# Check whether --with-unix-wrapper was given. -if test "${with_unix_wrapper+set}" = set; then : - withval=$with_unix_wrapper; -fi +# Check whether --with-unix-wrapper or --without-unix-wrapper was given. +if test "${with_unix_wrapper+set}" = set; then + withval="$with_unix_wrapper" +fi; -# Check whether --with-asm-home was given. -if test "${with_asm_home+set}" = set; then : - withval=$with_asm_home; -fi +# Check whether --with-asm-home or --without-asm-home was given. +if test "${with_asm_home+set}" = set; then + withval="$with_asm_home" +fi; -# Check whether --with-os-version was given. -if test "${with_os_version+set}" = set; then : - withval=$with_os_version; -fi +# Check whether --with-os-version or --without-os-version was given. +if test "${with_os_version+set}" = set; then + withval="$with_os_version" +fi; -# Check whether --with-unzip-home was given. -if test "${with_unzip_home+set}" = set; then : - withval=$with_unzip_home; -fi +# Check whether --with-unzip-home or --without-unzip-home was given. +if test "${with_unzip_home+set}" = set; then + withval="$with_unzip_home" +fi; -# Check whether --with-zip-home was given. -if test "${with_zip_home+set}" = set; then : - withval=$with_zip_home; -fi +# Check whether --with-zip-home or --without-zip-home was given. +if test "${with_zip_home+set}" = set; then + withval="$with_zip_home" +fi; -# Check whether --with-mingwin was given. -if test "${with_mingwin+set}" = set; then : - withval=$with_mingwin; WITH_MINGWIN=$withval +# Check whether --with-mingwin or --without-mingwin was given. +if test "${with_mingwin+set}" = set; then + withval="$with_mingwin" + WITH_MINGWIN=$withval else WITH_MINGWIN=0 -fi - - -# Check whether --with-build-version was given. -if test "${with_build_version+set}" = set; then : - withval=$with_build_version; with_build_version=$withval -fi +fi; +# 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; -# Check whether --with-alloc was given. -if test "${with_alloc+set}" = set; then : - withval=$with_alloc; -fi +# Check whether --with-alloc or --without-alloc was given. +if test "${with_alloc+set}" = set; then + withval="$with_alloc" -# Check whether --enable-verbose was given. -if test "${enable_verbose+set}" = set; then : - enableval=$enable_verbose; -fi +fi; +# Check whether --enable-verbose or --disable-verbose was given. +if test "${enable_verbose+set}" = set; then + enableval="$enable_verbose" +fi; BUILD_TYPE="OOo" @@ -4748,144 +2978,29 @@ echo "* *" echo "********************************************************************" echo "" cat /dev/null > warn -{ $as_echo "$as_me:${as_lineno-$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 - as_fn_arith $ac_count + 1 && ac_count=$as_val - 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_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$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 - as_fn_arith $ac_count + 1 && ac_count=$as_val - 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_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -4895,37 +3010,35 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$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 +done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_AWK+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $AWK in [\\/]* | ?:[\\/]*) @@ -4937,41 +3050,42 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi AWK=$ac_cv_path_AWK + if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "install awk to run this script" "$LINENO" 5 + { { 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 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SED in [\\/]* | ?:[\\/]*) @@ -4983,46 +3097,47 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi SED=$ac_cv_path_SED + if test -n "$SED"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "install sed to run this script" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -5040,134 +3155,110 @@ if test -e $_solenv/inc/minor.mk; then SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" else - as_fn_error "$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." "$LINENO" 5 + { { 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 - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done +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 + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + 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_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -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. - + { { 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 +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_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&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_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac +$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; }; } + +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 + echo $ECHO_N "(cached) $ECHO_C" >&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;} + { (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;} + { (exit 1); exit 1; }; } + +fi +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 +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/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi + 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -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 +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/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&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 "$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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 -fi + 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; -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. @@ -5176,22 +3267,23 @@ test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- - if test "$build" != "$host" -o "$build" != "$target" \ -o "$host" != "$target"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "You need at least Cygwin V1.5.x" "$LINENO" 5 + { { 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 CygwinVer="false" @@ -5208,10 +3300,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GNUTAR+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GNUTAR in [\\/]* | ?:[\\/]*) @@ -5224,51 +3316,56 @@ for as_dir in $as_dummy 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi GNUTAR=$ac_cv_path_GNUTAR + if test -n "$GNUTAR"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." "$LINENO" 5 + { { 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:${as_lineno-$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_fn_error "use solaris >= 6 to build OpenOffice.org" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "only sparc and i386 processors are supported" "$LINENO" 5 + { { 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 ;; linux-gnu*|k*bsd*-gnu*) @@ -5299,8 +3396,8 @@ $as_echo "ok ($build_cpu)" >&6; } test_freetype=no _os=Darwin if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then - { $as_echo "$as_me:${as_lineno-$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 @@ -5321,17 +3418,17 @@ $as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Us test_cups=yes test_randr=yes test_freetype=yes - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: found OSVERSION=$OSVERSION" >&5 -$as_echo "found OSVERSION=$OSVERSION" >&6; } - { $as_echo "$as_me:${as_lineno-$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" @@ -5342,8 +3439,8 @@ $as_echo_n "checking which thread library to use... " >&6; } PTHREAD_CFLAGS="" PTHREAD_LIBS="-pthread" fi - { $as_echo "$as_me:${as_lineno-$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) @@ -5372,7 +3469,9 @@ $as_echo "$PTHREAD_LIBS" >&6; } _os=AIX ;; *) - as_fn_error "$_os operating system is not suitable to build OpenOffice.org!" "$LINENO" 5 + { { 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 @@ -5380,17 +3479,17 @@ esac -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -5399,88 +3498,90 @@ if test "$_os" = "WINNT"; then fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "--enable-symbols only accepts yes, TRUE or SMALL as parameter." "$LINENO" 5 + { { 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= fi @@ -5488,20 +3589,22 @@ $as_echo "yes, small ones" >&6; } fi else ENABLE_SYMBOLS= - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "--disable-strip-solver only accepts yes or no as parameter." "$LINENO" 5 + { { 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 else @@ -5513,29 +3616,29 @@ else fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -5550,124 +3653,124 @@ if test -z "$enable_fetch_external" || test "$enable_fetch_external" = "yes" \ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $DICT_SYSTEM_DIR" >&5 -$as_echo "$DICT_SYSTEM_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $HYPH_SYSTEM_DIR" >&5 -$as_echo "$HYPH_SYSTEM_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -5677,12 +3780,16 @@ fi if test $_os = "WINNT"; then - { $as_echo "$as_me:${as_lineno-$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_fn_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 +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." "$LINENO" 5 +link, and copy the program to the name of the link." >&2;} + { (exit 1); exit 1; }; } fi CC=`echo $CC | $SED "s/^guw.exe //"` CXX=`echo $CXX | $SED "s/^guw.exe //"` @@ -5697,29 +3804,31 @@ link, and copy the program to the name of the link." "$LINENO" 5 CXX="g++ -mno-cygwin" fi fi - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - as_fn_error "cygwin gcc and g++ are needed, please install them." "$LINENO" 5 + { { 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 # 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SHELLPATH+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SHELLPATH in [\\/]* | ?:[\\/]*) @@ -5731,45 +3840,46 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi SHELLPATH=$ac_cv_path_SHELLPATH + if test -n "$SHELLPATH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "bash not found in \$PATH" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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 @@ -5790,10 +3900,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -5803,37 +3913,35 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$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 +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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. @@ -5843,50 +3951,39 @@ 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 + 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="gcc" - $as_echo "$as_me:${as_lineno-$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 +done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -5896,37 +3993,77 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$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 +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -5937,19 +4074,18 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -5967,25 +4103,24 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -5995,41 +4130,39 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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. @@ -6039,78 +4172,66 @@ 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 + 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="$ac_prog" - $as_echo "$as_me:${as_lineno-$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 +done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +test -z "$CC" && { { 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 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +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 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + 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_status=$? + 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_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -cat confdefs.h - <<_ACEOF >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. */ int @@ -6122,109 +4243,112 @@ 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:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; 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 '' +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=$? + 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 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 -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ { 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 +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } + 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 +# 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 +# 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 + ac_status=$? + 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. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +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; }; } + fi + fi +fi +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 -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 +# Check 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 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + 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 # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -6232,90 +4356,38 @@ $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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } + { { 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 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest$ac_cv_exeext +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 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >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. */ int @@ -6327,46 +4399,45 @@ 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:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + 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 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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +{ { 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 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >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. */ int @@ -6380,49 +4451,55 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_compiler_gnu=yes else - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -6433,34 +4510,39 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +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_prog_cc_g=yes else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -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_cv_prog_cc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } +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 @@ -6476,14 +4558,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$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 +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_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >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 #include @@ -6511,17 +4597,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* 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 + 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 -std. */ + that's true only with -std1. */ 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);}; @@ -6536,37 +4617,205 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# 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" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$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 + 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 + 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 done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&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 -if test "x$ac_cv_prog_cc_c89" != xno; then : +# 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 +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 + 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 + : +else + 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 +/* 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 + 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 +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 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 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6581,10 +4830,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_COMPATH+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $COMPATH in [\\/]* | ?:[\\/]*) @@ -6596,29 +4845,28 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi COMPATH=$ac_cv_path_COMPATH + if test -n "$COMPATH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -6628,18 +4876,22 @@ COMPATH=`echo $COMPATH | $SED "s@/[Bb][Ii][Nn]\\\$@@"`; echo $COMPATH GCCVER=20995 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then - { $as_echo "$as_me:${as_lineno-$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_fn_error "found version \"$_gcc_version\", use version 3+ of the gcc compiler" "$LINENO" 5 + { { 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_fn_error "version \"$_gcc_version\" gives internal error with small." "$LINENO" 5 + { { 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 fi @@ -6652,35 +4904,43 @@ $as_echo_n "checking the GNU gcc compiler version... " >&6; } fi fi if test "$GCCVER" -ge "040100" ; then - as_fn_error "You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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" -cat confdefs.h - <<_ACEOF >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 @@ -6695,60 +4955,85 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking whether to enable hid list feature" >&5 -$as_echo_n "checking whether to enable hid list feature... " >&6; } +echo "$as_me:$LINENO: checking whether to enable hid list feature" >&5 +echo $ECHO_N "checking whether to enable hid list feature... $ECHO_C" >&6 if test -n "$enable_hids" && test "$enable_hids" != "no"; then NO_HIDS="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else NO_HIDS="TRUE" - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -6756,36 +5041,40 @@ for a in "$MAKE" $GNUMAKE make gmake gnumake; do break fi done -{ $as_echo "$as_me:${as_lineno-$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_fn_error "not found. install GNU make." "$LINENO" 5 + { { 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:${as_lineno-$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 "037901" ; then - { $as_echo "$as_me:${as_lineno-$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 if test "$_os" = "Darwin"; then if test "$_make_longver" -ge "037900" ; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: WARNING: failed ($GNUMAKE $_make_version need 3.79.0+)" >&5 -$as_echo "$as_me: WARNING: failed ($GNUMAKE $_make_version need 3.79.0+)" >&2;} + { echo "$as_me:$LINENO: WARNING: failed ($GNUMAKE $_make_version need 3.79.0+)" >&5 +echo "$as_me: WARNING: failed ($GNUMAKE $_make_version need 3.79.0+)" >&2;} fi else - as_fn_error "failed ($GNUMAKE $_make_version need 3.79.1+)" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: failed ($GNUMAKE $_make_version need 3.79.1+)" >&5 +echo "$as_me: error: failed ($GNUMAKE $_make_version need 3.79.1+)" >&2;} + { (exit 1); exit 1; }; } fi fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -6793,10 +5082,12 @@ for a in $GNUTAR gtar gnutar tar; do break fi done -{ $as_echo "$as_me:${as_lineno-$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_fn_error "not found. install GNU tar." "$LINENO" 5 + { { 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 @@ -6807,10 +5098,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path__cc+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $_cc in [\\/]* | ?:[\\/]*) @@ -6822,58 +5113,65 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi _cc=$ac_cv_path__cc + if test -n "$_cc"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" "$LINENO" 5 + { { 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_fn_error "found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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 confdefs.h - <<_ACEOF >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 @@ -6888,19 +5186,43 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - HAVE_LD_HASH_STYLE=FALSE + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +HAVE_LD_HASH_STYLE=FALSE fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +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:${as_lineno-$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:${as_lineno-$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 @@ -6912,10 +5234,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path__cc+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $_cc in [\\/]* | ?:[\\/]*) @@ -6927,44 +5249,45 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi _cc=$ac_cv_path__cc + if test -n "$_cc"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: WARNING: ******* $_cc , $COMPATH" >&5 -$as_echo "$as_me: WARNING: ******* $_cc , $COMPATH" >&2;} - { $as_echo "$as_me:${as_lineno-$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_fn_error "found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: result: checked" >&5 -$as_echo "checked" >&6; } + echo "$as_me:$LINENO: result: checked" >&5 +echo "${ECHO_T}checked" >&6 fi fi fi @@ -6972,10 +5295,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PERL+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PERL in [\\/]* | ?:[\\/]*) @@ -6987,29 +5310,28 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi PERL=$ac_cv_path_PERL + if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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"` @@ -7018,38 +5340,46 @@ else if test -x "$_perl_path"; then PERL=$_perl_path else - as_fn_error "$_perl_path not found" "$LINENO" 5 + { { 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:${as_lineno-$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_fn_error "found Perl version \"$_perl_version\", use version 5 of Perl" "$LINENO" 5 + { { 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:${as_lineno-$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_fn_error "Perl not found, install version 5 of Perl" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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_fn_error "Failed to find some modules" "$LINENO" 5 + { { 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:${as_lineno-$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`; @@ -7059,8 +5389,8 @@ $as_echo_n "checking for friendly registry keys... " >&6; } else with_cl_home=`cygpath -u "$with_cl_home"` fi - { $as_echo "$as_me:${as_lineno-$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"` @@ -7081,10 +5411,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSPDB_PATH+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSPDB_PATH in [\\/]* | ?:[\\/]*) @@ -7096,35 +5426,34 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH + if test -n "$MSPDB_PATH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSPDB_PATH+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSPDB_PATH in [\\/]* | ?:[\\/]*) @@ -7136,50 +5465,51 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH + if test -n "$MSPDB_PATH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CC+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CC in [\\/]* | ?:[\\/]*) @@ -7191,41 +5521,40 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi CC=$ac_cv_path_CC + if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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) @@ -7234,42 +5563,48 @@ $as_echo_n "checking the Version of Microsoft C/C++ Compiler... " >&6; } printf (\"%04d\",vertoken[i] ) } }"` - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." "$LINENO" 5 + { { 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_fn_error "Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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_fn_error "Mingwin32 C++ Compiler not found." "$LINENO" 5 + { { 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 fi @@ -7281,10 +5616,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MIDL_PATH+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MIDL_PATH in [\\/]* | ?:[\\/]*) @@ -7296,29 +5631,28 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi MIDL_PATH=$ac_cv_path_MIDL_PATH + if test -n "$MIDL_PATH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -7344,7 +5678,9 @@ fi fi fi if test ! -x "$MIDL_PATH/midl.exe"; then - as_fn_error "midl.exe not found. Make sure it's in the path or use --with-midl-path" "$LINENO" 5 + { { 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 ) MIDL_PATH=`cygpath -d "$MIDL_PATH"` @@ -7352,10 +5688,10 @@ fi # 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CSC_PATH+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CSC_PATH in [\\/]* | ?:[\\/]*) @@ -7367,29 +5703,28 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi CSC_PATH=$ac_cv_path_CSC_PATH + if test -n "$CSC_PATH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -7405,14 +5740,16 @@ fi fi fi if test ! -x "$CSC_PATH/csc.exe"; then - as_fn_error "csc.exe not found. Make sure it's in the path or use --with-csc-path" "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -7434,10 +5771,12 @@ $as_echo_n "checking .NET Framework... " >&6; } fi fi if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then - as_fn_error "mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" "$LINENO" 5 + { { 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:${as_lineno-$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"` @@ -7453,15 +5792,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:${as_lineno-$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 + if test "${ac_cv_prog_CPP+set}" = set; then + 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" @@ -7475,7 +5814,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >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. */ #ifdef __STDC__ # include @@ -7484,24 +5827,68 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +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 + 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 + 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 confdefs.h - <<_ACEOF >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 _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +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 + 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -7511,7 +5898,7 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok; then break fi @@ -7523,8 +5910,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -7534,7 +5921,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >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. */ #ifdef __STDC__ # include @@ -7543,24 +5934,68 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +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 + 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 + 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 confdefs.h - <<_ACEOF >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 _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +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 + 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -7570,13 +6005,14 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } + { { 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 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -7586,12 +6022,16 @@ 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >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 #include @@ -7606,23 +6046,51 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_header_stdc=yes else - ac_cv_header_stdc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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. - cat confdefs.h - <<_ACEOF >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 _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - + $EGREP "memchr" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -7632,14 +6100,18 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >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 _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - + $EGREP "free" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -7649,13 +6121,16 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : else - cat confdefs.h - <<_ACEOF >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 -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -7675,50 +6150,61 @@ 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 -if ac_fn_c_try_run "$LINENO"; then : - +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 + : else - ac_cv_header_stdc=no + 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 -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam 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:${as_lineno-$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 -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -7728,41 +6214,39 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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. @@ -7772,77 +6256,64 @@ 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 + 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_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$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 +done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +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 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + 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_status=$? + 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_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -{ $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >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. */ int @@ -7856,34 +6327,55 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +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_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 - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext +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 + 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. */ int @@ -7894,80 +6386,176 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +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_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 - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + 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 +/* 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 -if ac_fn_cxx_try_compile "$LINENO"; then : - +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_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 - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + 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 +/* 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 -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -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_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$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 +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_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 - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi + 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 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:${as_lineno-$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 + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" @@ -7981,7 +6569,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >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. */ #ifdef __STDC__ # include @@ -7990,24 +6582,68 @@ do #endif Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - +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 + 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 + 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 confdefs.h - <<_ACEOF >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 _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +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 + 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -8017,7 +6653,7 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok; then break fi @@ -8029,8 +6665,8 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -8040,7 +6676,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >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. */ #ifdef __STDC__ # include @@ -8049,24 +6689,68 @@ do #endif Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - +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 + 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 + 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 confdefs.h - <<_ACEOF >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 _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +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 + 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -8076,13 +6760,14 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } + { { 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 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -8100,15 +6785,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:${as_lineno-$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 + if test "${ac_cv_prog_CPP+set}" = set; then + 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" @@ -8122,7 +6807,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >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. */ #ifdef __STDC__ # include @@ -8131,24 +6820,68 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +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 + 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 + 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 confdefs.h - <<_ACEOF >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 _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +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 + 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -8158,7 +6891,7 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok; then break fi @@ -8170,8 +6903,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -8181,7 +6914,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >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. */ #ifdef __STDC__ # include @@ -8190,24 +6927,68 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +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 + 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 + 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 confdefs.h - <<_ACEOF >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 _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +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 + 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -8217,13 +6998,14 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } + { { 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 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -8236,16 +7018,70 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + 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` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +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 +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 + +#include <$ac_header> +_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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f 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 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 @@ -8253,288 +7089,678 @@ 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:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then : - $as_echo_n "(cached) " >&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 - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + 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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long) -See \`config.log' for more details." "$LINENO" 5; }; } - else - ac_cv_sizeof_long=0 - fi -fi + # 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +test_array [0] = 0 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } + ; + 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_lo=0 ac_mid=0 + while :; do + 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 () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 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_hi=$ac_mid; break +else + 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` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long +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 () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +test_array [0] = 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_hi=-1 ac_mid=-1 + while :; do + 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 () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +test_array [0] = 0 -SIZEOF_LONG=$ac_cv_sizeof_long + ; + 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_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&6 +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 + done else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 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 confdefs.h - <<_ACEOF >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` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - #include - +$ac_includes_default int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include +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_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f 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 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (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. */ +_ACEOF +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)); } +#include +#include int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +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 + ac_cv_sizeof_long=`cat conftest.val` else - ac_cv_c_bigendian=no + 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: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 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 confdefs.h - <<_ACEOF >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 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_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 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # 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 ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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 + # 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 +#include +#include int main () { -#ifndef _BIG_ENDIAN - not big endian - #endif +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_c_bigendian=yes else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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 - 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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; +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +else + 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 +/* 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; } int main () { -return use_ascii (foo) == use_ebcdic (foo); + _ascii (); _ebcdic (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; 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 +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 + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 confdefs.h - <<_ACEOF >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_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 -if ac_fn_c_try_run "$LINENO"; then : +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 ac_cv_c_bigendian=no else - ac_cv_c_bigendian=yes + 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 -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam 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:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +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) - ;; #( - *) - as_fn_error "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac +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 -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi +# 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 - { $as_echo "$as_me:${as_lineno-$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 + 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. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # 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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -8553,34 +7779,89 @@ main () return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : + 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 break +else + 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" - if ac_fn_c_try_compile "$LINENO"; then : +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 + 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 + 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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_sys_file_offset_bits=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -8599,11 +7880,40 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break +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 + 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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. */ #define _FILE_OFFSET_BITS 64 #include @@ -8623,33 +7933,60 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_sys_file_offset_bits=64; 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 - ac_cv_sys_file_offset_bits=unknown +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_sys_large_files=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -8668,11 +8005,40 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break +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 + 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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. */ #define _LARGE_FILES 1 #include @@ -8692,26 +8058,48 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_sys_large_files=1; 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 - ac_cv_sys_large_files=unknown +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -8722,42 +8110,44 @@ if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; th fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable vba feature" >&5 -$as_echo_n "checking whether to disable vba feature... " >&6; } +echo "$as_me:$LINENO: checking whether to disable vba feature" >&5 +echo $ECHO_N "checking whether to disable vba feature... $ECHO_C" >&6 if test -n "$enable_vba" && test "$enable_vba" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 ENABLE_VBA=NO else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_VBA=YES fi if test "$ENABLE_VBA" = "YES"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to package the vba compatibility api" >&5 -$as_echo_n "checking how to package the vba compatibility api... " >&6; } + 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 if test -n "$with_vba_package_format"; then if test "$with_vba_package_format" = "extn"; then VBA_EXTENSION=YES - { $as_echo "$as_me:${as_lineno-$LINENO}: result: uno extension" >&5 -$as_echo "uno extension" >&6; } - { $as_echo "$as_me:${as_lineno-$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;} + 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;} else if test "$with_vba_package_format" = "builtin"; then VBA_EXTENSION=NO - { $as_echo "$as_me:${as_lineno-$LINENO}: result: build into installset" >&5 -$as_echo "build into installset" >&6; } + echo "$as_me:$LINENO: result: build into installset" >&5 +echo "${ECHO_T}build into installset" >&6 else - as_fn_error "unknown packaging method" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: unknown packaging method" >&5 +echo "$as_me: error: unknown packaging method" >&2;} + { (exit 1); exit 1; }; } fi fi else VBA_EXTENSION=NO - { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to build into installset" >&5 -$as_echo "defaulting to build into installset" >&6; } + echo "$as_me:$LINENO: result: defaulting to build into installset" >&5 +echo "${ECHO_T}defaulting to build into installset" >&6 fi else VBA_EXTENSION=NO @@ -8767,74 +8157,379 @@ fi if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then - ac_fn_c_check_header_mongrel "$LINENO" "cups/cups.h" "ac_cv_header_cups_cups_h" "$ac_includes_default" -if test "x$ac_cv_header_cups_cups_h" = x""yes; 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 +if test "${ac_cv_header_cups_cups_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_cups_cups_h = yes; then + : else - as_fn_error "cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" "$LINENO" 5 + { { 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 fi if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 PAM=YES - ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default" -if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then : + 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 +if test "${ac_cv_header_security_pam_appl_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +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 +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 +#include +_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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_security_pam_appl_h = yes; then + : else - as_fn_error "pam_appl.h could not be found. libpam-dev or pam-devel missing?" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpam $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_pam_pam_start=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_pam_pam_start=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -8842,17 +8537,19 @@ _ACEOF LIBS="-lpam $LIBS" else - as_fn_error "libpam not found or functional" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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 @@ -8863,11 +8560,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:${as_lineno-$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 + if test "${ac_cv_func_which_getspnam_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8884,7 +8581,11 @@ ac_cv_func_which_getspnam_r=unknown # netdb.h is not declaring the function, and the compiler is thereby # assuming an implicit prototype. In which case, we're out of luck. # -cat confdefs.h - <<_ACEOF >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 @@ -8901,10 +8602,35 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_func_which_getspnam_r=no +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 # # FIVE ARGUMENTS @@ -8912,7 +8638,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_func_which_getspnam_r" = "unknown"; then -cat confdefs.h - <<_ACEOF >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 @@ -8931,10 +8661,35 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_func_which_getspnam_r=five +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 fi @@ -8944,7 +8699,11 @@ fi if test "$ac_cv_func_which_getspnam_r" = "unknown"; then -cat confdefs.h - <<_ACEOF >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 @@ -8963,10 +8722,35 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_func_which_getspnam_r=four +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 fi @@ -8977,28 +8761,30 @@ fi case "$ac_cv_func_which_getspnam_r" in five) - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "internal error" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: internal error" >&5 +echo "$as_me: error: internal error" >&2;} + { (exit 1); exit 1; }; } ;; esac @@ -9017,49 +8803,78 @@ fi if test "$_os" = "Linux"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_crypt_crypt=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_crypt_crypt=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -9067,12 +8882,14 @@ _ACEOF LIBS="-lcrypt $LIBS" else - as_fn_error "libcrypt not found or functional" "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -9091,24 +8908,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -9118,41 +8931,39 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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. @@ -9162,77 +8973,64 @@ 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 + 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_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$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 +done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +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 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + 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_status=$? + 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_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -{ $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >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. */ int @@ -9246,34 +9044,55 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +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_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 - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext +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 + 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. */ int @@ -9284,64 +9103,160 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +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_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 - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 +/* 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 -if ac_fn_cxx_try_compile "$LINENO"; then : - +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_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 - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + 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 +/* 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 -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -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_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$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 +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_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 - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi + 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 fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9351,8 +9266,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test "$GXX" = "yes"; then - { $as_echo "$as_me:${as_lineno-$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 }'` @@ -9366,26 +9281,33 @@ $as_echo_n "checking the GNU C++ compiler version... " >&6; } fi fi if test "$_gpp_majmin" -ge "401" ; then - as_fn_error "You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 + { { 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. */ extern "C" void abort (void); @@ -9410,24 +9332,39 @@ main (void) } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - as_fn_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." "$LINENO" 5 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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: 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 + 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: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam 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:${as_lineno-$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 " | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then @@ -9445,18 +9382,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 #include @@ -9474,16 +9411,16 @@ _ACEOF fi if test -z "$_mingw_lib_include_path"; then _mingw_lib_include_path="NO_LIB_INCLUDE" - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 _ACEOF @@ -9492,57 +9429,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` - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then - { $as_echo "$as_me:${as_lineno-$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/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 - { $as_echo "$as_me:${as_lineno-$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 - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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` @@ -9555,36 +9492,36 @@ fi if test "$_os" = "SunOS"; then if test "$CC" = "cc"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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' @@ -9592,7 +9529,11 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "$WITH_MINGWIN" = "yes"; then -cat confdefs.h - <<_ACEOF >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 @@ -9607,18 +9548,42 @@ _Unwind_SjLj_RaiseException() return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - exceptions_type="dwarf2" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +exceptions_type="dwarf2" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$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' @@ -9631,8 +9596,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:${as_lineno-$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 @@ -9646,15 +9611,15 @@ $as_echo_n "checking for patch 106327-06 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -9668,17 +9633,17 @@ $as_echo_n "checking for patch 106950-11 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -9692,15 +9657,15 @@ $as_echo_n "checking for patch 105591-09 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -9714,19 +9679,19 @@ $as_echo_n "checking for patch 107733-08 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -9753,100 +9718,134 @@ $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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 STLPORT4=$WITH_STLPORT if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - cat confdefs.h - <<_ACEOF >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. */ $STLPORT4/stlport/hash_map _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked." >&5 -$as_echo "checked." >&6; } +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 + 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 - as_fn_error "STLport headers not found." "$LINENO" 5 + 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;} + { (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:${as_lineno-$LINENO}: result: checked." >&5 -$as_echo "checked." >&6; } + echo "$as_me:$LINENO: result: checked." >&5 +echo "${ECHO_T}checked." >&6 else - as_fn_error "STLport headers not found." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "STLport libraries not found" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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_fn_error "STLport libraries not found" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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_fn_error "STLport libraries not found" "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -9862,11 +9861,15 @@ fi if test "$GCC" = "yes"; then - { $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >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. */ int @@ -9877,47 +9880,72 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CCACHE+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CCACHE in [\\/]* | ?:[\\/]*) @@ -9929,44 +9957,43 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$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' @@ -9974,7 +10001,11 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS --ccache-skip -O2" - cat confdefs.h - <<_ACEOF >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. */ int @@ -9985,20 +10016,44 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +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_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 - use_ccache=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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:${as_lineno-$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:${as_lineno-$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 @@ -10008,27 +10063,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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$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_fn_error "invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" "$LINENO" 5 + { { 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:${as_lineno-$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' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >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 using namespace __gnu_cxx; @@ -10041,42 +10102,72 @@ hash_map t; return 0; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +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_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 - ac_cv_cxx_have_ext_hash_map=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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_fn_error "Can't find hash_map. Try with --with-stlport" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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 confdefs.h - <<_ACEOF >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 _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "visibility push" >/dev/null 2>&1; then : + $EGREP "visibility push" >/dev/null 2>&1; then stlvisok=yes else stlvisok=no fi rm -f conftest* - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -10086,9 +10177,13 @@ $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:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include using namespace std; @@ -10101,19 +10196,43 @@ istringstream strm( "test" ); return 0; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - gccvisok=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gccvisok=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gccvisok" >&5 -$as_echo "$gccvisok" >&6; } +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + echo "$as_me:$LINENO: result: $gccvisok" >&5 +echo "${ECHO_T}$gccvisok" >&6 if test "$gccvisok" = "no"; then - { $as_echo "$as_me:${as_lineno-$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 @@ -10122,8 +10241,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:${as_lineno-$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 { @@ -10151,11 +10270,11 @@ _ACEOF fi rm -f visibility.s - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -10171,20 +10290,112 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: system" >&5 -$as_echo "system" >&6; } + echo "$as_me:$LINENO: result: system" >&5 +echo "${ECHO_T}system" >&6 ALLOC="SYS_ALLOC"; - for ac_func in malloc realloc calloc free -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : + + + + +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 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $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 + 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + 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 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 @@ -10192,48 +10403,79 @@ done fi if test "$with_alloc" = "tcmalloc"; then - { $as_echo "$as_me:${as_lineno-$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_fn_error "tcmalloc only available/usable on ix86" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltcmalloc $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_tcmalloc_malloc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_tcmalloc_malloc=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -10241,44 +10483,46 @@ _ACEOF LIBS="-ltcmalloc $LIBS" else - as_fn_error "tcmalloc not found or functional. Install the Google Profiling Tools" "$LINENO" 5 + { { 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 ALLOC="TCMALLOC"; fi if test "$with_alloc" = "internal" -o -z "$with_alloc"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -10305,10 +10549,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVAINTERPRETER+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVAINTERPRETER in [\\/]* | ?:[\\/]*) @@ -10320,35 +10564,36 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi JAVAINTERPRETER=$ac_cv_path_JAVAINTERPRETER + if test -n "$JAVAINTERPRETER"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "$_java_path not found set with_jdk_home" "$LINENO" 5 + { { 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 if test "$_os" = "WINNT"; then @@ -10358,26 +10603,28 @@ fi JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` elif test "$_os" = "Darwin"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "No valid check available. Please check the block for your desired java in configure.in" "$LINENO" 5 + { { 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/"` # if test -z "$KAFFE_VER"; then @@ -10397,13 +10644,15 @@ $as_echo_n "checking the installed JDK... " >&6; } # 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:${as_lineno-$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_fn_error "No valid check available. Please check the block for your desired java in configure.in" "$LINENO" 5 + { { 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 # # dnl BEA JDK specific tests @@ -10433,15 +10682,20 @@ $as_echo "checked (gcj)" >&6; } _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10500; then - as_fn_error "IBM JDK is too old, you need at least 1.5" "$LINENO" 5 + { { 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:${as_lineno-$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_fn_error "In order to successfully build OpenOffice.org using the IBM JDK, -you must use the \"--with-jdk-home\" configure option explicitly" "$LINENO" 5 + { { 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, +you must use the \"--with-jdk-home\" configure option explicitly" >&2;} + { (exit 1); exit 1; }; } fi JAVA_HOME=$with_jdk_home @@ -10453,10 +10707,12 @@ you must use the \"--with-jdk-home\" configure option explicitly" "$LINENO" 5 _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10500; then - as_fn_error "JDK is too old, you need at least 1.5" "$LINENO" 5 + { { 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:${as_lineno-$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]$,,"` @@ -10466,7 +10722,9 @@ $as_echo "checked (JDK $_jdk)" >&6; } fi fi else - as_fn_error "JAVA not found. You need at least jdk-1.5, or gcj-4" "$LINENO" 5 + { { 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 JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME @@ -10486,10 +10744,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVACOMPILER+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVACOMPILER in [\\/]* | ?:[\\/]*) @@ -10501,29 +10759,28 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi JAVACOMPILER=$ac_cv_path_JAVACOMPILER + if test -n "$JAVACOMPILER"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -10531,7 +10788,9 @@ fi fi fi if test -z "$JAVACOMPILER"; then - as_fn_error "$javacompiler not found set with_jdk_home" "$LINENO" 5 + { { 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 if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then @@ -10547,11 +10806,11 @@ fi fi if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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" @@ -10570,10 +10829,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVADOC+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVADOC in [\\/]* | ?:[\\/]*) @@ -10585,29 +10844,28 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi JAVADOC=$ac_cv_path_JAVADOC + if test -n "$JAVADOC"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -10620,10 +10878,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVADOC+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVADOC in [\\/]* | ?:[\\/]*) @@ -10635,33 +10893,34 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi JAVADOC=$ac_cv_path_JAVADOC + if test -n "$JAVADOC"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "$_javadoc_path not found set with_jdk_home" "$LINENO" 5 + { { 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 if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then @@ -10693,33 +10952,37 @@ class findhome } } _ACEOF - { $as_echo "$as_me:${as_lineno-$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\":${as_lineno-$LINENO}: \"$javac_cmd\""; } >&5 + { (eval echo "$as_me:$LINENO: \"$javac_cmd\"") >&5 (eval $javac_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } if test $? = 0 && test -f ./findhome.class ; then - { $as_echo "$as_me:${as_lineno-$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_fn_error "javac does not work - java projects will not build!" "$LINENO" 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;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "gij does not know its java.home - use --with-jdk-home" "$LINENO" 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;} + { (exit 1); exit 1; }; } fi else JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"` @@ -10741,10 +11004,10 @@ $as_echo "$JAVA_HOME" >&6; } JAVA_HOME=$(readlink $JAVACOMPILER) else # else warn - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -10766,12 +11029,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -10784,59 +11047,225 @@ fi AWTLIB= if test "$SOLAR_JAVA" != ""; then - { $as_echo "$as_me:${as_lineno-$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 CFLAGS="$CFLAGS -I$JAVA_HOME/include" LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" exec 6>/dev/null # no output - ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default" -if test "x$ac_cv_header_jni_h" = x""yes; then : + 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 +if test "${ac_cv_header_jni_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_jni_h = yes; then + : else - as_fn_error "jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgcjawt $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_gcjawt_JAWT_GetAWT=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_gcjawt_JAWT_GetAWT=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -10855,93 +11284,287 @@ fi LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH export LD_LIBRARY_PATH exec 6>/dev/null # no output - ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default" -if test "x$ac_cv_header_jni_h" = x""yes; then : + 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 +if test "${ac_cv_header_jni_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_jni_h = yes; then + : else - as_fn_error "jni.h could not be found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljawt $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_jawt_JAWT_GetAWT=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_jawt_JAWT_GetAWT=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmawt $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_mawt_JAWT_GetAWT=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mawt_JAWT_GetAWT=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -10954,24 +11577,24 @@ fi if test -z "$AWTLIB"; then AWTLIB=-ljawt fi - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -10981,10 +11604,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVAAOTCOMPILER+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $JAVAAOTCOMPILER in [\\/]* | ?:[\\/]*) @@ -10996,37 +11619,36 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi JAVAAOTCOMPILER=$ac_cv_path_JAVAAOTCOMPILER + if test -n "$JAVAAOTCOMPILER"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -11043,10 +11665,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DMAKE+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DMAKE in [\\/]* | ?:[\\/]*) @@ -11058,36 +11680,35 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -11096,48 +11717,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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_EPM+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $EPM in [\\/]* | ?:[\\/]*) @@ -11149,30 +11770,29 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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." @@ -11180,38 +11800,44 @@ fi BUILD_TYPE="$BUILD_TYPE EPM" else # Gentoo has some epm which is something different... - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - as_fn_error "no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_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)" "$LINENO" 5 + { { 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:${as_lineno-$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_fn_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)" "$LINENO" 5 + { { 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:${as_lineno-$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" @@ -11220,8 +11846,8 @@ $as_echo "too old. epm >= 3.7 is required." >&6; } fi # test which package format to use - { $as_echo "$as_me:${as_lineno-$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 @@ -11257,7 +11883,9 @@ $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_fn_error "unknown system" "$LINENO" 5 + { { 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 for i in $with_package_format; do @@ -11265,7 +11893,25 @@ $as_echo_n "checking which package format to use... " >&6; } aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi) ;; *) - as_fn_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 +deb - Debian software distribution +inst or tardist - IRIX software distribution +osx - MacOS X software distribution +pkg - Solaris software distribution +rpm - RedHat software distribution +setld - Tru64 (setld) software distribution +native - \"Native\" software distribution for the platform +portable - Portable software distribution +OOo additionally supports: +archive - .tar.gz or .zip +dmg - Mac OS X .dmg +installed - installation tree +msi - Windows .msi + " >&5 +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 @@ -11282,17 +11928,18 @@ archive - .tar.gz or .zip dmg - Mac OS X .dmg installed - installation tree msi - Windows .msi - " "$LINENO" 5 + " >&2;} + { (exit 1); exit 1; }; } ;; esac done PKGFORMAT="$with_package_format" fi - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -11307,20 +11954,22 @@ $as_echo_n "checking for rpm... " >&6; } fi done if test -z "$RPM" ; then - as_fn_error "not found" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: not found" >&5 +echo "$as_me: error: not found" >&2;} + { (exit 1); exit 1; }; } else RPM_PATH=`which $RPM` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPM_PATH" >&5 -$as_echo "$RPM_PATH" >&6; } + echo "$as_me:$LINENO: result: $RPM_PATH" >&5 +echo "${ECHO_T}$RPM_PATH" >&6 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DPKG+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DPKG in [\\/]* | ?:[\\/]*) @@ -11332,76 +11981,81 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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_fn_error "dpkg needed for deb creation. Install dpkg." "$LINENO" 5 + { { 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:${as_lineno-$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_fn_error "not installed. Please install Apples Dev Tools" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 fi else - as_fn_error "PackageMaker needed to build OSX packages and you are not on OSX..." "$LINENO" 5 + { { 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 if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \ 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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;} @@ -11412,10 +12066,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKGMK+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKGMK in [\\/]* | ?:[\\/]*) @@ -11427,32 +12081,33 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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_fn_error "pkgmk needed for Solaris pkg creation. Install it." "$LINENO" 5 + { { 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 @@ -11461,18 +12116,18 @@ fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 EPM=NO 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GPERF+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GPERF in [\\/]* | ?:[\\/]*) @@ -11484,74 +12139,82 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi GPERF=$ac_cv_path_GPERF + if test -n "$GPERF"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "gperf not found but needed. Install it." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - as_fn_error "too old, you need at least 3.0.0" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_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" "$LINENO" 5 + put it into external/unowinreg" >&5 +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;} + { (exit 1); exit 1; }; } fi if echo "$WITH_MINGWIN" | $EGREP -q "/"; then if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi @@ -11559,10 +12222,10 @@ $as_echo "$as_me: WARNING: not found, will be cross-built using mingw32" >&2;} 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MINGWCXX+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MINGWCXX"; then ac_cv_prog_MINGWCXX="$MINGWCXX" # Let the user override the test. @@ -11572,37 +12235,35 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done fi fi MINGWCXX=$ac_cv_prog_MINGWCXX if test -n "$MINGWCXX"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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. @@ -11612,53 +12273,47 @@ 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 + 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_MINGWCXX="$WITH_MINGWIN" - $as_echo "$as_me:${as_lineno-$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 +done + 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "specified MinGW32 C++ cross-compiler not found. Install it or correct name." "$LINENO" 5 + { { 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:${as_lineno-$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_fn_error "no" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: no" >&5 +echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } else - { $as_echo "$as_me:${as_lineno-$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 @@ -11666,10 +12321,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MINGWSTRIP+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MINGWSTRIP"; then ac_cv_prog_MINGWSTRIP="$MINGWSTRIP" # Let the user override the test. @@ -11679,37 +12334,35 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done fi fi MINGWSTRIP=$ac_cv_prog_MINGWSTRIP if test -n "$MINGWSTRIP"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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. @@ -11719,47 +12372,39 @@ 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 + 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_MINGWSTRIP="`echo $WITH_MINGWIN | $SED -e s/g++/strip/`" - $as_echo "$as_me:${as_lineno-$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 +done + 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "MinGW32 binutils needed. Install them." "$LINENO" 5 + { { 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' @@ -11777,37 +12422,66 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # do not make sense here (and 'd make the check fail) save_LIBS=$LIBS LIBS="" - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkernel32 $LIBS" -cat confdefs.h - <<_ACEOF >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. */ int main () { -return main (); +main (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_kernel32_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_kernel32_main=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -11817,37 +12491,66 @@ _ACEOF fi ac_cv_lib_kernel32=ac_cv_lib_kernel32_main - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ladvapi32 $LIBS" -cat confdefs.h - <<_ACEOF >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. */ int main () { -return main (); +main (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_advapi32_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_advapi32_main=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -11857,11 +12560,149 @@ _ACEOF fi ac_cv_lib_advapi32=ac_cv_lib_advapi32_main - ac_fn_cxx_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -if test "x$ac_cv_header_windows_h" = x""yes; then : + 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 +if test "${ac_cv_header_windows_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_windows_h = yes; then + : else - as_fn_error "windows.h missing" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: windows.h missing" >&5 +echo "$as_me: error: windows.h missing" >&2;} + { (exit 1); exit 1; }; } fi @@ -11880,8 +12721,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi BUILD_TYPE="$BUILD_TYPE ODK" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 BUILD_UNOWINREG=NO fi @@ -11892,28 +12733,28 @@ if test "$_os" = "Linux" -a -z "$with_system_stdlibs" -a -z "$with_system_libs"; if test -n "$checkforstdlibproblems"; then if test -f /etc/rpm/macros.prelink; then with_system_stdlibs=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5 -$as_echo "$as_me: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&2;} + { echo "$as_me:$LINENO: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5 +echo "$as_me: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&2;} echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn elif test "$GCC" = "yes" -a ! -e `$CC -print-file-name=libgcc_s.so.1`; then with_system_stdlibs=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5 -$as_echo "$as_me: WARNING: platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&2;} + { echo "$as_me:$LINENO: WARNING: platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5 +echo "$as_me: WARNING: platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&2;} echo "platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn fi fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SYSTEM_STDLIBS=NO fi @@ -11921,189 +12762,690 @@ fi if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then with_system_zlib=yes fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_ZLIB=YES - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = x""yes; then : + 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 +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_zlib_h = yes; then + : else - as_fn_error "zlib.h not found. install zlib" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_z_deflate=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_z_deflate=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "zlib not found or functional" "$LINENO" 5 + { { 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 + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}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 +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 + 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 +if test "${ac_cv_header_jpeglib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_ZLIB=NO - BUILD_TYPE="$BUILD_TYPE ZLIB" fi - - -{ $as_echo "$as_me:${as_lineno-$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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_JPEG=YES - ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" -if test "x$ac_cv_header_jpeglib_h" = x""yes; then : - +if test $ac_cv_header_jpeglib_h = yes; then + : else - as_fn_error "jpeg.h not found. install libjpeg" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_jpeg_jpeg_resync_to_restart=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_jpeg_jpeg_resync_to_restart=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_EXPAT=YES - ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" -if test "x$ac_cv_header_expat_h" = x""yes; then : + 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 +if test "${ac_cv_header_expat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_expat_h = yes; then + : else - as_fn_error "expat.h not found. install expat" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_expat_XML_ParserCreate=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_expat_XML_ParserCreate=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -12111,24 +13453,24 @@ _ACEOF LIBS="-lexpat $LIBS" else - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -12136,10 +13478,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -12151,30 +13493,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -12185,25 +13526,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -12224,12 +13565,14 @@ $as_echo "$LIBWPD_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -12237,12 +13580,12 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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. We didn't have # a system-cppunit before the first version using a proper cppunit @@ -12253,10 +13596,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -12268,30 +13611,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -12302,25 +13644,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:${as_lineno-$LINENO}: checking for cppunit >= 1.12.1 " >&5 -$as_echo_n "checking for cppunit >= 1.12.1 ... " >&6; } + echo "$as_me:$LINENO: checking for cppunit >= 1.12.1 " >&5 +echo $ECHO_N "checking for cppunit >= 1.12.1 ... $ECHO_C" >&6 if $PKG_CONFIG --exists "cppunit >= 1.12.1 " ; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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.1 "` - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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.1 "` - { $as_echo "$as_me:${as_lineno-$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="" @@ -12341,20 +13683,24 @@ $as_echo "$CPPUNIT_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error "Library requirements (cppunit >= 1.12.1 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Library requirements (cppunit >= 1.12.1 ) 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.1 ) 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:${as_lineno-$LINENO}: checking STL compatibility" >&5 -$as_echo_n "checking STL compatibility... " >&6; } + echo "$as_me:$LINENO: checking STL compatibility" >&5 +echo $ECHO_N "checking STL compatibility... $ECHO_C" >&6 if test "$WITH_STLPORT" != "no"; then - as_fn_error "to use system cppunit you need to use --without-stlport" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: to use system cppunit you need to use --without-stlport" >&5 +echo "$as_me: error: to use system cppunit you need to use --without-stlport" >&2;} + { (exit 1); exit 1; }; } else - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -12363,18 +13709,18 @@ fi if test "$test_freetype" = "yes"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -12386,30 +13732,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -12420,25 +13765,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -12459,7 +13804,9 @@ $as_echo "$FREETYPE_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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 fi @@ -12472,43 +13819,71 @@ if test "$test_freetype" = "yes"; then save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" LDFLAGS="$LDFLAGS $FREETYPE_LIBS" - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfreetype $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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" @@ -12541,26 +13916,26 @@ if test -n "$with_system_libxml" -o -n "$with_system_libs" && \ fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $LIBXSLT_CFLAGS" >&5 -$as_echo "$LIBXSLT_CFLAGS" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -12570,10 +13945,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -12585,30 +13960,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -12619,25 +13993,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -12658,7 +14032,9 @@ $as_echo "$LIBXSLT_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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 fi @@ -12666,10 +14042,10 @@ $as_echo "$LIBXSLT_LIBS" >&6; } # 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XSLTPROC+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XSLTPROC in [\\/]* | ?:[\\/]*) @@ -12681,36 +14057,37 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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_fn_error "xsltproc is required" "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -12719,25 +14096,25 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $LIBXML_CFLAGS" >&5 -$as_echo "$LIBXML_CFLAGS" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -12747,10 +14124,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -12762,30 +14139,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -12796,25 +14172,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -12835,15 +14211,17 @@ $as_echo "$LIBXML_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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 fi BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" else - { $as_echo "$as_me:${as_lineno-$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 @@ -12851,27 +14229,27 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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. @@ -12883,20 +14261,23 @@ sys.exit(sys.hexversion < minverhex)" ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + (exit $ac_status); }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - as_fn_error "too old" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: too old" >&5 +echo "$as_me: error: too old" >&2;} + { (exit 1); exit 1; }; } fi + am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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 @@ -12912,23 +14293,24 @@ sys.exit(sys.hexversion < minverhex)" ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then : + (exit $ac_status); }; then break fi + done fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) @@ -12940,48 +14322,49 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi PYTHON=$ac_cv_path_PYTHON + if test -n "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "no suitable Python interpreter found" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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:${as_lineno-$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 @@ -12992,30 +14375,30 @@ $as_echo "$am_cv_python_version" >&6; } - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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:${as_lineno-$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 @@ -13023,16 +14406,16 @@ $as_echo "$am_cv_python_pythondir" >&6; } pkgpythondir=\${pythondir}/$PACKAGE - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + 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:${as_lineno-$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 @@ -13054,11 +14437,149 @@ if test "$with_system_python" = "yes" ; then SYSTEM_PYTHON=YES save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" - ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" -if test "x$ac_cv_header_Python_h" = x""yes; then : + 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 +if test "${ac_cv_header_Python_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 + +fi +if test $ac_cv_header_Python_h = yes; then + : else - as_fn_error "Python headers not found" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Python headers not found" >&5 +echo "$as_me: error: Python headers not found" >&2;} + { (exit 1); exit 1; }; } fi @@ -13066,8 +14587,8 @@ fi else SYSTEM_PYTHON=NO BUILD_TYPE="$BUILD_TYPE PYTHON" - { $as_echo "$as_me:${as_lineno-$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=""; @@ -13076,10 +14597,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BZIP2+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $BZIP2 in [\\/]* | ?:[\\/]*) @@ -13091,31 +14612,32 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi BZIP2=$ac_cv_path_BZIP2 + if test -n "$BZIP2"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "the internal Python module has a .tar.bz2. You need bzip2" "$LINENO" 5 + { { 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 fi @@ -13125,27 +14647,121 @@ fi HOME=`echo $HOME | sed 's:\\\\:/:g'` -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } - ac_fn_c_check_header_compile "$LINENO" "db.h" "ac_cv_header_db_h" " + 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 + 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. */ + + + +#include +_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_header_db_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -" -if test "x$ac_cv_header_db_h" = x""yes; then : +ac_cv_header_db_h=no +fi +rm -f 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 DB_INCLUDES=/usr/include else CFLAGS=-I/usr/include/db4 - ac_fn_c_check_header_compile "$LINENO" "db4/db.h" "ac_cv_header_db4_db_h" "+ -" -if test "x$ac_cv_header_db4_db_h" = x""yes; then : + 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 + 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. */ ++ + +#include +_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_header_db4_db_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_db4_db_h=no +fi +rm -f 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 DB_INCLUDES=/usr/include/db4 else - as_fn_error "no. install the db4 libraries" "$LINENO" 5 + { { 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 @@ -13153,15 +14769,20 @@ fi fi - { $as_echo "$as_me:${as_lineno-$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 : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } + 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 + { { 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 confdefs.h - <<_ACEOF >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 @@ -13172,47 +14793,91 @@ int main(int argc, char **argv) { } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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: yes" >&5 +echo "${ECHO_T}yes" >&6 else - as_fn_error "no. you need at least db 4.1" "$LINENO" 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 ) +{ { 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 -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldb $LIBS" -cat confdefs.h - <<_ACEOF >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. */ int main () { -return main (); +main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_db_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_db_main=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -13220,14 +14885,16 @@ _ACEOF LIBS="-ldb $LIBS" else - as_fn_error "db not installed or functional" "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -13236,52 +14903,58 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_lucene_core_2_3_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_lucene_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "lucene-core.jar replacement not found" "$LINENO" 5 + { { 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 @@ -13290,71 +14963,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "lucene-core.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "lucene-analyzers.jar replacement not found." "$LINENO" 5 + { { 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 @@ -13363,34 +15044,36 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "lucene-analyzers.jar not found." "$LINENO" 5 + { { 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 else - { $as_echo "$as_me:${as_lineno-$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 @@ -13398,42 +15081,44 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MYSQLCONFIG+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MYSQLCONFIG in [\\/]* | ?:[\\/]*) @@ -13445,136 +15130,308 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi MYSQLCONFIG=$ac_cv_path_MYSQLCONFIG + if test -n "$MYSQLCONFIG"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - as_fn_error "too old, use 5.0.x or 5.1.x" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "not found. Please specify proper path in --with-libmysql-path." "$LINENO" 5 + { { 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_fn_error "not given. Please specify either --with-system-mysql or --with-libmysql-path" "$LINENO" 5 + { { 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 - - - -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 - -# FIXME! -# who thought this too-generic cppconn dir was a good idea? -{ $as_echo "$as_me:${as_lineno-$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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_MYSQL_CPPCONN=YES - 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 - - ac_fn_cxx_check_header_mongrel "$LINENO" "mysql_driver.h" "ac_cv_header_mysql_driver_h" "$ac_includes_default" -if test "x$ac_cv_header_mysql_driver_h" = x""yes; then : - + + + +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 + +# 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 +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 + SYSTEM_MYSQL_CPPCONN=YES + 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 + 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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 + +fi +if test $ac_cv_header_mysql_driver_h = yes; then + : else - as_fn_error "mysql_driver.h not found. install MySQL C++ Connectivity" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmysqlcppconn $LIBS" -cat confdefs.h - <<_ACEOF >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. */ int main () { -return main (); +main (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_mysqlcppconn_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlcppconn_main=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -13582,18 +15439,25 @@ _ACEOF LIBS="-lmysqlcppconn $LIBS" else - as_fn_error "MySQL C++ Connectivity lib not found or functional" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: checking version" >&5 -$as_echo_n "checking version... " >&6; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } + echo "$as_me:$LINENO: checking version" >&5 +echo $ECHO_N "checking 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 confdefs.h - <<_ACEOF >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 @@ -13610,17 +15474,32 @@ int main(int argc, char **argv) { } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } +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 - as_fn_error "not suitable, we need >= 1.0.6" "$LINENO" 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 ) +{ { 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 -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam 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' @@ -13628,15 +15507,17 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 + { { 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" SYSTEM_MYSQL_CPPCONN=NO @@ -13650,42 +15531,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "hsqldb.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: checking whether hsqldb is >= 1.8.0.9" >&5 -$as_echo_n "checking whether hsqldb is >= 1.8.0.9... " >&6; } + echo "$as_me:$LINENO: checking whether hsqldb is >= 1.8.0.9" >&5 +echo $ECHO_N "checking whether hsqldb is >= 1.8.0.9... $ECHO_C" >&6 export HSQLDB_JAR if $PERL -e 'use Archive::Zip; my $file = "$ENV{'HSQLDB_JAR'}"; @@ -13708,57 +15591,61 @@ $as_echo_n "checking whether hsqldb is >= 1.8.0.9... " >&6; } } else { exit 1; }'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - as_fn_error "no, hsqldb >= 1.8.0.9 is needed" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: no, hsqldb >= 1.8.0.9 is needed" >&5 +echo "$as_me: error: no, hsqldb >= 1.8.0.9 is needed" >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "bsh.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -13766,70 +15653,78 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_saxon9_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_saxon_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_saxon9_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "saxon.jar replacement not found" "$LINENO" 5 + { { 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 @@ -13842,62 +15737,66 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$SAXON_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "saxon.jar replacement not found." "$LINENO" 5 + { { 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:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "serializer.jar not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: serializer.jar not found." >&5 +echo "$as_me: error: serializer.jar not found." >&2;} + { (exit 1); exit 1; }; } fi fi - { $as_echo "$as_me:${as_lineno-$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; @@ -13938,36 +15837,40 @@ _ACEOF _ACEOF javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2" - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$javac_cmd\""; } >&5 + { (eval echo "$as_me:$LINENO: \"$javac_cmd\"") >&5 (eval $javac_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } + 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\":${as_lineno-$LINENO}: \"$java_cmd\""; } >&5 + { (eval echo "$as_me:$LINENO: \"$java_cmd\"") >&5 (eval $java_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } if test $? = 0; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error "Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb" "$LINENO" 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;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${as_lineno-$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_fn_error "saxontest could not be compiled, non-functional saxon jar" "$LINENO" 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;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${as_lineno-$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 @@ -13981,20 +15884,20 @@ fi if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then with_system_curl=yes fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CURLCONFIG+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CURLCONFIG in [\\/]* | ?:[\\/]*) @@ -14006,49 +15909,52 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi CURLCONFIG=$ac_cv_path_CURLCONFIG + if test -n "$CURLCONFIG"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "install curl to run this script" "$LINENO" 5 + { { 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:${as_lineno-$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_fn_error "no, you need at least curl 7.13,1" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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 @@ -14056,49 +15962,467 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 - ac_fn_cxx_check_header_mongrel "$LINENO" "boost/shared_ptr.hpp" "ac_cv_header_boost_shared_ptr_hpp" "$ac_includes_default" -if test "x$ac_cv_header_boost_shared_ptr_hpp" = x""yes; then : + 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 +if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +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 +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 +#include +_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_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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 + +fi +if test $ac_cv_header_boost_shared_ptr_hpp = 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;} + { (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 +if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +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 +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 +#include +_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_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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +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 +if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_boost_spirit_include_classic_core_hpp = yes; then + : else - as_fn_error "boost/shared_ptr.hpp not found. install boost" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.38" >&5 +echo "$as_me: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.38" >&2;} + { (exit 1); exit 1; }; } fi - ac_fn_cxx_check_header_mongrel "$LINENO" "boost/spirit/include/classic_core.hpp" "ac_cv_header_boost_spirit_include_classic_core_hpp" "$ac_includes_default" -if test "x$ac_cv_header_boost_spirit_include_classic_core_hpp" = x""yes; then : + 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 +if test "${ac_cv_header_boost_function_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 - as_fn_error "boost/spirit/include/classic_core.hpp not found. install boost >= 1.38" "$LINENO" 5 + ac_cpp_err=yes fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + 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 - ac_fn_cxx_check_header_mongrel "$LINENO" "boost/function.hpp" "ac_cv_header_boost_function_hpp" "$ac_includes_default" -if test "x$ac_cv_header_boost_function_hpp" = x""yes; then : +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_boost_function_hpp = yes; then + : else - as_fn_error "boost/function.hpp not found. install boost" "$LINENO" 5 + { { 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 save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -fno-exceptions" - { $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include @@ -14110,18 +16434,44 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +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_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 - ac_cv_cxx_boost_no_exceptons_broken=yes + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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_fn_error "no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -14131,31 +16481,169 @@ 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:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } - BUILD_TYPE="$BUILD_TYPE BOOST" - SYSTEM_BOOST=NO + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}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 +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 + SYSTEM_VIGRA=YES + 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 + 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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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:${as_lineno-$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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_VIGRA=YES - 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 - - ac_fn_cxx_check_header_mongrel "$LINENO" "vigra/copyimage.hxx" "ac_cv_header_vigra_copyimage_hxx" "$ac_includes_default" -if test "x$ac_cv_header_vigra_copyimage_hxx" = x""yes; then : - +fi +if test $ac_cv_header_vigra_copyimage_hxx = yes; then + : else - as_fn_error "vigra/copyimage.hxx not found. install vigra" "$LINENO" 5 + { { 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 @@ -14166,150 +16654,457 @@ 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_ODBC_HEADERS=YES - ac_fn_c_check_header_mongrel "$LINENO" "sqlext.h" "ac_cv_header_sqlext_h" "$ac_includes_default" -if test "x$ac_cv_header_sqlext_h" = x""yes; then : + 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 +if test "${ac_cv_header_sqlext_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_sqlext_h = yes; then + : else - as_fn_error "odbc not found. install odbc" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default" -if test "x$ac_cv_header_ldap_h" = x""yes; then : + +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 +else + # Is the header compilable? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +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 +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 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LDAP_H 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - as_fn_error "ldap.h not found. install openldap libs" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_ldap_ldap_simple_bind_s=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ldap_ldap_simple_bind_s=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -14317,48 +17112,79 @@ _ACEOF LIBS="-lldap $LIBS" else - as_fn_error "openldap lib not found or functional" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_ldap_ldap_set_option=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ldap_ldap_set_option=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -14366,12 +17192,14 @@ _ACEOF LIBS="-lldap $LIBS" else - as_fn_error "openldap lib not found or functional" "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -14380,16 +17208,16 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -14404,8 +17232,8 @@ $as_echo_n "checking which Mozilla flavour to use... " >&6; } MOZ_FLAVOUR=libxul fi tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst();'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tmp" >&5 -$as_echo "$tmp" >&6; } + echo "$as_me:$LINENO: result: $tmp" >&5 +echo "${ECHO_T}$tmp" >&6 succeeded=no @@ -14413,10 +17241,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -14428,30 +17256,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -14462,25 +17289,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -14511,10 +17338,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -14526,30 +17353,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -14560,25 +17386,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -14599,7 +17425,9 @@ $as_echo "$MOZ_NSS_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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 else @@ -14614,10 +17442,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -14629,30 +17457,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -14663,25 +17490,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -14702,7 +17529,9 @@ $as_echo "$MOZ_NSPR_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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 NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`" @@ -14714,10 +17543,10 @@ $as_echo "$MOZ_NSPR_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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -14729,30 +17558,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -14763,25 +17591,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -14802,7 +17630,9 @@ $as_echo "$MOZ_NSPR_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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 fi @@ -14814,10 +17644,10 @@ $as_echo "$MOZ_NSPR_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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -14829,30 +17659,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -14863,25 +17692,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -14916,10 +17745,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -14931,30 +17760,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -14965,25 +17793,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -15004,7 +17832,9 @@ $as_echo "$MOZILLAXPCOM_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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 MOZ_INC=`$PKG_CONFIG --variable=includedir libxul` @@ -15022,43 +17852,72 @@ $as_echo "$MOZILLAXPCOM_LIBS" >&6; } save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS" LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS" - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnss3 $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -15066,9 +17925,13 @@ _ACEOF LIBS="-lnss3 $LIBS" else - as_fn_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)" "$LINENO" 5 +Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&5 +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; }; } fi LDFLAGS="$save_LDFLAGS" @@ -15077,16 +17940,20 @@ fi MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_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 +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." "$LINENO" 5 +Please recompile $tmp with --enable-ldap or use --with-openldap." >&2;} + { (exit 1); exit 1; }; } fi fi @@ -15097,48 +17964,48 @@ Please recompile $tmp with --enable-ldap or use --with-openldap." "$LINENO" 5 fi elif test "$enable_mozilla" = "no"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -15155,55 +18022,63 @@ else enable_build_mozilla= fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_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" "$LINENO" 5 +from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32" >&5 +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_fn_error "Mozilla build tooling incomplete!" "$LINENO" 5 +{ { 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:${as_lineno-$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_fn_error "Mozilla build tooling incomplete!" "$LINENO" 5 +{ { 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:${as_lineno-$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:${as_lineno-$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 @@ -15211,11 +18086,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_fn_error "Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -15225,59 +18102,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "Mozilla/SeaMonkey source archive not found. -Use \"./fetch_tarballs.sh ooo.lst\" to download." "$LINENO" 5 + { { 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. +Use \"./fetch_tarballs.sh ooo.lst\" to download." >&2;} + { (exit 1); exit 1; }; } fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:${as_lineno-$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_fn_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/)" "$LINENO" 5 + { { 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 +(from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)" >&2;} + { (exit 1); exit 1; }; } else - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -15289,30 +18172,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -15323,25 +18205,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -15360,10 +18242,12 @@ $as_echo "$MOZGTK2_LIBS" >&6; } fi if test $succeeded = yes; then - { $as_echo "$as_me:${as_lineno-$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_fn_error "Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" "$LINENO" 5 + { { 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 else @@ -15373,10 +18257,10 @@ $as_echo "$as_me: OK - can build mozilla" >&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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -15388,30 +18272,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -15422,25 +18305,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -15465,7 +18348,9 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZIDL"; then - as_fn_error "libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." "$LINENO" 5 + { { 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 else @@ -15477,10 +18362,10 @@ $as_echo "$MOZLIBREQ_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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -15492,30 +18377,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -15526,25 +18410,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -15569,7 +18453,9 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZGTK"; then - as_fn_error "GTK2 is needed to build mozilla." "$LINENO" 5 + { { 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 succeeded=no @@ -15577,10 +18463,10 @@ $as_echo "$MOZLIBREQ_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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -15592,30 +18478,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -15626,25 +18511,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -15669,7 +18554,9 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZIDL"; then - as_fn_error "libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." "$LINENO" 5 + { { 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 @@ -15678,10 +18565,10 @@ $as_echo "$MOZLIBREQ_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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -15693,30 +18580,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -15727,25 +18613,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -15770,7 +18656,9 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZGTK"; then - as_fn_error "gtk 1.2 is needed when not using GTK2 to build mozilla." "$LINENO" 5 + { { 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 succeeded=no @@ -15778,10 +18666,10 @@ $as_echo "$MOZLIBREQ_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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -15793,30 +18681,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -15827,25 +18714,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -15870,7 +18757,9 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZIDL"; then - as_fn_error "libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." "$LINENO" 5 + { { 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 fi @@ -15890,61 +18779,225 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_SANE_HEADER=YES - ac_fn_c_check_header_mongrel "$LINENO" "sane/sane.h" "ac_cv_header_sane_sane_h" "$ac_includes_default" -if test "x$ac_cv_header_sane_sane_h" = x""yes; then : + 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 +if test "${ac_cv_header_sane_sane_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_sane_sane_h = yes; then + : else - as_fn_error "sane not found. install sane" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for unicode/rbbi.h" >&5 -$as_echo_n "checking for unicode/rbbi.h... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ unicode/rbbi.h _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked." >&5 -$as_echo "checked." >&6; } +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 + 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 - as_fn_error "icu headers not found." "$LINENO" 5 + 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;} + { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_ext # 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SYSTEM_GENBRK+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SYSTEM_GENBRK in [\\/]* | ?:[\\/]*) @@ -15957,38 +19010,39 @@ for as_dir in $as_dummy 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi SYSTEM_GENBRK=$ac_cv_path_SYSTEM_GENBRK + if test -n "$SYSTEM_GENBRK"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "\\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SYSTEM_GENCCODE+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SYSTEM_GENCCODE in [\\/]* | ?:[\\/]*) @@ -16001,38 +19055,39 @@ for as_dir in $as_dummy 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi SYSTEM_GENCCODE=$ac_cv_path_SYSTEM_GENCCODE + if test -n "$SYSTEM_GENCCODE"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "\\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SYSTEM_GENCMN+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SYSTEM_GENCMN in [\\/]* | ?:[\\/]*) @@ -16045,41 +19100,47 @@ for as_dir in $as_dummy 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi SYSTEM_GENCMN=$ac_cv_path_SYSTEM_GENCMN + if test -n "$SYSTEM_GENCMN"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "\\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" "$LINENO" 5 + { { 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU version" >&5 -$as_echo_n "checking ICU version... " >&6; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 @@ -16092,16 +19153,31 @@ int main(int argc, char **argv) { } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } +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 - as_fn_error "not suitable, only >= 4.0 supported currently" "$LINENO" 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 ) +{ { 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 core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +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' @@ -16109,8 +19185,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:${as_lineno-$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 @@ -16120,18 +19196,18 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -16139,10 +19215,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -16154,30 +19230,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -16188,25 +19263,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -16227,18 +19302,20 @@ $as_echo "$GRAPHITE_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -16248,13 +19325,15 @@ fi if test "$_os" = "Darwin"; then if test "x$with_x" = "xyes"; then - as_fn_error "X11 build is no longer supported on MacOSX, please use the native aqua build" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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 @@ -16262,7 +19341,9 @@ $as_echo "yes" >&6; } ENABLE_CUPS="" else - as_fn_error "No AppKit.framewrok found" "$LINENO" 5 + { { 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 fi @@ -16274,47 +19355,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:${as_lineno-$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. -if test "${with_x+set}" = set; then : - withval=$with_x; -fi +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + 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_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( - *,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 @@ -16322,41 +19400,37 @@ _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. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include -/usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 -/usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include -/usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 -/usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 @@ -16378,14 +19452,38 @@ ac_x_header_dirs=' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. - cat confdefs.h - <<_ACEOF >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 _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +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 + 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 + 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 ac_x_includes=$ac_dir @@ -16402,7 +19500,11 @@ if test "$ac_x_libraries" = no; then # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" - cat confdefs.h - <<_ACEOF >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 int @@ -16413,64 +19515,86 @@ XrmInitialize () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` + 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` 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 -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +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:${as_lineno-$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:${as_lineno-$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 # Not all programs may use this symbol, but it does not hurt to define it. -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define X_DISPLAY_MISSING 1 +_ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -16483,12 +19607,16 @@ 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:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -16499,13 +19627,48 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -16516,21 +19679,48 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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:${as_lineno-$LINENO}: result: neither works" >&5 -$as_echo "neither works" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_R_space=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_c_werror_flag=$ac_xsave_c_werror_flag - LIBS=$ac_xsave_LIBS +rm -f conftest.err conftest.$ac_objext \ + 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 # Check for system-dependent libraries X programs must link with. @@ -16544,112 +19734,196 @@ rm -f core conftest.err conftest.$ac_objext \ # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : - +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&6 + 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 +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_dnet_dnet_ntoa=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dnet_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_dnet_stub_dnet_ntoa=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dnet_stub_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, @@ -16660,90 +19934,232 @@ rm -f core 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. - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : + 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 + 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. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* 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) +choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != 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 + 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_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_gethostbyname=no fi +rm -f conftest.err conftest.$ac_objext \ + 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 if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_nsl_gethostbyname=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nsl_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_bsd_gethostbyname=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_bsd_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -16757,147 +20173,489 @@ 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. - ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = x""yes; then : + 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 + 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. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* 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) +choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != 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 + 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_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_connect=no +fi +rm -f conftest.err conftest.$ac_objext \ + 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 if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_socket_connect=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_connect=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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. - ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = x""yes; then : + 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 + 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. */ +/* Define remove to an innocuous variant, in case declares remove. + For example, HP-UX 11i declares gettimeofday. */ +#define remove innocuous_remove + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef remove + +/* 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) +choke me +#else +char (*f) () = remove; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != 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 + 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_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_remove=no fi +rm -f conftest.err conftest.$ac_objext \ + 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 if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_posix_remove=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_posix_remove=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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. - ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = x""yes; then : + 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 + 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. */ +/* Define shmat to an innocuous variant, in case declares shmat. + For example, HP-UX 11i declares gettimeofday. */ +#define shmat innocuous_shmat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shmat + +/* 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) +choke me +#else +char (*f) () = shmat; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != 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 + 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_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_shmat=no +fi +rm -f conftest.err conftest.$ac_objext \ + 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 if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_ipc_shmat=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ipc_shmat=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -16913,43 +20671,71 @@ 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_ICE_IceConnectionNumber=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ICE_IceConnectionNumber=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -16966,92 +20752,154 @@ fi x_libraries="default_x_libraries" fi if test -z "$x_libraries"; then - as_fn_error "No X libraries found" "$LINENO" 5 # Exit + { { 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_fn_error "No X includes found" "$LINENO" 5 # Exit + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_X11_XOpenDisplay=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_X11_XOpenDisplay=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "X Development libraries not found" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXau $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_Xau_XauDisposeAuth=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xau_XauDisposeAuth=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -17083,76 +20931,205 @@ fi if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - for ac_header in X11/Composite.h -do : - ac_fn_c_check_header_compile "$LINENO" "X11/Composite.h" "ac_cv_header_X11_Composite_h" "#include -" -if test "x$ac_cv_header_X11_Composite_h" = x""yes; then : + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +#include <$ac_header> +_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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f 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 cat >>confdefs.h <<_ACEOF -#define HAVE_X11_COMPOSITE_H 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - as_fn_error "Xt include headers not found" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - for ac_header in X11/Xaw/Label.h -do : - ac_fn_c_check_header_compile "$LINENO" "X11/Xaw/Label.h" "ac_cv_header_X11_Xaw_Label_h" "#include -" -if test "x$ac_cv_header_X11_Xaw_Label_h" = x""yes; then : + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}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 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +#include <$ac_header> +_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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f 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 cat >>confdefs.h <<_ACEOF -#define HAVE_X11_XAW_LABEL_H 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - as_fn_error "Xaw include headers not found" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXaw $LIBS" -cat confdefs.h - <<_ACEOF >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. */ int main () { -return main (); +main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_Xaw_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xaw_main=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -17160,7 +21137,9 @@ _ACEOF LIBS="-lXaw $LIBS" else - as_fn_error "Xaw library not found or functional" "$LINENO" 5 + { { 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 fi @@ -17170,23 +21149,166 @@ fi if test "$ENABLE_FONTCONFIG" = "TRUE" ; then - ac_fn_c_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default" -if test "x$ac_cv_header_fontconfig_fontconfig_h" = x""yes; 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 +if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_fontconfig_fontconfig_h = yes; then + : else - as_fn_error "fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" "$LINENO" 5 + { { 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:${as_lineno-$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 : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } + 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 + { { 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 confdefs.h - <<_ACEOF >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 @@ -17197,89 +21319,271 @@ int main(int argc, char **argv) { } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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: yes" >&5 +echo "${ECHO_T}yes" >&6 else - as_fn_error "no, fontconfig >= 2.2.0 needed" "$LINENO" 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 ) +{ { 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 -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_XRENDER_HEADERS=YES - ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrender.h" "ac_cv_header_X11_extensions_Xrender_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_extensions_Xrender_h" = x""yes; then : + 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 +if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +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 +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 +#include +_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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_X11_extensions_Xrender_h = yes; then + : else - as_fn_error "Xrender not found. install X" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrender $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_Xrender_XRenderQueryVersion=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xrender_XRenderQueryVersion=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -17287,20 +21591,22 @@ _ACEOF LIBS="-lXrender $LIBS" else - as_fn_error "libXrender not found or functional" "$LINENO" 5 + { { 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 fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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" @@ -17309,10 +21615,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -17324,30 +21630,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -17358,25 +21663,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -17388,65 +21693,232 @@ $as_echo "$XRANDR_LIBS" >&6; } - 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 + 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 + 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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +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 +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 +#include +_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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 - if test $succeeded = yes; then - ENABLE_RANDR="TRUE" +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 - ENABLE_RANDR="" + ac_cpp_err= fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "$ENABLE_RANDR" != "TRUE"; then - ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then : + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then + : else - as_fn_error "X11/extensions/Xrandr.h could not be found. X11 dev missing?" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrandr $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_Xrandr_XRRQueryExtension=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xrandr_XRRQueryExtension=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -17454,51 +21926,53 @@ _ACEOF LIBS="-lXrandr $LIBS" else - as_fn_error "libXrandr not found or functional" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -17510,30 +21984,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -17544,25 +22017,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:${as_lineno-$LINENO}: checking for neon >= 0.24.0" >&5 -$as_echo_n "checking for neon >= 0.24.0... " >&6; } + echo "$as_me:$LINENO: checking for neon >= 0.24.0" >&5 +echo $ECHO_N "checking for neon >= 0.24.0... $ECHO_C" >&6 if $PKG_CONFIG --exists "neon >= 0.24.0" ; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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.24.0"` - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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.24.0"` - { $as_echo "$as_me:${as_lineno-$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="" @@ -17583,15 +22056,17 @@ $as_echo "$NEON_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error "you need neon >= 0.24.x for system-neon" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: you need neon >= 0.24.x for system-neon" >&5 +echo "$as_me: error: you need neon >= 0.24.x for system-neon" >&2;} + { (exit 1); exit 1; }; } fi NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`" NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" SYSTEM_NEON=YES else - { $as_echo "$as_me:${as_lineno-$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= @@ -17606,12 +22081,12 @@ fi if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then with_system_openssl=yes fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -17624,10 +22099,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -17639,30 +22114,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -17673,25 +22147,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -17712,14 +22186,16 @@ $as_echo "$OPENSSL_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -17727,33 +22203,33 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -17765,30 +22241,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -17799,25 +22274,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -17838,11 +22313,13 @@ $as_echo "$AGG_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -17854,21 +22331,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:${as_lineno-$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:${as_lineno-$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_fn_error "only agg 2.3 and 2.4 are supported" "$LINENO" 5 + { { 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:${as_lineno-$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" @@ -17877,12 +22356,12 @@ $as_echo "internal" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -17890,10 +22369,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -17905,30 +22384,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -17939,25 +22417,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -17978,26 +22456,28 @@ $as_echo "$REDLAND_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$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 -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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' @@ -18009,10 +22489,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -18024,30 +22504,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -18058,25 +22537,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -18101,289 +22580,1092 @@ $as_echo "$HUNSPELL_LIBS" >&6; } fi if test "$HUNSPELL_PC" != "TRUE"; then - ac_fn_cxx_check_header_mongrel "$LINENO" "hunspell.hxx" "ac_cv_header_hunspell_hxx" "$ac_includes_default" -if test "x$ac_cv_header_hunspell_hxx" = x""yes; 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 +if test "${ac_cv_header_hunspell_hxx+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 + +fi +if test $ac_cv_header_hunspell_hxx = 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 +if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 - ac_fn_cxx_check_header_mongrel "$LINENO" "hunspell/hunspell.hxx" "ac_cv_header_hunspell_hunspell_hxx" "$ac_includes_default" -if test "x$ac_cv_header_hunspell_hunspell_hxx" = x""yes; then : +fi +if test $ac_cv_header_hunspell_hunspell_hxx = yes; then HUNSPELL_CFLAGS=-I/usr/include/hunspell else - as_fn_error "hunspell headers not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: hunspell headers not found." >&5 +echo "$as_me: error: hunspell headers not found." >&2;} + { (exit 1); exit 1; }; } +fi + + + +fi + + + +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lhunspell $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +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 + 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 + ac_cv_lib_hunspell_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_hunspell_main=no +fi +rm -f conftest.err conftest.$ac_objext \ + 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 + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBHUNSPELL 1 +_ACEOF + + LIBS="-lhunspell $LIBS" + +else + { { echo "$as_me:$LINENO: error: hunspell library not found." >&5 +echo "$as_me: error: hunspell library not found." >&2;} + { (exit 1); exit 1; }; } +fi + + HUNSPELL_LIBS=-lhunspell + 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 + +else + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 + SYSTEM_HUNSPELL=NO + BUILD_TYPE="$BUILD_TYPE HUNSPELL" +fi + + + + +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 + 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 + 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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 - - +fi +if test $ac_cv_header_hyphen_h = yes; then + : +else + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhunspell $LIBS" -cat confdefs.h - <<_ACEOF >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 int main () { -return main (); +static struct _HyphenDict ac_aggr; +if (ac_aggr.cset) +return 0; ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_hunspell_main=yes +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_member_struct__HyphenDict_cset=yes else - ac_cv_lib_hunspell_main=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$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 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - LIBS="-lhunspell $LIBS" +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 () +{ +static struct _HyphenDict ac_aggr; +if (sizeof ac_aggr.cset) +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_member_struct__HyphenDict_cset=yes else - as_fn_error "hunspell library not found." "$LINENO" 5 -fi - - HUNSPELL_LIBS=-lhunspell - 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 "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_HUNSPELL=NO - BUILD_TYPE="$BUILD_TYPE HUNSPELL" +ac_cv_member_struct__HyphenDict_cset=no fi - - - - -{ $as_echo "$as_me:${as_lineno-$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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_HYPH=YES - ac_fn_c_check_header_mongrel "$LINENO" "hyphen.h" "ac_cv_header_hyphen_h" "$ac_includes_default" -if test "x$ac_cv_header_hyphen_h" = x""yes; then : - -else - as_fn_error "altlinuxhyph headers not found." "$LINENO" 5 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - - - ac_fn_c_check_member "$LINENO" "struct _HyphenDict" "cset" "ac_cv_member_struct__HyphenDict_cset" "#include -" -if test "x$ac_cv_member_struct__HyphenDict_cset" = x""yes; then : - +rm -f 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 + : else - as_fn_error "no. You are sure you have altlinuyhyph headers?" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyphen $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "altlinuxhyph library not found or too old." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyph $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "altlinuxhyph library not found or too old." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhnj $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "altlinuxhyph library not found or too old." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_MYTHES=YES - ac_fn_c_check_header_mongrel "$LINENO" "mythes.hxx" "ac_cv_header_mythes_hxx" "$ac_includes_default" -if test "x$ac_cv_header_mythes_hxx" = x""yes; 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 +if test "${ac_cv_header_mythes_hxx+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# Is the header present? +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 +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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: 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:* ) + { 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 +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_mythes_hxx = yes; then + : else - as_fn_error "mythes.hxx headers not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes $LIBS" -cat confdefs.h - <<_ACEOF >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. */ int main () { -return main (); +main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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_mythes_main=yes else - ac_cv_lib_mythes_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mythes_main=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 cat >>confdefs.h <<_ACEOF #define HAVE_LIBMYTHES 1 _ACEOF @@ -18391,68 +23673,237 @@ _ACEOF LIBS="-lmythes $LIBS" else - as_fn_error "mythes library not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: mythes library not found." >&5 +echo "$as_me: error: mythes library not found." >&2;} + { (exit 1); exit 1; }; } fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } + echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6 SYSTEM_MYTHES=NO fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_LPSOLVE=YES - ac_fn_c_check_header_mongrel "$LINENO" "lpsolve/lp_lib.h" "ac_cv_header_lpsolve_lp_lib_h" "$ac_includes_default" -if test "x$ac_cv_header_lpsolve_lp_lib_h" = x""yes; then : + 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 +if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +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 +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 +#include +_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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 + +fi +if test $ac_cv_header_lpsolve_lp_lib_h = yes; then + : else - as_fn_error "lpsolve headers not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: lpsolve headers not found." >&5 +echo "$as_me: error: lpsolve headers not found." >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llpsolve55 $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_lpsolve55_make_lp=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_lpsolve55_make_lp=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -18460,73 +23911,105 @@ _ACEOF LIBS="-llpsolve55 $LIBS" else - as_fn_error "lpsolve library not found or too old." "$LINENO" 5 + { { 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:${as_lineno-$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 if test "$_os" = "Linux"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_c_gnu_get_libc_version=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_c_gnu_get_libc_version=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - as_fn_error "no, upgrade libc" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: no, upgrade libc" >&5 +echo "$as_me: error: no, upgrade libc" >&2;} + { (exit 1); exit 1; }; } fi fi if test \( "$_os" = "WINNT" \) ; then - { $as_echo "$as_me:${as_lineno-$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` @@ -18547,12 +24030,19 @@ $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_fn_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 +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. Remove/rename/backup that file and restart configure. Details about this -problem can be found in issue 49856." "$LINENO" 5 +problem can be found in issue 49856." >&2;} + { (exit 1); exit 1; }; } fi # WIndows SDK has different headers if test \( -f "$PSDK_HOME/Include/adoint.h" \) \ @@ -18568,36 +24058,41 @@ problem can be found in issue 49856." "$LINENO" 5 HAVE_PSDK_LIB="no" fi if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then - as_fn_error "Some (all?) PSDK files not found, please check if all needed Platform SDKs -are installed or use --with-psdk-home ." "$LINENO" 5 + { { 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 +are installed or use --with-psdk-home ." >&2;} + { (exit 1); exit 1; }; } fi if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \ -o ! -x "$PSDK_HOME/bin/msidb.exe" \ -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \ -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then - as_fn_error "Some (all) files of the Windows Installer SDK are missing, please install." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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"` @@ -18629,15 +24124,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:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - as_fn_error "DirectX SDK files not found, please use --with-directx-home or -disable-directx." "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } + echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6 fi fi @@ -18645,14 +24142,14 @@ fi NSIS_PATH="" if test "$_os" = "WINNT" ; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_NSIS_PATH+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $NSIS_PATH in [\\/]* | ?:[\\/]*) @@ -18664,29 +24161,28 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi NSIS_PATH=$ac_cv_path_NSIS_PATH + if test -n "$NSIS_PATH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -18701,24 +24197,24 @@ fi NSIS_PATH="$nsistest" fi if test -z "$NSIS_PATH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BISON+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $BISON in [\\/]* | ?:[\\/]*) @@ -18730,56 +24226,59 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi BISON=$ac_cv_path_BISON + if test -n "$BISON"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "no bison found in \$PATH, install bison" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FLEX+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FLEX in [\\/]* | ?:[\\/]*) @@ -18791,38 +24290,39 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi FLEX=$ac_cv_path_FLEX + if test -n "$FLEX"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "no flex found in \$PATH, install flex" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATCH+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PATCH in [\\/]* | ?:[\\/]*) @@ -18834,31 +24334,32 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi PATCH=$ac_cv_path_PATCH + if test -n "$PATCH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "\\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" "$LINENO" 5 + { { 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 if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then @@ -18868,17 +24369,21 @@ if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then if test -x "$with_gnu_patch"; then GNUPATCH=$with_gnu_patch else - as_fn_error "--with-gnu-patch did not point to an executable" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - as_fn_error "no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" "$LINENO" 5 + { { 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 @@ -18887,10 +24392,10 @@ $as_echo "yes" >&6; } 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GNUCP+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GNUCP in [\\/]* | ?:[\\/]*) @@ -18902,59 +24407,64 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi GNUCP=$ac_cv_path_GNUCP + if test -n "$GNUCP"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" "$LINENO" 5 + { { 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_fn_error "--with-gnu-cp did not point to an executable" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: checking whether $GNUCP is GNU cp" >&5 -$as_echo_n "checking whether $GNUCP is GNU cp... " >&6; } + echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp" >&5 +echo $ECHO_N "checking whether $GNUCP is GNU cp... $ECHO_C" >&6 if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + 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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else if test "$_os" = "Darwin"; then GNUCP='' - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no gnucp found - using the system's cp command" >&5 -$as_echo "no gnucp found - using the system's cp command" >&6; } + 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 else - as_fn_error "no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" "$LINENO" 5 + { { 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;} + { (exit 1); exit 1; }; } fi fi fi @@ -18967,10 +24477,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CYGWIN_PATH+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CYGWIN_PATH in [\\/]* | ?:[\\/]*) @@ -18982,29 +24492,28 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi CYGWIN_PATH=$ac_cv_path_CYGWIN_PATH + if test -n "$CYGWIN_PATH"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -19013,18 +24522,18 @@ fi if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ML_EXE+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ML_EXE in [\\/]* | ?:[\\/]*) @@ -19036,36 +24545,37 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi ML_EXE=$ac_cv_path_ML_EXE + if test -n "$ML_EXE"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "Configure did not find ml.exe assembler." "$LINENO" 5 + { { 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" @@ -19076,8 +24586,8 @@ else fi ASM_HOME="$with_asm_home" if test -n "$ASM_HOME"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASM_HOME" >&5 -$as_echo "$ASM_HOME" >&6; } + echo "$as_me:$LINENO: result: $ASM_HOME" >&5 +echo "${ECHO_T}$ASM_HOME" >&6 fi @@ -19094,10 +24604,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ZIP+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ZIP in [\\/]* | ?:[\\/]*) @@ -19109,35 +24619,34 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi ZIP=$ac_cv_path_ZIP + if test -n "$ZIP"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_UNZIP+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $UNZIP in [\\/]* | ?:[\\/]*) @@ -19149,69 +24658,84 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi UNZIP=$ac_cv_path_UNZIP + if test -n "$UNZIP"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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_fn_error "Zip/Unzip are required to build, please install or use --with-zip-home" "$LINENO" 5 + { { 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_fn_error "$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." "$LINENO" 5 +{ { 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:${as_lineno-$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:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - as_fn_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: +." >&5 +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: -." "$LINENO" 5 +." >&2;} + { (exit 1); exit 1; }; } fi fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - as_fn_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: +." >&5 +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: -." "$LINENO" 5 +." >&2;} + { (exit 1); exit 1; }; } fi fi @@ -19219,21 +24743,28 @@ if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then if ./oowintool --msvc-copy-dlls ./external/msvcp ; then : else - as_fn_error "oowintool failed to copy CRT" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 else - as_fn_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: -." "$LINENO" 5 +." >&5 +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;} + { (exit 1); exit 1; }; } fi fi @@ -19243,11 +24774,11 @@ fi if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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` @@ -19256,21 +24787,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_fn_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 +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/." "$LINENO" 5 +As the automatic detection fails please copy the files to external/msi/." >&2;} + { (exit 1); exit 1; }; } else - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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" @@ -19293,31 +24830,31 @@ fi if test -z "$R"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -19329,30 +24866,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -19363,25 +24899,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -19402,33 +24938,35 @@ $as_echo "$GCONF_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -19440,30 +24978,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -19474,25 +25011,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -19513,7 +25050,9 @@ $as_echo "$GNOMEVFS_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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 if test "$ENABLE_GCONF" != "TRUE"; then @@ -19523,10 +25062,10 @@ $as_echo "$GNOMEVFS_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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -19538,30 +25077,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -19572,25 +25110,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -19611,13 +25149,15 @@ $as_echo "$GCONF_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -19635,10 +25175,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -19650,30 +25190,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -19684,25 +25223,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -19723,7 +25262,9 @@ $as_echo "$GTK_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_error "requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" "$LINENO" 5 + { { 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 BUILD_TYPE="$BUILD_TYPE GTK" @@ -19733,22 +25274,22 @@ $as_echo "$GTK_LIBS" >&6; } BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK" fi - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -19760,30 +25301,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -19794,25 +25334,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -19833,33 +25373,37 @@ $as_echo "$DBUS_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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_fn_error "please use --enable-gio only together with --disable-gnome-vfs." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -19871,30 +25415,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -19905,25 +25448,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -19944,12 +25487,14 @@ $as_echo "$GIO_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -19968,18 +25513,18 @@ SYSTEM_CAIRO="" if test "$test_cairo" = "yes"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: external" >&5 -$as_echo "external" >&6; } + echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6 SYSTEM_CAIRO=YES @@ -19988,10 +25533,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -20003,30 +25548,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -20037,25 +25581,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -20076,22 +25620,31 @@ $as_echo "$CAIRO_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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_fn_error "Cairo library requires fontconfig." "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: checking whether Xrender.h defines PictStandardA8" >&5 -$as_echo_n "checking whether Xrender.h defines PictStandardA8... " >&6; } - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 + { { 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 @@ -20105,28 +25658,43 @@ int main(int argc, char **argv) { } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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: yes" >&5 +echo "${ECHO_T}yes" >&6 else - as_fn_error "no, X headers too old." "$LINENO" 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 ) +{ { 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 -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -20137,52 +25705,219 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" -if test "x$ac_cv_header_GL_gl_h" = x""yes; then : + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}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 +if test "${ac_cv_header_GL_gl_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +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? +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 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$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 + 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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_GL_gl_h = yes; then + : else - as_fn_error "OpenGL headers not found" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGL $LIBS" -cat confdefs.h - <<_ACEOF >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. */ int main () { -return main (); +main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_GL_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_GL_main=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -20190,40 +25925,71 @@ _ACEOF LIBS="-lGL $LIBS" else - as_fn_error "libGL not installed or functional" "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGLU $LIBS" -cat confdefs.h - <<_ACEOF >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. */ int main () { -return main (); +main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_GLU_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_GLU_main=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -20231,69 +25997,71 @@ _ACEOF LIBS="-lGLU $LIBS" else - as_fn_error "libGLU not installed or functional" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -20301,10 +26069,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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -20316,30 +26084,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -20350,25 +26117,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -20389,26 +26156,30 @@ $as_echo "$POPPLER_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ENABLE_PDFIMPORT=NO fi @@ -20417,76 +26188,82 @@ fi if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "servlet-api.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -20494,93 +26271,103 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "sac.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libxml_1_0_0_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libxml_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "libxml.jar replacement not found." "$LINENO" 5 + { { 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 @@ -20589,71 +26376,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBXML_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "libxml.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_flute_1_3_0_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_flute_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "flute-1.3.0.jar replacement not found." "$LINENO" 5 + { { 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 @@ -20662,71 +26457,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$FLUTE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "flute-1.3.0.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_flow_engine_0_9_2_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_flow_engine_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "jfreereport.jar replacement not found." "$LINENO" 5 + { { 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 @@ -20735,71 +26538,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$JFREEREPORT_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "jfreereport.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_liblayout_0_2_9_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_liblayout_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "liblayout.jar replacement not found." "$LINENO" 5 + { { 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 @@ -20808,71 +26619,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBLAYOUT_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "liblayout.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libloader_1_0_0_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libloader_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "libloader.jar replacement not found." "$LINENO" 5 + { { 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 @@ -20881,71 +26700,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBLOADER_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "libloader.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libformula_0_2_0_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libformula_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "libformula.jar replacement not found." "$LINENO" 5 + { { 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 @@ -20954,71 +26781,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBFORMULA_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "libformula.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_librepository_1_0_0_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_librepository_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "librepository.jar replacement not found." "$LINENO" 5 + { { 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 @@ -21027,71 +26862,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBREPOSITORY_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "librepository.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libfonts_1_0_0_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libfonts_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "libfonts.jar replacement not found." "$LINENO" 5 + { { 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 @@ -21100,71 +26943,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBFONTS_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "libfonts.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libserializer_1_0_0_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libserializer_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "libserializer.jar replacement not found." "$LINENO" 5 + { { 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 @@ -21173,72 +27024,80 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBSERIALIZER_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "libserializer.jar not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: libserializer.jar not found." >&5 +echo "$as_me: error: libserializer.jar not found." >&2;} + { (exit 1); exit 1; }; } fi fi if test -z $LIBBASE_JAR; then - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libbase_1_0_0_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_libbase_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "libbase.jar replacement not found." "$LINENO" 5 + { { 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 @@ -21247,50 +27106,54 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$LIBBASE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "libbase.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: result: internal" >&5 -$as_echo "internal" >&6; } - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: OK" >&5 -$as_echo "OK" >&6; } + echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6 else - as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 + { { 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 BUILD_TYPE="$BUILD_TYPE JFREEREPORT" fi BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" else - { $as_echo "$as_me:${as_lineno-$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 @@ -21311,52 +27174,58 @@ 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_commons_codec_1_3_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_commons_codec_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "commons-codec.jar replacement not found." "$LINENO" 5 + { { 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 @@ -21365,71 +27234,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "commons-codec.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_commons_lang_2_3_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_commons_lang_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "commons-lang.jar replacement not found." "$LINENO" 5 + { { 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 @@ -21438,71 +27315,79 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "commons-lang.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_commons_httpclient_3_1_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_commons_httpclient_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "commons-httpclient.jar replacement not found." "$LINENO" 5 + { { 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 @@ -21511,72 +27396,80 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "commons-httpclient.jar not found." "$LINENO" 5 + { { 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 fi fi if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then if test -z $COMMONS_LOGGING_JAR; then - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_commons_logging_1_1_1_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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 else ac_cv_file__usr_share_java_commons_logging_jar=no fi fi -{ $as_echo "$as_me:${as_lineno-$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_fn_error "commons-logging.jar replacement not found." "$LINENO" 5 + { { 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 @@ -21585,35 +27478,37 @@ fi fi else - as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + { { 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" else eval "$as_ac_File=no" fi fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_File - 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_fn_error "commons-logging.jar not found." "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -21665,8 +27560,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:${as_lineno-$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 @@ -21674,15 +27569,18 @@ $as_echo_n "checking for Qt headers... " >&6; } break fi done - { $as_echo "$as_me:${as_lineno-$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_fn_error "Qt headers not found. Please specify the root of -your Qt installation by exporting QTDIR before running \"configure\"." "$LINENO" 5 + { { 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 +your Qt installation by exporting QTDIR before running \"configure\"." >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$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 @@ -21690,19 +27588,22 @@ $as_echo_n "checking for Qt libraries... " >&6; } break fi done - { $as_echo "$as_me:${as_lineno-$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_fn_error "Qt libraries not found. Please specify the root of -your Qt installation by exporting QTDIR before running \"configure\"." "$LINENO" 5 + { { 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 +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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MOC+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MOC in [\\/]* | ?:[\\/]*) @@ -21715,37 +27616,39 @@ for as_dir in $as_dummy 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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_fn_error "Qt Meta Object Compiler not found. Please specify -the root of your Qt installation by exporting QTDIR before running \"configure\"." "$LINENO" 5 + { { 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 +the root of your Qt installation by exporting QTDIR before running \"configure\"." >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$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 @@ -21753,15 +27656,18 @@ $as_echo_n "checking for KDE headers... " >&6; } break fi done - { $as_echo "$as_me:${as_lineno-$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_fn_error "KDE headers not found. Please specify the root of -your KDE installation by exporting KDEDIR before running \"configure\"." "$LINENO" 5 + { { 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 +your KDE installation by exporting KDEDIR before running \"configure\"." >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$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 @@ -21769,11 +27675,14 @@ $as_echo_n "checking for KDE libraries... " >&6; } break fi done - { $as_echo "$as_me:${as_lineno-$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_fn_error "KDE libraries not found. Please specify the root of -your KDE installation by exporting KDEDIR before running \"configure\"." "$LINENO" 5 + { { 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 +your KDE installation by exporting KDEDIR before running \"configure\"." >&2;} + { (exit 1); exit 1; }; } fi KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" @@ -21813,8 +27722,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:${as_lineno-$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 @@ -21823,14 +27732,16 @@ $as_echo_n "checking for Qt4 headers... " >&6; } fi done - { $as_echo "$as_me:${as_lineno-$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_fn_error "Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -21839,19 +27750,21 @@ $as_echo_n "checking for Qt4 libraries... " >&6; } fi done - { $as_echo "$as_me:${as_lineno-$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_fn_error "Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." "$LINENO" 5 + { { 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MOC4+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MOC4 in [\\/]* | ?:[\\/]*) @@ -21864,37 +27777,39 @@ for as_dir in $as_dummy 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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_fn_error "Qt Meta Object Compiler not found. Please specify -the root of your Qt installation by exporting QT4DIR before running \"configure\"." "$LINENO" 5 + { { 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 +the root of your Qt installation by exporting QT4DIR before running \"configure\"." >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$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 @@ -21902,14 +27817,16 @@ $as_echo_n "checking for KDE4 headers... " >&6; } break fi done - { $as_echo "$as_me:${as_lineno-$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_fn_error "KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." "$LINENO" 5 + { { 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:${as_lineno-$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 @@ -21918,10 +27835,12 @@ $as_echo_n "checking for KDE4 libraries... " >&6; } fi done - { $as_echo "$as_me:${as_lineno-$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_fn_error "KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." "$LINENO" 5 + { { 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 KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" @@ -21931,34 +27850,34 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 +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 [\\/]* | ?:[\\/]*) @@ -21970,30 +27889,29 @@ 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 + 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" - $as_echo "$as_me:${as_lineno-$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 +done 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:${as_lineno-$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:${as_lineno-$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 @@ -22004,25 +27922,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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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="" @@ -22043,25 +27961,27 @@ $as_echo "$GOBJECT_LIBS" >&6; } if test $succeeded = yes; then : else - as_fn_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." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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' @@ -22069,15 +27989,20 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS $KDE_CFLAGS" - { $as_echo "$as_me:${as_lineno-$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 : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 + { { 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 @@ -22088,16 +28013,31 @@ int main(int argc, char **argv) { } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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: yes" >&5 +echo "${ECHO_T}yes" >&6 else - as_fn_error "KDE version too old or too recent, please use another version of KDE or disable KDE address book support" "$LINENO" 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 ) +{ { 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 -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam 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' @@ -22107,66 +28047,66 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ENABLE_KAB=TRUE else - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -22174,13 +28114,13 @@ fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -22210,13 +28150,151 @@ elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then XINERAMA_LINK=none fi if test "$USE_XINERAMA" = "YES"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $XINERAMA_LINK linking" >&5 -$as_echo "yes, with $XINERAMA_LINK linking" >&6; } - ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then : + 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 + 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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +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 +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 +#include +_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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 + +# 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 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +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 + 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 + ac_header_preproc=yes +else + 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 + +# 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;} + 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 + ;; +esac +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 + echo $ECHO_N "(cached) $ECHO_C" >&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 +fi +if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then + : else - as_fn_error "Xinerama header not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Xinerama header not found." >&5 +echo "$as_me: error: Xinerama header not found." >&2;} + { (exit 1); exit 1; }; } fi @@ -22227,43 +28305,72 @@ fi if test "$_os" = "Linux"; then XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" fi - { $as_echo "$as_me:${as_lineno-$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 : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXinerama $XINERAMA_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >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. */ -/* 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 -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +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 + 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 - ac_cv_lib_Xinerama_XineramaIsActive=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xinerama_XineramaIsActive=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$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 @@ -22271,16 +28378,18 @@ _ACEOF LIBS="-lXinerama $LIBS" else - as_fn_error "Xinerama not functional?" "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -22294,10 +28403,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ANT+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ANT in [\\/]* | ?:[\\/]*) @@ -22309,29 +28418,28 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi ANT=$ac_cv_path_ANT + if test -n "$ANT"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -22343,10 +28451,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:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ANT+set}" = set; then : - $as_echo_n "(cached) " >&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 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ANT in [\\/]* | ?:[\\/]*) @@ -22359,29 +28467,28 @@ for as_dir in $as_dummy 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 + for ac_exec_ext in '' $ac_executable_extensions; do + 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:${as_lineno-$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 +done ;; esac fi ANT=$ac_cv_path_ANT + if test -n "$ANT"; then - { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 @@ -22390,7 +28497,9 @@ done fi if test -z "$ANT"; then - as_fn_error "Ant not found - Make sure it's in the path or use --with-ant-home" "$LINENO" 5 + { { 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 while test -h "$ANT"; do @@ -22415,8 +28524,8 @@ else fi ant_minminor1=`echo $ant_minver | cut -d"." -f2` - { $as_echo "$as_me:${as_lineno-$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` @@ -22424,16 +28533,18 @@ 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:${as_lineno-$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:${as_lineno-$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_fn_error "no, you need at least ant >= $ant_minver" "$LINENO" 5 + { { 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 - { $as_echo "$as_me:${as_lineno-$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) { @@ -22457,14 +28568,14 @@ EOF else ant_cmd="$ANT -buildfile conftest.xml 1>&2" fi - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ant_cmd\""; } >&5 + { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 (eval $ant_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } if test $? = 0 && test -f ./conftest.class ; then - { $as_echo "$as_me:${as_lineno-$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 @@ -22477,8 +28588,8 @@ $as_echo "Ant works" >&6; } echo "configure: Ant test failed" >&5 cat conftest.java >&5 cat conftest.xml >&5 - { $as_echo "$as_me:${as_lineno-$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 @@ -22491,8 +28602,8 @@ fi if test "$ANT_HOME" != "NO_ANT_HOME"; then - { $as_echo "$as_me:${as_lineno-$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 @@ -22508,21 +28619,23 @@ $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_fn_error "Ant libraries not found!" "$LINENO" 5 + { { 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:${as_lineno-$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 if test "$ENABLE_MEDIAWIKI" = "YES"; then -{ $as_echo "$as_me:${as_lineno-$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 @@ -22554,29 +28667,31 @@ EOF else ant_cmd="$ANT -buildfile conftest.xml 1>&2" fi - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ant_cmd\""; } >&5 + { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 (eval $ant_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } if test $? = 0 && test -f ./conftest.class ; then - { $as_echo "$as_me:${as_lineno-$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_fn_error "no. Did you install ant-apache-regexp?" "$LINENO" 5 + { { 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 rm -f conftest* core core.* *.core OOO_JUNIT_JAR= if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then - { $as_echo "$as_me:${as_lineno-$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 @@ -22592,172 +28707,176 @@ $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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_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" "$LINENO" 5 +--with-junit=..., or disable it via --without-junit" >&5 +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; }; } fi fi -{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -22768,20 +28887,22 @@ echo "* *" echo "********************************************************************" if test -z "$COMPATH"; then - as_fn_error "No compiler found." "$LINENO" 5 + { { 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 @@ -22790,8 +28911,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 @@ -22810,59 +28930,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:${as_lineno-$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= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - +{ (set) 2>&1 | - 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 \. + 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:${as_lineno-$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:${as_lineno-$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 @@ -22871,54 +28971,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. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append 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 @@ -22926,15 +29035,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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_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. @@ -22944,252 +29050,81 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false - SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_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 : +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# 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 - - -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 -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (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' +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 -# 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=';' - } +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false 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 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 +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 - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - +done -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +# Required to use basename. +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 fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi -as_me=`$as_basename -- "$0" || +# Name of the executable. +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'` + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -23197,123 +29132,148 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; +# 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$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 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 + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\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;} + { (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 + # 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 -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + as_expr=false 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 + +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 + 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 - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - 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" || -$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 - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - +rm -f conf$$ conf$$.exe conf$$.file -} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p 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'" @@ -23322,20 +29282,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 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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.65. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -23343,111 +29314,124 @@ generated by GNU Autoconf 2.65. 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 and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. +\`$as_me' instantiates files from templates according to the +current configuration. -Usage: $0 [OPTION]... [TAG]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, 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 the package provider." - +Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2009 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 ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; 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 - as_fn_append 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_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) { { 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; }; } ;; - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -23461,45 +29445,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_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + 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 @@ -23509,403 +29479,682 @@ 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 'as_fn_exit 1' 1 2 13 15 + 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") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# 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=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -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 - -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_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -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_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - 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_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - 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 -' >$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 = "" - -} + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || { - 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 + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } } -_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_fn_error "could not setup config files machinery" "$LINENO" 5 -_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 +# +# CONFIG_FILES section. +# -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_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[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 +# 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,@NO_HIDS@,$NO_HIDS,;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,@PKGFORMAT@,$PKGFORMAT,;t t +s,@RPM@,$RPM,;t t +s,@GPERF@,$GPERF,;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_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,@SYSTEM_MYTHES@,$SYSTEM_MYTHES,;t t +s,@SYSTEM_LPSOLVE@,$SYSTEM_LPSOLVE,;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,@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,@LOCAL_SOLVER@,$LOCAL_SOLVER,;t t +s,@BUILD_TYPE@,$BUILD_TYPE,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF - 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_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done +_ACEOF - # 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:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + 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_fn_error "could not create $ac_file" "$LINENO" 5 ;; - 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"; as_fn_mkdir_p + 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 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 || +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 ! -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:${as_lineno-$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_fn_error "could not create $ac_file" "$LINENO" 5 - -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:${as_lineno-$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_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - - - - 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 -as_fn_exit 0 +{ (exit 0); exit 0; } _ACEOF +chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -23925,11 +30174,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + $ac_cs_success || { (exit 1); exit 1; } fi -- cgit v1.2.3